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

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

Issue 2604883002: DevTools: namespace globals (Closed)
Patch Set: address CL feedback Created 3 years, 11 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 * @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 /**
10 * @param {!Resources.ResourcesPanel} resourcesPanel 10 * @param {!Resources.ResourcesPanel} resourcesPanel
(...skipping 24 matching lines...) Expand all
35 this._appendItem(storage, Common.UIString('Indexed DB'), 'indexeddb'); 35 this._appendItem(storage, Common.UIString('Indexed DB'), 'indexeddb');
36 this._appendItem(storage, Common.UIString('Web SQL'), 'websql'); 36 this._appendItem(storage, Common.UIString('Web SQL'), 'websql');
37 this._appendItem(storage, Common.UIString('Cookies'), 'cookies'); 37 this._appendItem(storage, Common.UIString('Cookies'), 'cookies');
38 38
39 var caches = this._reportView.appendSection(Common.UIString('Cache')); 39 var caches = this._reportView.appendSection(Common.UIString('Cache'));
40 this._appendItem(caches, Common.UIString('Cache storage'), 'cache_storage'); 40 this._appendItem(caches, Common.UIString('Cache storage'), 'cache_storage');
41 this._appendItem(caches, Common.UIString('Application cache'), 'appcache'); 41 this._appendItem(caches, Common.UIString('Application cache'), 'appcache');
42 42
43 SDK.targetManager.observeTargets(this, SDK.Target.Capability.Browser); 43 SDK.targetManager.observeTargets(this, SDK.Target.Capability.Browser);
44 var footer = this._reportView.appendSection('', 'clear-storage-button').appe ndRow(); 44 var footer = this._reportView.appendSection('', 'clear-storage-button').appe ndRow();
45 this._clearButton = createTextButton( 45 this._clearButton = UI.createTextButton(
46 Common.UIString('Clear site data'), this._clear.bind(this), Common.UIStr ing('Clear site data')); 46 Common.UIString('Clear site data'), this._clear.bind(this), Common.UIStr ing('Clear site data'));
47 footer.appendChild(this._clearButton); 47 footer.appendChild(this._clearButton);
48 } 48 }
49 49
50 /** 50 /**
51 * @param {!UI.ReportView.Section} section 51 * @param {!UI.ReportView.Section} section
52 * @param {string} title 52 * @param {string} title
53 * @param {string} settingName 53 * @param {string} settingName
54 */ 54 */
55 _appendItem(section, title, settingName) { 55 _appendItem(section, title, settingName) {
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 } 149 }
150 150
151 this._clearButton.disabled = true; 151 this._clearButton.disabled = true;
152 this._clearButton.textContent = Common.UIString('Clearing...'); 152 this._clearButton.textContent = Common.UIString('Clearing...');
153 setTimeout(() => { 153 setTimeout(() => {
154 this._clearButton.disabled = false; 154 this._clearButton.disabled = false;
155 this._clearButton.textContent = Common.UIString('Clear selected'); 155 this._clearButton.textContent = Common.UIString('Clear selected');
156 }, 500); 156 }, 500);
157 } 157 }
158 }; 158 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698