| OLD | NEW | 
|    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  |   16  | 
|   17     /** @type {!Map<!SDK.ServiceWorkerRegistration, !Resources.ServiceWorkersVie
     w.Section>} */ |   17     /** @type {!Map<!SDK.ServiceWorkerRegistration, !Resources.ServiceWorkersVie
     w.Section>} */ | 
|   18     this._sections = new Map(); |   18     this._sections = new Map(); | 
|   19  |   19  | 
|   20     this._toolbar.appendToolbarItem(Components.NetworkConditionsSelector.createO
     fflineToolbarCheckbox()); |   20     this._toolbar.appendToolbarItem(NetworkConditions.NetworkConditionsSelector.
     createOfflineToolbarCheckbox()); | 
|   21     var forceUpdate = new UI.ToolbarCheckbox( |   21     var forceUpdate = new UI.ToolbarCheckbox( | 
|   22         Common.UIString('Update on reload'), Common.UIString('Force update Servi
     ce Worker on page reload'), |   22         Common.UIString('Update on reload'), Common.UIString('Force update Servi
     ce Worker on page reload'), | 
|   23         Common.settings.createSetting('serviceWorkerUpdateOnReload', false)); |   23         Common.settings.createSetting('serviceWorkerUpdateOnReload', false)); | 
|   24     this._toolbar.appendToolbarItem(forceUpdate); |   24     this._toolbar.appendToolbarItem(forceUpdate); | 
|   25     var fallbackToNetwork = new UI.ToolbarCheckbox( |   25     var fallbackToNetwork = new UI.ToolbarCheckbox( | 
|   26         Common.UIString('Bypass for network'), |   26         Common.UIString('Bypass for network'), | 
|   27         Common.UIString('Bypass Service Worker and load resources from the netwo
     rk'), |   27         Common.UIString('Bypass Service Worker and load resources from the netwo
     rk'), | 
|   28         Common.settings.createSetting('bypassServiceWorker', false)); |   28         Common.settings.createSetting('bypassServiceWorker', false)); | 
|   29     this._toolbar.appendToolbarItem(fallbackToNetwork); |   29     this._toolbar.appendToolbarItem(fallbackToNetwork); | 
|   30     this._toolbar.appendSpacer(); |   30     this._toolbar.appendSpacer(); | 
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  455    * @return {!Element} |  455    * @return {!Element} | 
|  456    */ |  456    */ | 
|  457   _wrapWidget(container) { |  457   _wrapWidget(container) { | 
|  458     var shadowRoot = UI.createShadowRootWithCoreStyles(container); |  458     var shadowRoot = UI.createShadowRootWithCoreStyles(container); | 
|  459     UI.appendStyle(shadowRoot, 'resources/serviceWorkersView.css'); |  459     UI.appendStyle(shadowRoot, 'resources/serviceWorkersView.css'); | 
|  460     var contentElement = createElement('div'); |  460     var contentElement = createElement('div'); | 
|  461     shadowRoot.appendChild(contentElement); |  461     shadowRoot.appendChild(contentElement); | 
|  462     return contentElement; |  462     return contentElement; | 
|  463   } |  463   } | 
|  464 }; |  464 }; | 
| OLD | NEW |