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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/ServiceWorkerCacheModel.js

Issue 2562453003: [DevTools] Remove Common.Event.target field. (Closed)
Patch Set: works 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 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 * @unrestricted 5 * @unrestricted
6 */ 6 */
7 SDK.ServiceWorkerCacheModel = class extends SDK.SDKModel { 7 SDK.ServiceWorkerCacheModel = class extends SDK.SDKModel {
8 /** 8 /**
9 * Invariant: This model can only be constructed on a ServiceWorker target. 9 * Invariant: This model can only be constructed on a ServiceWorker target.
10 * @param {!SDK.Target} target 10 * @param {!SDK.Target} target
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 */ 227 */
228 _securityOriginRemoved(event) { 228 _securityOriginRemoved(event) {
229 var securityOrigin = /** @type {string} */ (event.data); 229 var securityOrigin = /** @type {string} */ (event.data);
230 this._removeOrigin(securityOrigin); 230 this._removeOrigin(securityOrigin);
231 } 231 }
232 232
233 /** 233 /**
234 * @param {!SDK.ServiceWorkerCacheModel.Cache} cache 234 * @param {!SDK.ServiceWorkerCacheModel.Cache} cache
235 */ 235 */
236 _cacheAdded(cache) { 236 _cacheAdded(cache) {
237 this.dispatchEventToListeners(SDK.ServiceWorkerCacheModel.Events.CacheAdded, cache); 237 this.dispatchEventToListeners(SDK.ServiceWorkerCacheModel.Events.CacheAdded, {model: this, cache: cache});
238 } 238 }
239 239
240 /** 240 /**
241 * @param {!SDK.ServiceWorkerCacheModel.Cache} cache 241 * @param {!SDK.ServiceWorkerCacheModel.Cache} cache
242 */ 242 */
243 _cacheRemoved(cache) { 243 _cacheRemoved(cache) {
244 this.dispatchEventToListeners(SDK.ServiceWorkerCacheModel.Events.CacheRemove d, cache); 244 this.dispatchEventToListeners(SDK.ServiceWorkerCacheModel.Events.CacheRemove d, {model: this, cache: cache});
245 } 245 }
246 246
247 /** 247 /**
248 * @param {!SDK.ServiceWorkerCacheModel.Cache} cache 248 * @param {!SDK.ServiceWorkerCacheModel.Cache} cache
249 * @param {number} skipCount 249 * @param {number} skipCount
250 * @param {number} pageSize 250 * @param {number} pageSize
251 * @param {function(!Array.<!SDK.ServiceWorkerCacheModel.Entry>, boolean)} cal lback 251 * @param {function(!Array.<!SDK.ServiceWorkerCacheModel.Entry>, boolean)} cal lback
252 */ 252 */
253 _requestEntries(cache, skipCount, pageSize, callback) { 253 _requestEntries(cache, skipCount, pageSize, callback) {
254 /** 254 /**
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 } 315 }
316 316
317 /** 317 /**
318 * @override 318 * @override
319 * @return {string} 319 * @return {string}
320 */ 320 */
321 toString() { 321 toString() {
322 return this.securityOrigin + this.cacheName; 322 return this.securityOrigin + this.cacheName;
323 } 323 }
324 }; 324 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698