Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(232)

Side by Side Diff: tools/cc-frame-viewer/src/layer_impl_view.js

Issue 12287014: [cc-frame-viewer] Show layers and levels of detail (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. 3 * found in the LICENSE file.
4 */ 4 */
5 'use strict'; 5 'use strict';
6 6
7 base.require('ui'); 7 base.require('ui');
8 base.requireStylesheet('tile_view'); 8 base.requireStylesheet('layer_impl_view');
9 base.exportTo('ccfv', function() { 9 base.exportTo('ccfv', function() {
10 var TileView = ui.define('x-tile-view'); 10 var LayerImplView = ui.define('x-layer-impl-view');
11 TileView.prototype = { 11 LayerImplView.prototype = {
12 __proto__: HTMLUnknownElement.prototype, 12 __proto__: HTMLUnknownElement.prototype,
13 13
14 decorate: function() { 14 decorate: function() {
15 this.tile_ = undefined; 15 this.layerImpl_ = undefined;
16 }, 16 },
17 17
18 set tile(tile) { 18 set layerImpl(layerImpl) {
19 this.tile_ = tile; 19 this.layerImpl_ = layerImpl;
20 this.updateChildren_(); 20 this.updateChildren_();
21 }, 21 },
22 22
23 updateChildren_: function() { 23 updateChildren_: function() {
24 this.textContent = ''; 24 this.textContent = '';
25 if (!this.tile_) 25 if (!this.layerImpl_)
26 return; 26 return;
27 27
28 var simpleObj = {}; 28 var simpleObj = {};
29 this.tile_.dumpToSimpleObject(simpleObj); 29 this.layerImpl_.dumpToSimpleObject(simpleObj);
30 this.textContent = JSON.stringify( 30 this.textContent = JSON.stringify(
31 simpleObj, 31 simpleObj,
32 null, 32 null,
33 2); 33 2);
34 } 34 }
35 }; 35 };
36 36
37 return { 37 return {
38 TileView: TileView 38 LayerImplView: LayerImplView
39 } 39 }
40 }); 40 });
41 41
OLDNEW
« no previous file with comments | « tools/cc-frame-viewer/src/layer_impl_view.css ('k') | tools/cc-frame-viewer/src/layer_impl_view_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698