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

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

Issue 2417703006: DevTools: introduce a stub for the new audits panel (behind experiment). (Closed)
Patch Set: missing file added. Created 4 years, 2 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
(Empty)
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
3 // found in the LICENSE file.
4
5 /**
6 * @constructor
7 * @extends {WebInspector.Panel}
8 */
9 WebInspector.Audits2Panel = function()
10 {
11 WebInspector.Panel.call(this, "audits2");
12 this.contentElement.classList.add("vbox");
13 this.contentElement.appendChild(createTextButton(WebInspector.UIString("Star t"), this._start.bind(this)));
14 this.contentElement.appendChild(createTextButton(WebInspector.UIString("Stop "), this._stop.bind(this)));
15 }
16
17 WebInspector.Audits2Panel.prototype = {
18 _start: function()
19 {
20 this._backend().then(backend => backend ? backend.send("start") : undefi ned).then(console.error.bind(console, "STARTED"));
21 },
22
23 _stop: function()
24 {
25 this._backend().then(backend => backend ? backend.send("stop") : undefin ed).then(console.error.bind(console, "STOPPED"));
26 },
27
28 /**
29 * @return {!Promise<?WebInspector.ServiceManager.Service>}
30 */
31 _backend: function()
32 {
33 if (!this._backendPromise)
34 this._backendPromise = WebInspector.serviceManager.createAppService( "audits2_worker", "Audits2Service", false);
35 return this._backendPromise;
36 },
37
38 __proto__: WebInspector.Panel.prototype
39 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/BUILD.gn ('k') | third_party/WebKit/Source/devtools/front_end/audits2/module.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698