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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/resources/ServiceWorkersView.js

Issue 2523823003: [DevTools] Do not collapse toolbars (Closed)
Patch Set: Right aligned the "show all" checkbox Created 4 years 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) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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 * @implements {SDK.TargetManager.Observer} 5 * @implements {SDK.TargetManager.Observer}
6 * @unrestricted 6 * @unrestricted
7 */ 7 */
8 Resources.ServiceWorkersView = class extends UI.VBox { 8 Resources.ServiceWorkersView = class extends UI.VBox {
9 constructor() { 9 constructor() {
10 super(true); 10 super(true);
11 11
12 this._reportView = new UI.ReportView(Common.UIString('Service Workers')); 12 this._reportView = new UI.ReportView(Common.UIString('Service Workers'));
13 this._reportView.show(this.contentElement); 13 this._reportView.show(this.contentElement);
14 14
15 this._toolbar = this._reportView.createToolbar(); 15 this._toolbar = this._reportView.createToolbar();
16 this._toolbar.makeWrappable();
pfeldman 2017/02/23 21:12:15 Let's make 'growVertically' a parameter of makeWra
eostroukhov 2017/02/24 01:12:39 Done.
17 this._toolbar.growVertically();
16 18
17 /** @type {!Map<!SDK.ServiceWorkerRegistration, !Resources.ServiceWorkersVie w.Section>} */ 19 /** @type {!Map<!SDK.ServiceWorkerRegistration, !Resources.ServiceWorkersVie w.Section>} */
18 this._sections = new Map(); 20 this._sections = new Map();
19 21
20 this._toolbar.appendToolbarItem(Components.NetworkConditionsSelector.createO fflineToolbarCheckbox()); 22 this._toolbar.appendToolbarItem(Components.NetworkConditionsSelector.createO fflineToolbarCheckbox());
21 var forceUpdate = new UI.ToolbarCheckbox( 23 var forceUpdate = new UI.ToolbarCheckbox(
22 Common.UIString('Update on reload'), Common.UIString('Force update Servi ce Worker on page reload'), 24 Common.UIString('Update on reload'), Common.UIString('Force update Servi ce Worker on page reload'),
23 Common.settings.createSetting('serviceWorkerUpdateOnReload', false)); 25 Common.settings.createSetting('serviceWorkerUpdateOnReload', false));
24 this._toolbar.appendToolbarItem(forceUpdate); 26 this._toolbar.appendToolbarItem(forceUpdate);
25 var fallbackToNetwork = new UI.ToolbarCheckbox( 27 var fallbackToNetwork = new UI.ToolbarCheckbox(
26 Common.UIString('Bypass for network'), 28 Common.UIString('Bypass for network'),
27 Common.UIString('Bypass Service Worker and load resources from the netwo rk'), 29 Common.UIString('Bypass Service Worker and load resources from the netwo rk'),
28 Common.settings.createSetting('bypassServiceWorker', false)); 30 Common.settings.createSetting('bypassServiceWorker', false));
29 this._toolbar.appendToolbarItem(fallbackToNetwork); 31 this._toolbar.appendToolbarItem(fallbackToNetwork);
30 this._toolbar.appendSpacer();
31 this._showAllCheckbox = new UI.ToolbarCheckbox( 32 this._showAllCheckbox = new UI.ToolbarCheckbox(
32 Common.UIString('Show all'), Common.UIString('Show all Service Workers r egardless of the origin')); 33 Common.UIString('Show all'), Common.UIString('Show all Service Workers r egardless of the origin'));
34 this._showAllCheckbox.setRightAligned(true);
33 this._showAllCheckbox.inputElement.addEventListener('change', this._updateSe ctionVisibility.bind(this), false); 35 this._showAllCheckbox.inputElement.addEventListener('change', this._updateSe ctionVisibility.bind(this), false);
34 this._toolbar.appendToolbarItem(this._showAllCheckbox); 36 this._toolbar.appendToolbarItem(this._showAllCheckbox);
35 37
36 /** @type {!Map<!SDK.Target, !Array<!Common.EventTarget.EventDescriptor>>}*/ 38 /** @type {!Map<!SDK.Target, !Array<!Common.EventTarget.EventDescriptor>>}*/
37 this._eventListeners = new Map(); 39 this._eventListeners = new Map();
38 SDK.targetManager.observeTargets(this); 40 SDK.targetManager.observeTargets(this);
39 } 41 }
40 42
41 /** 43 /**
42 * @override 44 * @override
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 shadowRoot.appendChild(contentElement); 420 shadowRoot.appendChild(contentElement);
419 return contentElement; 421 return contentElement;
420 } 422 }
421 423
422 _dispose() { 424 _dispose() {
423 this._linkifier.dispose(); 425 this._linkifier.dispose();
424 if (this._pendingUpdate) 426 if (this._pendingUpdate)
425 clearTimeout(this._pendingUpdate); 427 clearTimeout(this._pendingUpdate);
426 } 428 }
427 }; 429 };
OLDNEW
« no previous file with comments | « chrome/browser/resources/inspect/inspect.css ('k') | third_party/WebKit/Source/devtools/front_end/ui/Toolbar.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698