OLD | NEW |
| (Empty) |
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'; | |
6 | |
7 base.require('ui'); | |
8 base.requireStylesheet('layer_impl_view'); | |
9 base.exportTo('ccfv', function() { | |
10 var LayerImplView = ui.define('x-layer-impl-view'); | |
11 LayerImplView.prototype = { | |
12 __proto__: HTMLUnknownElement.prototype, | |
13 | |
14 decorate: function() { | |
15 this.layerImpl_ = undefined; | |
16 }, | |
17 | |
18 set layerImpl(layerImpl) { | |
19 this.layerImpl_ = layerImpl; | |
20 this.updateChildren_(); | |
21 }, | |
22 | |
23 updateChildren_: function() { | |
24 this.textContent = ''; | |
25 if (!this.layerImpl_) | |
26 return; | |
27 | |
28 var simpleObj = {}; | |
29 this.layerImpl_.dumpToSimpleObject(simpleObj); | |
30 this.textContent = JSON.stringify( | |
31 simpleObj, | |
32 null, | |
33 2); | |
34 } | |
35 }; | |
36 | |
37 return { | |
38 LayerImplView: LayerImplView | |
39 } | |
40 }); | |
41 | |
OLD | NEW |