| <!DOCTYPE html> |
| <!-- |
| Copyright (c) 2013 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/picture_view.css"> |
| |
| <link rel="import" href="/extras/chrome/cc/picture.html"> |
| <link rel="import" href="/extras/chrome/cc/picture_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 picture snapshot in a human readable form. |
| * @constructor |
| */ |
| var PictureSnapshotView = tr.b.ui.define( |
| 'picture-snapshot-view', |
| tr.c.analysis.ObjectSnapshotView); |
| |
| PictureSnapshotView.prototype = { |
| __proto__: tr.c.analysis.ObjectSnapshotView.prototype, |
| |
| decorate: function() { |
| this.classList.add('picture-snapshot-view'); |
| this.pictureDebugger_ = new tr.e.cc.PictureDebugger(); |
| this.appendChild(this.pictureDebugger_); |
| }, |
| |
| updateContents: function() { |
| if (this.objectSnapshot_ && this.pictureDebugger_) |
| this.pictureDebugger_.picture = this.objectSnapshot_; |
| } |
| }; |
| |
| tr.c.analysis.ObjectSnapshotView.register( |
| PictureSnapshotView, |
| { |
| typeNames: ['cc::Picture', 'cc::LayeredPicture'], |
| showInstances: false |
| }); |
| |
| return { |
| PictureSnapshotView: PictureSnapshotView |
| }; |
| }); |
| </script> |