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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/audits2/Audits2Panel.js

Issue 2815003002: [DevTools] Split InputModel out of screencast (Closed)
Patch Set: comments addressed Created 3 years, 8 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 (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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 * @typedef {{ 6 * @typedef {{
7 * lighthouseVersion: !string, 7 * lighthouseVersion: !string,
8 * generatedTime: !string, 8 * generatedTime: !string,
9 * initialUrl: !string, 9 * initialUrl: !string,
10 * url: !string, 10 * url: !string,
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 this._statusElement.textContent = statusMessage; 135 this._statusElement.textContent = statusMessage;
136 } 136 }
137 137
138 /** 138 /**
139 * @return {!Promise<undefined>} 139 * @return {!Promise<undefined>}
140 */ 140 */
141 _stop() { 141 _stop() {
142 return this._protocolService.detach().then(_ => { 142 return this._protocolService.detach().then(_ => {
143 this._auditRunning = false; 143 this._auditRunning = false;
144 this._updateButton(); 144 this._updateButton();
145 if (this._inspectedURL !== SDK.targetManager.mainTarget().inspectedURL()) 145 var resourceTreeModel = SDK.targetManager.mainTarget().model(SDK.ResourceT reeModel);
146 SDK.targetManager.mainTarget().pageAgent().navigate(this._inspectedURL); 146 if (resourceTreeModel && this._inspectedURL !== SDK.targetManager.mainTarg et().inspectedURL())
147 resourceTreeModel.navigate(this._inspectedURL);
147 148
148 }); 149 });
149 } 150 }
150 151
151 /** 152 /**
152 * @param {!Audits2.WorkerResult} workerResult 153 * @param {!Audits2.WorkerResult} workerResult
153 */ 154 */
154 _finish(workerResult) { 155 _finish(workerResult) {
155 if (workerResult === null) { 156 if (workerResult === null) {
156 this._updateStatus(Common.UIString('Auditing failed.')); 157 this._updateStatus(Common.UIString('Auditing failed.'));
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 * @param {!Object=} params 284 * @param {!Object=} params
284 * @return {!Promise<!Audits2.WorkerResult|undefined>} 285 * @return {!Promise<!Audits2.WorkerResult|undefined>}
285 */ 286 */
286 _send(method, params) { 287 _send(method, params) {
287 if (!this._backendPromise) 288 if (!this._backendPromise)
288 this._initWorker(); 289 this._initWorker();
289 290
290 return this._backendPromise.then(_ => this._backend.send(method, params)); 291 return this._backendPromise.then(_ => this._backend.send(method, params));
291 } 292 }
292 }; 293 };
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/BUILD.gn ('k') | third_party/WebKit/Source/devtools/front_end/screencast/InputModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698