OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <!-- | 2 <!-- |
3 Copyright (c) 2015 The Chromium Authors. All rights reserved. | 3 Copyright (c) 2015 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="stylesheet" href="/tracing/ui/extras/chrome/cc/display_item_list_view
.css"> | |
9 | |
10 <link rel="import" href="/tracing/extras/chrome/cc/display_item_list.html"> | 8 <link rel="import" href="/tracing/extras/chrome/cc/display_item_list.html"> |
11 <link rel="import" href="/tracing/ui/analysis/generic_object_view.html"> | 9 <link rel="import" href="/tracing/ui/analysis/generic_object_view.html"> |
12 <link rel="import" href="/tracing/ui/analysis/object_snapshot_view.html"> | 10 <link rel="import" href="/tracing/ui/analysis/object_snapshot_view.html"> |
13 <link rel="import" href="/tracing/ui/extras/chrome/cc/display_item_debugger.html
"> | 11 <link rel="import" href="/tracing/ui/extras/chrome/cc/display_item_debugger.html
"> |
14 | 12 |
15 <script> | 13 <script> |
16 'use strict'; | 14 'use strict'; |
17 | 15 |
18 tr.exportTo('tr.ui.e.chrome.cc', function() { | 16 tr.exportTo('tr.ui.e.chrome.cc', function() { |
19 /* | 17 /* |
20 * Displays a display item snapshot in a human readable form. | 18 * Displays a display item snapshot in a human readable form. |
21 * @constructor | 19 * @constructor |
22 */ | 20 */ |
23 const DisplayItemSnapshotView = tr.ui.b.define( | 21 const DisplayItemSnapshotView = tr.ui.b.define( |
24 'tr-ui-e-chrome-cc-display-item-list-view', | 22 'tr-ui-e-chrome-cc-display-item-list-view', |
25 tr.ui.analysis.ObjectSnapshotView); | 23 tr.ui.analysis.ObjectSnapshotView); |
26 | 24 |
27 DisplayItemSnapshotView.prototype = { | 25 DisplayItemSnapshotView.prototype = { |
28 __proto__: tr.ui.analysis.ObjectSnapshotView.prototype, | 26 __proto__: tr.ui.analysis.ObjectSnapshotView.prototype, |
29 | 27 |
30 decorate() { | 28 decorate() { |
31 Polymer.dom(this).classList.add( | 29 this.style.display = 'flex'; |
32 'tr-ui-e-chrome-cc-display-item-list-view'); | 30 this.style.flexGrow = 1; |
| 31 this.style.flexShrink = 1; |
| 32 this.style.flexBasis = 'auto'; |
33 this.displayItemDebugger_ = new tr.ui.e.chrome.cc.DisplayItemDebugger(); | 33 this.displayItemDebugger_ = new tr.ui.e.chrome.cc.DisplayItemDebugger(); |
34 Polymer.dom(this).appendChild(this.displayItemDebugger_); | 34 Polymer.dom(this).appendChild(this.displayItemDebugger_); |
35 }, | 35 }, |
36 | 36 |
37 updateContents() { | 37 updateContents() { |
38 if (this.objectSnapshot_ && this.displayItemDebugger_) { | 38 if (this.objectSnapshot_ && this.displayItemDebugger_) { |
39 this.displayItemDebugger_.displayItemList = this.objectSnapshot_; | 39 this.displayItemDebugger_.displayItemList = this.objectSnapshot_; |
40 } | 40 } |
41 } | 41 } |
42 }; | 42 }; |
43 | 43 |
44 tr.ui.analysis.ObjectSnapshotView.register( | 44 tr.ui.analysis.ObjectSnapshotView.register( |
45 DisplayItemSnapshotView, | 45 DisplayItemSnapshotView, |
46 { | 46 { |
47 typeNames: ['cc::DisplayItemList'], | 47 typeNames: ['cc::DisplayItemList'], |
48 showInstances: false | 48 showInstances: false |
49 }); | 49 }); |
50 | 50 |
51 return { | 51 return { |
52 DisplayItemSnapshotView, | 52 DisplayItemSnapshotView, |
53 }; | 53 }; |
54 }); | 54 }); |
55 </script> | 55 </script> |
OLD | NEW |