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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/PaintProfiler.js

Issue 2600323002: DevTools: extract protocol module (Closed)
Patch Set: move inspector backend commands.js Created 3 years, 11 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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 replay(firstStep, lastStep, scale) { 93 replay(firstStep, lastStep, scale) {
94 return this._target.layerTreeAgent().replaySnapshot( 94 return this._target.layerTreeAgent().replaySnapshot(
95 this._id, firstStep || undefined, lastStep || undefined, scale || 1.0, ( error, str) => error ? null : str); 95 this._id, firstStep || undefined, lastStep || undefined, scale || 1.0, ( error, str) => error ? null : str);
96 } 96 }
97 97
98 /** 98 /**
99 * @param {?Protocol.DOM.Rect} clipRect 99 * @param {?Protocol.DOM.Rect} clipRect
100 * @param {function(!Array.<!Protocol.LayerTree.PaintProfile>=)} callback 100 * @param {function(!Array.<!Protocol.LayerTree.PaintProfile>=)} callback
101 */ 101 */
102 profile(clipRect, callback) { 102 profile(clipRect, callback) {
103 var wrappedCallback = InspectorBackend.wrapClientCallback(callback, 'Protoco l.LayerTree.profileSnapshot(): '); 103 var wrappedCallback =
104 Protocol.inspectorBackend.wrapClientCallback(callback, 'Protocol.LayerTr ee.profileSnapshot(): ');
104 this._target.layerTreeAgent().profileSnapshot(this._id, 5, 1, clipRect || un defined, wrappedCallback); 105 this._target.layerTreeAgent().profileSnapshot(this._id, 5, 1, clipRect || un defined, wrappedCallback);
105 } 106 }
106 107
107 /** 108 /**
108 * @return {!Promise<?Array<!SDK.PaintProfilerLogItem>>} 109 * @return {!Promise<?Array<!SDK.PaintProfilerLogItem>>}
109 */ 110 */
110 commandLog() { 111 commandLog() {
111 return this._target.layerTreeAgent().snapshotCommandLog(this._id, processLog ); 112 return this._target.layerTreeAgent().snapshotCommandLog(this._id, processLog );
112 113
113 /** 114 /**
(...skipping 23 matching lines...) Expand all
137 /** 138 /**
138 * @param {!SDK.RawPaintProfilerLogItem} rawEntry 139 * @param {!SDK.RawPaintProfilerLogItem} rawEntry
139 * @param {number} commandIndex 140 * @param {number} commandIndex
140 */ 141 */
141 constructor(rawEntry, commandIndex) { 142 constructor(rawEntry, commandIndex) {
142 this.method = rawEntry.method; 143 this.method = rawEntry.method;
143 this.params = rawEntry.params; 144 this.params = rawEntry.params;
144 this.commandIndex = commandIndex; 145 this.commandIndex = commandIndex;
145 } 146 }
146 }; 147 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698