OLD | NEW |
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 14 matching lines...) Expand all Loading... |
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 * @unrestricted | 30 * @unrestricted |
31 */ | 31 */ |
32 Resources.ApplicationCacheModel = class extends SDK.SDKModel { | 32 Resources.ApplicationCacheModel = class extends SDK.SDKModel { |
33 /** | 33 /** |
34 * @param {!SDK.Target} target | 34 * @param {!SDK.Target} target |
| 35 * @param {!Protocol.Dispatcher} dispatcher |
35 */ | 36 */ |
36 constructor(target) { | 37 constructor(target, dispatcher) { |
37 super(target); | 38 super(target, dispatcher); |
38 | 39 |
39 target.registerApplicationCacheDispatcher(new Resources.ApplicationCacheDisp
atcher(this)); | 40 dispatcher.registerApplicationCacheDispatcher(new Resources.ApplicationCache
Dispatcher(this)); |
40 this._agent = target.applicationCacheAgent(); | 41 this._agent = dispatcher.applicationCacheAgent(); |
41 this._agent.enable(); | 42 this._agent.enable(); |
42 | 43 |
43 var resourceTreeModel = target.model(SDK.ResourceTreeModel); | 44 var resourceTreeModel = target.model(SDK.ResourceTreeModel); |
44 resourceTreeModel.addEventListener(SDK.ResourceTreeModel.Events.FrameNavigat
ed, this._frameNavigated, this); | 45 resourceTreeModel.addEventListener(SDK.ResourceTreeModel.Events.FrameNavigat
ed, this._frameNavigated, this); |
45 resourceTreeModel.addEventListener(SDK.ResourceTreeModel.Events.FrameDetache
d, this._frameDetached, this); | 46 resourceTreeModel.addEventListener(SDK.ResourceTreeModel.Events.FrameDetache
d, this._frameDetached, this); |
46 | 47 |
47 this._statuses = {}; | 48 this._statuses = {}; |
48 this._manifestURLsByFrame = {}; | 49 this._manifestURLsByFrame = {}; |
49 | 50 |
50 this._mainFrameNavigated(); | 51 this._mainFrameNavigated(); |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 } | 247 } |
247 | 248 |
248 /** | 249 /** |
249 * @override | 250 * @override |
250 * @param {boolean} isNowOnline | 251 * @param {boolean} isNowOnline |
251 */ | 252 */ |
252 networkStateUpdated(isNowOnline) { | 253 networkStateUpdated(isNowOnline) { |
253 this._applicationCacheModel._networkStateUpdated(isNowOnline); | 254 this._applicationCacheModel._networkStateUpdated(isNowOnline); |
254 } | 255 } |
255 }; | 256 }; |
OLD | NEW |