1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file.
8 base.require('ui.list_and_associated_view');
9 base.require('layer_impl_view');
10 base.requireStylesheet('layer_tree_impl_view');
11 base.exportTo('ccfv', function() {
12 var LayerTreeImplView = ui.define('x-layer-tree-impl-view');
13 LayerTreeImplView.prototype = {
14 __proto__: HTMLUnknownElement.prototype,
16 decorate: function() {
17 this.layer_tree_impl_ = undefined;
18 this.layerListEl_ = new ui.ListAndAssociatedView();
19 this.layerListEl_.view = new ccfv.LayerImplView();
20 this.layerListEl_.viewProperty = 'layerImpl';
21 this.layerListEl_.listProperty = 'title';
23 this.headerEl_ = ui.createSpan('')
24 this.appendChild(this.headerEl_);
25 this.appendChild(this.layerListEl_);
29 this.headerEl_.textContent = text;
32 set layerTreeImpl(layerTreeImpl) {
33 this.layerTreeImpl_ = layerTreeImpl;
34 this.updateChildren_();
37 updateChildren_: function() {
38 this.layerListEl_.list = this.layerTreeImpl_.allLayers;
43 LayerTreeImplView: LayerTreeImplView,