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 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 12 matching lines...) Expand all Loading... |
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 /** | 31 /** |
32 * @constructor | 32 * @constructor |
33 * @extends {WebInspector.SDKObject} | 33 * @extends {WebInspector.SDKModel} |
34 * @param {!WebInspector.Target} target | 34 * @param {!WebInspector.Target} target |
35 */ | 35 */ |
36 WebInspector.ResourceTreeModel = function(target) | 36 WebInspector.ResourceTreeModel = function(target) |
37 { | 37 { |
38 WebInspector.SDKObject.call(this, target); | 38 WebInspector.SDKModel.call(this, WebInspector.ResourceTreeModel, target); |
39 | 39 |
40 target.networkManager.addEventListener(WebInspector.NetworkManager.EventType
s.RequestFinished, this._onRequestFinished, this); | 40 target.networkManager.addEventListener(WebInspector.NetworkManager.EventType
s.RequestFinished, this._onRequestFinished, this); |
41 target.networkManager.addEventListener(WebInspector.NetworkManager.EventType
s.RequestUpdateDropped, this._onRequestUpdateDropped, this); | 41 target.networkManager.addEventListener(WebInspector.NetworkManager.EventType
s.RequestUpdateDropped, this._onRequestUpdateDropped, this); |
42 | 42 |
43 target.consoleModel.addEventListener(WebInspector.ConsoleModel.Events.Messag
eAdded, this._consoleMessageAdded, this); | 43 target.consoleModel.addEventListener(WebInspector.ConsoleModel.Events.Messag
eAdded, this._consoleMessageAdded, this); |
44 target.consoleModel.addEventListener(WebInspector.ConsoleModel.Events.Consol
eCleared, this._consoleCleared, this); | 44 target.consoleModel.addEventListener(WebInspector.ConsoleModel.Events.Consol
eCleared, this._consoleCleared, this); |
45 | 45 |
46 this._agent = target.pageAgent(); | 46 this._agent = target.pageAgent(); |
47 this._agent.enable(); | 47 this._agent.enable(); |
48 | 48 |
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 * @param {boolean=} ignoreCache | 465 * @param {boolean=} ignoreCache |
466 * @param {string=} scriptToEvaluateOnLoad | 466 * @param {string=} scriptToEvaluateOnLoad |
467 * @param {string=} scriptPreprocessor | 467 * @param {string=} scriptPreprocessor |
468 */ | 468 */ |
469 reloadPage: function(ignoreCache, scriptToEvaluateOnLoad, scriptPreprocessor
) | 469 reloadPage: function(ignoreCache, scriptToEvaluateOnLoad, scriptPreprocessor
) |
470 { | 470 { |
471 this.dispatchEventToListeners(WebInspector.ResourceTreeModel.EventTypes.
WillReloadPage); | 471 this.dispatchEventToListeners(WebInspector.ResourceTreeModel.EventTypes.
WillReloadPage); |
472 this._agent.reload(ignoreCache, scriptToEvaluateOnLoad, scriptPreprocess
or); | 472 this._agent.reload(ignoreCache, scriptToEvaluateOnLoad, scriptPreprocess
or); |
473 }, | 473 }, |
474 | 474 |
475 __proto__: WebInspector.SDKObject.prototype | 475 __proto__: WebInspector.SDKModel.prototype |
476 } | 476 } |
477 | 477 |
478 /** | 478 /** |
479 * @constructor | 479 * @constructor |
480 * @param {!WebInspector.ResourceTreeModel} model | 480 * @param {!WebInspector.ResourceTreeModel} model |
481 * @param {?WebInspector.ResourceTreeFrame} parentFrame | 481 * @param {?WebInspector.ResourceTreeFrame} parentFrame |
482 * @param {!PageAgent.FrameId} frameId | 482 * @param {!PageAgent.FrameId} frameId |
483 * @param {!PageAgent.Frame=} payload | 483 * @param {!PageAgent.Frame=} payload |
484 */ | 484 */ |
485 WebInspector.ResourceTreeFrame = function(model, parentFrame, frameId, payload) | 485 WebInspector.ResourceTreeFrame = function(model, parentFrame, frameId, payload) |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
820 viewportChanged: function(viewport) | 820 viewportChanged: function(viewport) |
821 { | 821 { |
822 this._resourceTreeModel.dispatchEventToListeners(WebInspector.ResourceTr
eeModel.EventTypes.ViewportChanged, viewport); | 822 this._resourceTreeModel.dispatchEventToListeners(WebInspector.ResourceTr
eeModel.EventTypes.ViewportChanged, viewport); |
823 } | 823 } |
824 } | 824 } |
825 | 825 |
826 /** | 826 /** |
827 * @type {!WebInspector.ResourceTreeModel} | 827 * @type {!WebInspector.ResourceTreeModel} |
828 */ | 828 */ |
829 WebInspector.resourceTreeModel; | 829 WebInspector.resourceTreeModel; |
OLD | NEW |