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