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

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

Issue 2168323002: [DevTools] Explicitly require ResourceTreeModel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: [DevTools] Explicitly require ResourceTreeModel Created 4 years, 4 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 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 10 *
(...skipping 12 matching lines...) Expand all
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */ 27 */
28 28
29 /** 29 /**
30 * @constructor 30 * @constructor
31 * @extends {WebInspector.SDKModel} 31 * @extends {WebInspector.SDKModel}
32 * @param {!WebInspector.Target} target 32 * @param {!WebInspector.Target} target
33 * @param {!WebInspector.ResourceTreeModel} resourceTreeModel
33 */ 34 */
34 WebInspector.ApplicationCacheModel = function(target) 35 WebInspector.ApplicationCacheModel = function(target, resourceTreeModel)
35 { 36 {
36 WebInspector.SDKModel.call(this, WebInspector.ApplicationCacheModel, target) ; 37 WebInspector.SDKModel.call(this, WebInspector.ApplicationCacheModel, target) ;
37 38
38 target.registerApplicationCacheDispatcher(new WebInspector.ApplicationCacheD ispatcher(this)); 39 target.registerApplicationCacheDispatcher(new WebInspector.ApplicationCacheD ispatcher(this));
39 this._agent = target.applicationCacheAgent(); 40 this._agent = target.applicationCacheAgent();
40 this._agent.enable(); 41 this._agent.enable();
41 42
42 target.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.Eve ntTypes.FrameNavigated, this._frameNavigated, this); 43 resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes .FrameNavigated, this._frameNavigated, this);
43 target.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.Eve ntTypes.FrameDetached, this._frameDetached, this); 44 resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes .FrameDetached, this._frameDetached, this);
44 45
45 this._statuses = {}; 46 this._statuses = {};
46 this._manifestURLsByFrame = {}; 47 this._manifestURLsByFrame = {};
47 48
48 this._mainFrameNavigated(); 49 this._mainFrameNavigated();
49 this._onLine = true; 50 this._onLine = true;
50 } 51 }
51 52
52 WebInspector.ApplicationCacheModel.EventTypes = { 53 WebInspector.ApplicationCacheModel.EventTypes = {
53 FrameManifestStatusUpdated: "FrameManifestStatusUpdated", 54 FrameManifestStatusUpdated: "FrameManifestStatusUpdated",
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 } 270 }
270 271
271 /** 272 /**
272 * @param {!WebInspector.Target} target 273 * @param {!WebInspector.Target} target
273 * @return {?WebInspector.ApplicationCacheModel} 274 * @return {?WebInspector.ApplicationCacheModel}
274 */ 275 */
275 WebInspector.ApplicationCacheModel.fromTarget = function(target) 276 WebInspector.ApplicationCacheModel.fromTarget = function(target)
276 { 277 {
277 return /** @type {?WebInspector.ApplicationCacheModel} */ (target.model(WebI nspector.ApplicationCacheModel)); 278 return /** @type {?WebInspector.ApplicationCacheModel} */ (target.model(WebI nspector.ApplicationCacheModel));
278 } 279 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698