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

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

Issue 2916193003: [CacheStorage] [IndexedDB] [DevTools] Added refresh button to category view of cache storage and in… (Closed)
Patch Set: Created 3 years, 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 /**
5 * @unrestricted 6 * @unrestricted
6 */ 7 */
8 Resources.ServiceWorkerCategoryView = class extends UI.VBox {
9 /**
10 * @param {function()} refreshCaches
11 */
12 constructor(refreshCaches) {
13 super();
14
15 this._reportView = new UI.ReportView('Cache Storage');
dgozman 2017/06/02 18:36:52 Do we actually need a report view? Let's just add
16 this._reportView.show(this.contentElement);
17
18 var footer = this._reportView.appendSection('').appendRow();
19 this._refreshButton = UI.createTextButton(
20 Common.UIString('Refresh Caches'), () => refreshCaches(), Common.UIStrin g('Refresh Caches'));
21 footer.appendChild(this._refreshButton);
22 }
23 };
24
25 /**
26 * @unrestricted
27 */
7 Resources.ServiceWorkerCacheView = class extends UI.SimpleView { 28 Resources.ServiceWorkerCacheView = class extends UI.SimpleView {
8 /** 29 /**
9 * @param {!SDK.ServiceWorkerCacheModel} model 30 * @param {!SDK.ServiceWorkerCacheModel} model
10 * @param {!SDK.ServiceWorkerCacheModel.Cache} cache 31 * @param {!SDK.ServiceWorkerCacheModel.Cache} cache
11 */ 32 */
12 constructor(model, cache) { 33 constructor(model, cache) {
13 super(Common.UIString('Cache')); 34 super(Common.UIString('Cache'));
14 this.registerRequiredCSS('resources/serviceWorkerCacheViews.css'); 35 this.registerRequiredCSS('resources/serviceWorkerCacheViews.css');
15 36
16 this._model = model; 37 this._model = model;
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 */ 171 */
151 syncToolbarItems() { 172 syncToolbarItems() {
152 return [this._refreshButton]; 173 return [this._refreshButton];
153 } 174 }
154 175
155 clear() { 176 clear() {
156 this._dataGrid.rootNode().removeChildren(); 177 this._dataGrid.rootNode().removeChildren();
157 this._entries = []; 178 this._entries = [];
158 } 179 }
159 }; 180 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698