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

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

Issue 2250473002: DevTools: Repick execution context when frames are loaded (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename fire event 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 * * 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 this._agent = target.pageAgent(); 48 this._agent = target.pageAgent();
49 this._agent.enable(); 49 this._agent.enable();
50 this._securityOriginManager = securityOriginManager; 50 this._securityOriginManager = securityOriginManager;
51 51
52 this._fetchResourceTree(); 52 this._fetchResourceTree();
53 53
54 target.registerPageDispatcher(new WebInspector.PageDispatcher(this)); 54 target.registerPageDispatcher(new WebInspector.PageDispatcher(this));
55 55
56 this._pendingReloadOptions = null; 56 this._pendingReloadOptions = null;
57 this._reloadSuspensionCount = 0; 57 this._reloadSuspensionCount = 0;
58 this._fireExecutionContextOrderChanged = target.runtimeModel.fireExecutionCo ntextOrderChanged.bind(target.runtimeModel);
58 59
59 target.runtimeModel.setExecutionContextComparator(this._executionContextComp arator.bind(this)); 60 target.runtimeModel.setExecutionContextComparator(this._executionContextComp arator.bind(this));
60 } 61 }
61 62
62 WebInspector.ResourceTreeModel.EventTypes = { 63 WebInspector.ResourceTreeModel.EventTypes = {
63 FrameAdded: "FrameAdded", 64 FrameAdded: "FrameAdded",
64 FrameNavigated: "FrameNavigated", 65 FrameNavigated: "FrameNavigated",
65 FrameDetached: "FrameDetached", 66 FrameDetached: "FrameDetached",
66 FrameResized: "FrameResized", 67 FrameResized: "FrameResized",
67 FrameWillNavigate: "FrameWillNavigate", 68 FrameWillNavigate: "FrameWillNavigate",
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 }, 126 },
126 127
127 _processCachedResources: function(error, mainFramePayload) 128 _processCachedResources: function(error, mainFramePayload)
128 { 129 {
129 if (!error) { 130 if (!error) {
130 this.dispatchEventToListeners(WebInspector.ResourceTreeModel.EventTy pes.WillLoadCachedResources); 131 this.dispatchEventToListeners(WebInspector.ResourceTreeModel.EventTy pes.WillLoadCachedResources);
131 this._addFramesRecursively(null, mainFramePayload); 132 this._addFramesRecursively(null, mainFramePayload);
132 this.target().setInspectedURL(mainFramePayload.frame.url); 133 this.target().setInspectedURL(mainFramePayload.frame.url);
133 } 134 }
134 this._cachedResourcesProcessed = true; 135 this._cachedResourcesProcessed = true;
136 this._fireExecutionContextOrderChanged();
135 this.dispatchEventToListeners(WebInspector.ResourceTreeModel.EventTypes. CachedResourcesLoaded); 137 this.dispatchEventToListeners(WebInspector.ResourceTreeModel.EventTypes. CachedResourcesLoaded);
136 }, 138 },
137 139
138 /** 140 /**
139 * @return {boolean} 141 * @return {boolean}
140 */ 142 */
141 cachedResourcesLoaded: function() 143 cachedResourcesLoaded: function()
142 { 144 {
143 return this._cachedResourcesProcessed; 145 return this._cachedResourcesProcessed;
144 }, 146 },
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after
932 934
933 /** 935 /**
934 * @override 936 * @override
935 */ 937 */
936 navigationRequested: function() 938 navigationRequested: function()
937 { 939 {
938 // Frontend is not interested in when navigations are requested. 940 // Frontend is not interested in when navigations are requested.
939 } 941 }
940 942
941 } 943 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698