| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <!-- | 2 <!-- |
| 3 Copyright (c) 2013 The Chromium Authors. All rights reserved. | 3 Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 4 Use of this source code is governed by a BSD-style license that can be | 4 Use of this source code is governed by a BSD-style license that can be |
| 5 found in the LICENSE file. | 5 found in the LICENSE file. |
| 6 --> | 6 --> |
| 7 | 7 |
| 8 <link rel="import" href="/tracing/extras/chrome/cc/tile.html"> | 8 <link rel="import" href="/tracing/extras/chrome/cc/tile.html"> |
| 9 <link rel="import" href="/tracing/ui/analysis/generic_object_view.html"> | 9 <link rel="import" href="/tracing/ui/analysis/generic_object_view.html"> |
| 10 <link rel="import" href="/tracing/ui/analysis/object_snapshot_view.html"> | 10 <link rel="import" href="/tracing/ui/analysis/object_snapshot_view.html"> |
| 11 | 11 |
| 12 <script> | 12 <script> |
| 13 | 13 |
| 14 'use strict'; | 14 'use strict'; |
| 15 | 15 |
| 16 tr.exportTo('tr.ui.e.chrome.cc', function() { | 16 tr.exportTo('tr.ui.e.chrome.cc', function() { |
| 17 /* | 17 /* |
| 18 * Displays a tile in a human readable form. | 18 * Displays a tile in a human readable form. |
| 19 * @constructor | 19 * @constructor |
| 20 */ | 20 */ |
| 21 var TileSnapshotView = tr.ui.b.define( | 21 var TileSnapshotView = tr.ui.b.define( |
| 22 'tr-ui-e-chrome-cc-tile-snapshot-view', | 22 'tr-ui-e-chrome-cc-tile-snapshot-view', |
| 23 tr.ui.analysis.ObjectSnapshotView); | 23 tr.ui.analysis.ObjectSnapshotView); |
| 24 | 24 |
| 25 TileSnapshotView.prototype = { | 25 TileSnapshotView.prototype = { |
| 26 __proto__: tr.ui.analysis.ObjectSnapshotView.prototype, | 26 __proto__: tr.ui.analysis.ObjectSnapshotView.prototype, |
| 27 | 27 |
| 28 decorate: function() { | 28 decorate: function() { |
| 29 this.classList.add('tr-ui-e-chrome-cc-tile-snapshot-view'); | 29 Polymer.dom(this).classList.add('tr-ui-e-chrome-cc-tile-snapshot-view'); |
| 30 this.layerTreeView_ = | 30 this.layerTreeView_ = |
| 31 new tr.ui.e.chrome.cc.LayerTreeHostImplSnapshotView(); | 31 new tr.ui.e.chrome.cc.LayerTreeHostImplSnapshotView(); |
| 32 Polymer.dom(this).appendChild(this.layerTreeView_); | 32 Polymer.dom(this).appendChild(this.layerTreeView_); |
| 33 }, | 33 }, |
| 34 | 34 |
| 35 updateContents: function() { | 35 updateContents: function() { |
| 36 var tile = this.objectSnapshot_; | 36 var tile = this.objectSnapshot_; |
| 37 var layerTreeHostImpl = tile.containingSnapshot; | 37 var layerTreeHostImpl = tile.containingSnapshot; |
| 38 if (!layerTreeHostImpl) | 38 if (!layerTreeHostImpl) |
| 39 return; | 39 return; |
| 40 | 40 |
| 41 this.layerTreeView_.objectSnapshot = layerTreeHostImpl; | 41 this.layerTreeView_.objectSnapshot = layerTreeHostImpl; |
| 42 this.layerTreeView_.selection = new tr.ui.e.chrome.cc.TileSelection(tile); | 42 this.layerTreeView_.selection = new tr.ui.e.chrome.cc.TileSelection(tile); |
| 43 } | 43 } |
| 44 }; | 44 }; |
| 45 | 45 |
| 46 tr.ui.analysis.ObjectSnapshotView.register( | 46 tr.ui.analysis.ObjectSnapshotView.register( |
| 47 TileSnapshotView, | 47 TileSnapshotView, |
| 48 { | 48 { |
| 49 typeName: 'cc::Tile', | 49 typeName: 'cc::Tile', |
| 50 showInTrackView: false | 50 showInTrackView: false |
| 51 }); | 51 }); |
| 52 | 52 |
| 53 return { | 53 return { |
| 54 TileSnapshotView: TileSnapshotView | 54 TileSnapshotView: TileSnapshotView |
| 55 }; | 55 }; |
| 56 }); | 56 }); |
| 57 </script> | 57 </script> |
| OLD | NEW |