Re-enable index-basics-workers test to see if still times
[chromium-blink-merge.git] / tools / cc-frame-viewer / src / layer_tree_impl_view.js
blob1b625aaf1e7fda5651b617a869dd2068bfd3e024
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.
4  */
5 'use strict';
7 base.require('ui');
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_);
26     },
28     set header(text) {
29       this.headerEl_.textContent = text;
30     },
32     set layerTreeImpl(layerTreeImpl) {
33       this.layerTreeImpl_ = layerTreeImpl;
34       this.updateChildren_();
35     },
37     updateChildren_: function() {
38       this.layerListEl_.list = this.layerTreeImpl_.allLayers;
39     }
40   };
42   return {
43     LayerTreeImplView: LayerTreeImplView,
44   }
45 });