blob: e6715e971d0229f3fa334dcca30bbc93ec8759a5 [file] [log] [blame]
<!DOCTYPE html>
<!--
Copyright (c) 2015 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<link rel="import" href="/core/trace_model/selectable_item.html">
<link rel="import" href="/core/trace_model/selection_state.html">
<script>
'use strict';
tv.exportTo('tv.c.trace_model', function() {
var SelectableItem = tv.c.trace_model.SelectableItem;
var SelectionState = tv.c.trace_model.SelectionState;
/**
* A ProxySelectableItem is a selectable item which is not a model item itself
* but instead acts as a proxy for a model item.
*
* @constructor
* @extends {SelectableItem}
*/
function ProxySelectableItem(modelItem) {
SelectableItem.call(this, modelItem);
};
ProxySelectableItem.prototype = {
__proto__: SelectableItem.prototype,
get selectionState() {
var modelItem = this.modelItem_;
if (modelItem === undefined)
return SelectionState.NONE;
return modelItem.selectionState;
}
};
return {
ProxySelectableItem: ProxySelectableItem
};
});
</script>