Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(370)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/layers/LayerPaintProfilerView.js

Issue 2845813003: [DevTools] Host paint profiles in PaintProfilerModel (Closed)
Patch Set: addressed comments Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 Layers.LayerPaintProfilerView = class extends UI.SplitWidget { 5 Layers.LayerPaintProfilerView = class extends UI.SplitWidget {
6 /** 6 /**
7 * @param {function(string=)} showImageCallback 7 * @param {function(string=)} showImageCallback
8 */ 8 */
9 constructor(showImageCallback) { 9 constructor(showImageCallback) {
10 super(true, false); 10 super(true, false);
(...skipping 16 matching lines...) Expand all
27 */ 27 */
28 profile(snapshot) { 28 profile(snapshot) {
29 snapshot.commandLog().then(log => setSnapshotAndLog.call(this, snapshot, log )); 29 snapshot.commandLog().then(log => setSnapshotAndLog.call(this, snapshot, log ));
30 30
31 /** 31 /**
32 * @param {?SDK.PaintProfilerSnapshot} snapshot 32 * @param {?SDK.PaintProfilerSnapshot} snapshot
33 * @param {?Array<!SDK.PaintProfilerLogItem>} log 33 * @param {?Array<!SDK.PaintProfilerLogItem>} log
34 * @this {Layers.LayerPaintProfilerView} 34 * @this {Layers.LayerPaintProfilerView}
35 */ 35 */
36 function setSnapshotAndLog(snapshot, log) { 36 function setSnapshotAndLog(snapshot, log) {
37 this._logTreeView.setCommandLog(snapshot && snapshot.target(), log || []); 37 this._logTreeView.setCommandLog(log || []);
38 this._paintProfilerView.setSnapshotAndLog(snapshot, log || [], null); 38 this._paintProfilerView.setSnapshotAndLog(snapshot, log || [], null);
39 if (snapshot) 39 if (snapshot)
40 snapshot.release(); 40 snapshot.release();
41 } 41 }
42 } 42 }
43 43
44 /** 44 /**
45 * @param {number} scale 45 * @param {number} scale
46 */ 46 */
47 setScale(scale) { 47 setScale(scale) {
48 this._paintProfilerView.setScale(scale); 48 this._paintProfilerView.setScale(scale);
49 } 49 }
50 50
51 _onWindowChanged() { 51 _onWindowChanged() {
52 this._logTreeView.updateWindow(this._paintProfilerView.selectionWindow()); 52 this._logTreeView.updateWindow(this._paintProfilerView.selectionWindow());
53 } 53 }
54 }; 54 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698