Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/sdk/ResourceTreeModel.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/ResourceTreeModel.js b/third_party/WebKit/Source/devtools/front_end/sdk/ResourceTreeModel.js |
| index d70ad805d030110f17e108ddd7e7509b521c45af..6c5f7668d91e344c62fcd84597b3cb0b19bf9370 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/sdk/ResourceTreeModel.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/sdk/ResourceTreeModel.js |
| @@ -53,7 +53,6 @@ WebInspector.ResourceTreeModel = function(target, networkManager, securityOrigin |
| target.registerPageDispatcher(new WebInspector.PageDispatcher(this)); |
| - this._inspectedPageURL = ""; |
| this._pendingReloadOptions = null; |
| this._reloadSuspensionCount = 0; |
| @@ -128,32 +127,14 @@ WebInspector.ResourceTreeModel.prototype = { |
| { |
| if (!error) { |
| this.dispatchEventToListeners(WebInspector.ResourceTreeModel.EventTypes.WillLoadCachedResources); |
| - this._inspectedPageURL = mainFramePayload.frame.url; |
| this._addFramesRecursively(null, mainFramePayload); |
| - this._dispatchInspectedURLChanged(); |
| + this.target().setInspectedURL(mainFramePayload.frame.url); |
| } |
| this._cachedResourcesProcessed = true; |
| this.dispatchEventToListeners(WebInspector.ResourceTreeModel.EventTypes.CachedResourcesLoaded); |
| }, |
| /** |
| - * @return {string} |
| - */ |
| - inspectedPageURL: function() |
| - { |
| - return this._inspectedPageURL; |
| - }, |
| - |
| - /** |
| - * @return {string} |
| - */ |
| - inspectedPageDomain: function() |
| - { |
| - var parsedURL = this._inspectedPageURL ? this._inspectedPageURL.asParsedURL() : null; |
| - return parsedURL ? parsedURL.host : ""; |
| - }, |
| - |
| - /** |
| * @return {boolean} |
| */ |
| cachedResourcesLoaded: function() |
| @@ -161,12 +142,6 @@ WebInspector.ResourceTreeModel.prototype = { |
| return this._cachedResourcesProcessed; |
| }, |
| - _dispatchInspectedURLChanged: function() |
| - { |
| - InspectorFrontendHost.inspectedURLChanged(this._inspectedPageURL); |
| - this.dispatchEventToListeners(WebInspector.ResourceTreeModel.EventTypes.InspectedURLChanged, this._inspectedPageURL); |
| - }, |
| - |
| /** |
| * @param {!WebInspector.ResourceTreeFrame} frame |
| * @param {boolean=} aboutToNavigate |
| @@ -249,7 +224,7 @@ WebInspector.ResourceTreeModel.prototype = { |
| var addedOrigin = frame.securityOrigin; |
| if (frame.isMainFrame()) |
| - this._inspectedPageURL = frame.url; |
| + this.target().setInspectedURL(frame.url); |
|
dgozman
2016/07/27 17:26:06
Let's do this at the end of the method, so that ev
eostroukhov-old
2016/07/27 17:46:58
Done.
|
| this.dispatchEventToListeners(WebInspector.ResourceTreeModel.EventTypes.FrameNavigated, frame); |
| if (frame.isMainFrame()) { |
| @@ -266,9 +241,6 @@ WebInspector.ResourceTreeModel.prototype = { |
| var resources = frame.resources(); |
| for (var i = 0; i < resources.length; ++i) |
| this.dispatchEventToListeners(WebInspector.ResourceTreeModel.EventTypes.ResourceAdded, resources[i]); |
| - |
| - if (frame.isMainFrame()) |
| - this._dispatchInspectedURLChanged(); |
| }, |
| /** |
| @@ -378,8 +350,6 @@ WebInspector.ResourceTreeModel.prototype = { |
| this._addFrame(frame); |
| var frameResource = this._createResourceFromFramePayload(framePayload, framePayload.url, WebInspector.resourceTypes.Document, framePayload.mimeType); |
| - if (frame.isMainFrame()) |
| - this._inspectedPageURL = frameResource.url; |
|
dgozman
2016/07/27 17:26:06
Where did this go?
eostroukhov-old
2016/07/27 17:46:58
This is ultimately only called from _processCached
|
| frame.addResource(frameResource); |
| for (var i = 0; frameTreePayload.childFrames && i < frameTreePayload.childFrames.length; ++i) |