| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @constructor | 6 * @constructor |
| 7 * @param {function(!WebInspector.Layer, string=)} showImageForLayerCallback | 7 * @param {function(!WebInspector.Layer, string=)} showImageForLayerCallback |
| 8 * @extends {WebInspector.SplitWidget} | 8 * @extends {WebInspector.SplitWidget} |
| 9 */ | 9 */ |
| 10 WebInspector.LayerPaintProfilerView = function(showImageForLayerCallback) | 10 WebInspector.LayerPaintProfilerView = function(showImageForLayerCallback) |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 snapshot.commandLog(onCommandLogDone.bind(this, snapshot)); | 40 snapshot.commandLog(onCommandLogDone.bind(this, snapshot)); |
| 41 } | 41 } |
| 42 | 42 |
| 43 /** | 43 /** |
| 44 * @param {!WebInspector.PaintProfilerSnapshot=} snapshot | 44 * @param {!WebInspector.PaintProfilerSnapshot=} snapshot |
| 45 * @param {!Array.<!Object>=} log | 45 * @param {!Array.<!Object>=} log |
| 46 * @this {WebInspector.LayerPaintProfilerView} | 46 * @this {WebInspector.LayerPaintProfilerView} |
| 47 */ | 47 */ |
| 48 function onCommandLogDone(snapshot, log) | 48 function onCommandLogDone(snapshot, log) |
| 49 { | 49 { |
| 50 this._logTreeView.setCommandLog(snapshot.target(), log); | 50 this._logTreeView.setCommandLog(snapshot.target(), log || []); |
| 51 this._paintProfilerView.setSnapshotAndLog(snapshot || null, log || [
], null); | 51 this._paintProfilerView.setSnapshotAndLog(snapshot || null, log || [
], null); |
| 52 } | 52 } |
| 53 }, | 53 }, |
| 54 | 54 |
| 55 _onWindowChanged: function() | 55 _onWindowChanged: function() |
| 56 { | 56 { |
| 57 var window = this._paintProfilerView.windowBoundaries(); | 57 var window = this._paintProfilerView.windowBoundaries(); |
| 58 this._logTreeView.updateWindow(window.left, window.right); | 58 this._logTreeView.updateWindow(window.left, window.right); |
| 59 }, | 59 }, |
| 60 | 60 |
| 61 /** | 61 /** |
| 62 * @param {string=} imageURL | 62 * @param {string=} imageURL |
| 63 */ | 63 */ |
| 64 _showImage: function(imageURL) | 64 _showImage: function(imageURL) |
| 65 { | 65 { |
| 66 this._showImageForLayerCallback(this._layer, imageURL); | 66 this._showImageForLayerCallback(this._layer, imageURL); |
| 67 }, | 67 }, |
| 68 | 68 |
| 69 __proto__: WebInspector.SplitWidget.prototype | 69 __proto__: WebInspector.SplitWidget.prototype |
| 70 }; | 70 }; |
| 71 | 71 |
| OLD | NEW |