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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 ResourceAdded: "ResourceAdded", | 64 ResourceAdded: "ResourceAdded", |
65 WillLoadCachedResources: "WillLoadCachedResources", | 65 WillLoadCachedResources: "WillLoadCachedResources", |
66 CachedResourcesLoaded: "CachedResourcesLoaded", | 66 CachedResourcesLoaded: "CachedResourcesLoaded", |
67 DOMContentLoaded: "DOMContentLoaded", | 67 DOMContentLoaded: "DOMContentLoaded", |
68 Load: "Load", | 68 Load: "Load", |
69 WillReloadPage: "WillReloadPage", | 69 WillReloadPage: "WillReloadPage", |
70 InspectedURLChanged: "InspectedURLChanged", | 70 InspectedURLChanged: "InspectedURLChanged", |
71 SecurityOriginAdded: "SecurityOriginAdded", | 71 SecurityOriginAdded: "SecurityOriginAdded", |
72 SecurityOriginRemoved: "SecurityOriginRemoved", | 72 SecurityOriginRemoved: "SecurityOriginRemoved", |
73 ScreencastFrame: "ScreencastFrame", | 73 ScreencastFrame: "ScreencastFrame", |
74 ScreencastVisibilityChanged: "ScreencastVisibilityChanged" | 74 ScreencastVisibilityChanged: "ScreencastVisibilityChanged", |
| 75 ViewportChanged: "ViewportChanged" |
75 } | 76 } |
76 | 77 |
77 WebInspector.ResourceTreeModel.prototype = { | 78 WebInspector.ResourceTreeModel.prototype = { |
78 _fetchResourceTree: function() | 79 _fetchResourceTree: function() |
79 { | 80 { |
80 /** @type {!Object.<string, !WebInspector.ResourceTreeFrame>} */ | 81 /** @type {!Object.<string, !WebInspector.ResourceTreeFrame>} */ |
81 this._frames = {}; | 82 this._frames = {}; |
82 delete this._cachedResourcesProcessed; | 83 delete this._cachedResourcesProcessed; |
83 this._agent.getResourceTree(this._processCachedResources.bind(this)); | 84 this._agent.getResourceTree(this._processCachedResources.bind(this)); |
84 }, | 85 }, |
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
804 { | 805 { |
805 this._resourceTreeModel.dispatchEventToListeners(WebInspector.ResourceTr
eeModel.EventTypes.ScreencastFrame, {data:data, metadata:metadata}); | 806 this._resourceTreeModel.dispatchEventToListeners(WebInspector.ResourceTr
eeModel.EventTypes.ScreencastFrame, {data:data, metadata:metadata}); |
806 }, | 807 }, |
807 | 808 |
808 /** | 809 /** |
809 * @param {boolean} visible | 810 * @param {boolean} visible |
810 */ | 811 */ |
811 screencastVisibilityChanged: function(visible) | 812 screencastVisibilityChanged: function(visible) |
812 { | 813 { |
813 this._resourceTreeModel.dispatchEventToListeners(WebInspector.ResourceTr
eeModel.EventTypes.ScreencastVisibilityChanged, {visible:visible}); | 814 this._resourceTreeModel.dispatchEventToListeners(WebInspector.ResourceTr
eeModel.EventTypes.ScreencastVisibilityChanged, {visible:visible}); |
| 815 }, |
| 816 |
| 817 /** |
| 818 * @param {!PageAgent.Viewport=} viewport |
| 819 */ |
| 820 viewportChanged: function(viewport) |
| 821 { |
| 822 this._resourceTreeModel.dispatchEventToListeners(WebInspector.ResourceTr
eeModel.EventTypes.ViewportChanged, viewport); |
814 } | 823 } |
815 } | 824 } |
816 | 825 |
817 /** | 826 /** |
818 * @type {!WebInspector.ResourceTreeModel} | 827 * @type {!WebInspector.ResourceTreeModel} |
819 */ | 828 */ |
820 WebInspector.resourceTreeModel; | 829 WebInspector.resourceTreeModel; |
OLD | NEW |