| 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 10 matching lines...) Expand all Loading... |
| 21 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 21 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 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.TargetAwareObject} | 31 * @extends {WebInspector.SDKObject} |
| 32 * @param {!WebInspector.Target} target | 32 * @param {!WebInspector.Target} target |
| 33 */ | 33 */ |
| 34 WebInspector.ApplicationCacheModel = function(target) | 34 WebInspector.ApplicationCacheModel = function(target) |
| 35 { | 35 { |
| 36 WebInspector.TargetAwareObject.call(this, target); | 36 WebInspector.SDKObject.call(this, target); |
| 37 | 37 |
| 38 target.registerApplicationCacheDispatcher(new WebInspector.ApplicationCacheD
ispatcher(this)); | 38 target.registerApplicationCacheDispatcher(new WebInspector.ApplicationCacheD
ispatcher(this)); |
| 39 this._agent = target.applicationCacheAgent(); | 39 this._agent = target.applicationCacheAgent(); |
| 40 this._agent.enable(); | 40 this._agent.enable(); |
| 41 | 41 |
| 42 target.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.Eve
ntTypes.FrameNavigated, this._frameNavigated, this); | 42 target.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.Eve
ntTypes.FrameNavigated, this._frameNavigated, this); |
| 43 target.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.Eve
ntTypes.FrameDetached, this._frameDetached, this); | 43 target.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.Eve
ntTypes.FrameDetached, this._frameDetached, this); |
| 44 | 44 |
| 45 this._statuses = {}; | 45 this._statuses = {}; |
| 46 this._manifestURLsByFrame = {}; | 46 this._manifestURLsByFrame = {}; |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 | 221 |
| 222 /** | 222 /** |
| 223 * @param {boolean} isNowOnline | 223 * @param {boolean} isNowOnline |
| 224 */ | 224 */ |
| 225 _networkStateUpdated: function(isNowOnline) | 225 _networkStateUpdated: function(isNowOnline) |
| 226 { | 226 { |
| 227 this._onLine = isNowOnline; | 227 this._onLine = isNowOnline; |
| 228 this.dispatchEventToListeners(WebInspector.ApplicationCacheModel.EventTy
pes.NetworkStateChanged, isNowOnline); | 228 this.dispatchEventToListeners(WebInspector.ApplicationCacheModel.EventTy
pes.NetworkStateChanged, isNowOnline); |
| 229 }, | 229 }, |
| 230 | 230 |
| 231 __proto__: WebInspector.TargetAwareObject.prototype | 231 __proto__: WebInspector.SDKObject.prototype |
| 232 } | 232 } |
| 233 | 233 |
| 234 /** | 234 /** |
| 235 * @constructor | 235 * @constructor |
| 236 * @implements {ApplicationCacheAgent.Dispatcher} | 236 * @implements {ApplicationCacheAgent.Dispatcher} |
| 237 */ | 237 */ |
| 238 WebInspector.ApplicationCacheDispatcher = function(applicationCacheModel) | 238 WebInspector.ApplicationCacheDispatcher = function(applicationCacheModel) |
| 239 { | 239 { |
| 240 this._applicationCacheModel = applicationCacheModel; | 240 this._applicationCacheModel = applicationCacheModel; |
| 241 } | 241 } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 252 }, | 252 }, |
| 253 | 253 |
| 254 /** | 254 /** |
| 255 * @param {boolean} isNowOnline | 255 * @param {boolean} isNowOnline |
| 256 */ | 256 */ |
| 257 networkStateUpdated: function(isNowOnline) | 257 networkStateUpdated: function(isNowOnline) |
| 258 { | 258 { |
| 259 this._applicationCacheModel._networkStateUpdated(isNowOnline); | 259 this._applicationCacheModel._networkStateUpdated(isNowOnline); |
| 260 } | 260 } |
| 261 } | 261 } |
| OLD | NEW |