| <!DOCTYPE html> |
| <!-- |
| Copyright (c) 2015 The Chromium Authors. All rights reserved. |
| Use of this source code is governed by a BSD-style license that can be |
| found in the LICENSE file. |
| --> |
| |
| <link rel="stylesheet" href="/extras/chrome/cc/display_item_view.css"> |
| |
| <link rel="import" href="/extras/chrome/cc/display_item_list.html"> |
| <link rel="import" href="/extras/chrome/cc/display_item_debugger.html"> |
| <link rel="import" href="/core/analysis/generic_object_view.html"> |
| <link rel="import" href="/core/analysis/object_snapshot_view.html"> |
| <link rel="import" href="/base/units/util.html"> |
| |
| <script> |
| 'use strict'; |
| |
| tr.exportTo('tr.e.cc', function() { |
| /* |
| * Displays a display item snapshot in a human readable form. |
| * @constructor |
| */ |
| var DisplayItemSnapshotView = tr.b.ui.define( |
| 'display-item-snapshot-view', |
| tr.c.analysis.ObjectSnapshotView); |
| |
| DisplayItemSnapshotView.prototype = { |
| __proto__: tr.c.analysis.ObjectSnapshotView.prototype, |
| |
| decorate: function() { |
| this.classList.add('display-item-view'); |
| this.displayItemDebugger_ = new tr.e.cc.DisplayItemDebugger(); |
| this.appendChild(this.displayItemDebugger_); |
| }, |
| |
| updateContents: function() { |
| if (this.objectSnapshot_ && this.displayItemDebugger_) |
| this.displayItemDebugger_.displayItemList = this.objectSnapshot_; |
| } |
| }; |
| |
| tr.c.analysis.ObjectSnapshotView.register( |
| DisplayItemSnapshotView, |
| { |
| typeNames: ['cc::DisplayItemList'], |
| showInstances: false |
| }); |
| |
| return { |
| DisplayItemSnapshotView: DisplayItemSnapshotView |
| }; |
| }); |
| </script> |