| OLD | NEW |
| 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 * @implements {SDK.TargetManager.Observer} | 5 * @implements {SDK.TargetManager.Observer} |
| 6 * @unrestricted | 6 * @unrestricted |
| 7 */ | 7 */ |
| 8 Resources.ClearStorageView = class extends UI.VBox { | 8 Resources.ClearStorageView = class extends UI.VBox { |
| 9 /** | 9 constructor() { |
| 10 * @param {!Resources.ResourcesPanel} resourcesPanel | |
| 11 */ | |
| 12 constructor(resourcesPanel) { | |
| 13 super(true); | 10 super(true); |
| 14 | 11 |
| 15 this._resourcesPanel = resourcesPanel; | |
| 16 this._reportView = new UI.ReportView(Common.UIString('Clear storage')); | 12 this._reportView = new UI.ReportView(Common.UIString('Clear storage')); |
| 17 this._reportView.registerRequiredCSS('resources/clearStorageView.css'); | 13 this._reportView.registerRequiredCSS('resources/clearStorageView.css'); |
| 18 this._reportView.element.classList.add('clear-storage-header'); | 14 this._reportView.element.classList.add('clear-storage-header'); |
| 19 this._reportView.show(this.contentElement); | 15 this._reportView.show(this.contentElement); |
| 20 | 16 |
| 21 this._settings = new Map(); | 17 this._settings = new Map(); |
| 22 for (var type | 18 for (var type |
| 23 of [Protocol.Storage.StorageType.Appcache, Protocol.Storage.Storage
Type.Cache_storage, | 19 of [Protocol.Storage.StorageType.Appcache, Protocol.Storage.Storage
Type.Cache_storage, |
| 24 Protocol.Storage.StorageType.Cookies, Protocol.Storage.StorageT
ype.Indexeddb, | 20 Protocol.Storage.StorageType.Cookies, Protocol.Storage.StorageT
ype.Indexeddb, |
| 25 Protocol.Storage.StorageType.Local_storage, Protocol.Storage.St
orageType.Service_workers, | 21 Protocol.Storage.StorageType.Local_storage, Protocol.Storage.St
orageType.Service_workers, |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 | 146 |
| 151 this._clearButton.disabled = true; | 147 this._clearButton.disabled = true; |
| 152 var label = this._clearButton.textContent; | 148 var label = this._clearButton.textContent; |
| 153 this._clearButton.textContent = Common.UIString('Clearing...'); | 149 this._clearButton.textContent = Common.UIString('Clearing...'); |
| 154 setTimeout(() => { | 150 setTimeout(() => { |
| 155 this._clearButton.disabled = false; | 151 this._clearButton.disabled = false; |
| 156 this._clearButton.textContent = label; | 152 this._clearButton.textContent = label; |
| 157 }, 500); | 153 }, 500); |
| 158 } | 154 } |
| 159 }; | 155 }; |
| OLD | NEW |