Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/workspace/Workspace.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/workspace/Workspace.js b/third_party/WebKit/Source/devtools/front_end/workspace/Workspace.js |
| index a5f0c67000bc85d08d2f6e4d05460c27c9e740b2..538a69af4b1b2f932bb762c1d6f0bd4915370cc6 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/workspace/Workspace.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/workspace/Workspace.js |
| @@ -181,10 +181,10 @@ WebInspector.Project.prototype = { |
| uiSourceCode: function(path) { }, |
| /** |
| - * @param {string} originURL |
| + * @param {string} url |
| * @return {?WebInspector.UISourceCode} |
| */ |
| - uiSourceCodeForOriginURL: function(originURL) { }, |
| + uiSourceCodeForURL: function(url) { }, |
| /** |
| * @return {!Array.<!WebInspector.UISourceCode>} |
| @@ -277,7 +277,7 @@ WebInspector.ProjectStore.prototype = { |
| */ |
| addUISourceCode: function(uiSourceCode, replace) |
| { |
| - var path = uiSourceCode.path(); |
| + var path = uiSourceCode.url(); |
|
dgozman
2016/01/08 20:22:07
path -> url
|
| if (this.uiSourceCode(path)) { |
| if (replace) |
| this.removeUISourceCode(path); |
| @@ -302,7 +302,7 @@ WebInspector.ProjectStore.prototype = { |
| var entry = this._uiSourceCodesMap.get(path); |
| var movedUISourceCode = this._uiSourceCodesList[this._uiSourceCodesList.length - 1]; |
| this._uiSourceCodesList[entry.index] = movedUISourceCode; |
| - var movedEntry = this._uiSourceCodesMap.get(movedUISourceCode.path()); |
| + var movedEntry = this._uiSourceCodesMap.get(movedUISourceCode.url()); |
| movedEntry.index = entry.index; |
| this._uiSourceCodesList.splice(this._uiSourceCodesList.length - 1, 1); |
| this._uiSourceCodesMap.delete(path); |
| @@ -327,14 +327,14 @@ WebInspector.ProjectStore.prototype = { |
| }, |
| /** |
| - * @param {string} originURL |
| + * @param {string} url |
| * @return {?WebInspector.UISourceCode} |
| */ |
| - uiSourceCodeForOriginURL: function(originURL) |
| + uiSourceCodeForURL: function(url) |
| { |
| for (var i = 0; i < this._uiSourceCodesList.length; ++i) { |
| var uiSourceCode = this._uiSourceCodesList[i]; |
| - if (uiSourceCode.originURL() === originURL) |
| + if (uiSourceCode.url() === url) |
| return uiSourceCode; |
| } |
| return null; |
| @@ -354,8 +354,8 @@ WebInspector.ProjectStore.prototype = { |
| */ |
| renameUISourceCode: function(uiSourceCode, newName) |
| { |
| - var oldPath = uiSourceCode.path(); |
| - var newPath = uiSourceCode.parentPath() ? uiSourceCode.parentPath() + "/" + newName : newName; |
| + var oldPath = uiSourceCode.url(); |
| + var newPath = uiSourceCode.parentURL() ? uiSourceCode.parentURL() + "/" + newName : newName; |
| var value = /** @type {!{uiSourceCode: !WebInspector.UISourceCode, index: number}} */ (this._uiSourceCodesMap.get(oldPath)); |
| this._uiSourceCodesMap.set(newPath, value); |
| this._uiSourceCodesMap.delete(oldPath); |
| @@ -418,15 +418,15 @@ WebInspector.Workspace.prototype = { |
| }, |
| /** |
| - * @param {string} originURL |
| + * @param {string} url |
| * @return {?WebInspector.UISourceCode} |
| */ |
| - uiSourceCodeForOriginURL: function(originURL) |
| + uiSourceCodeForURL: function(url) |
| { |
| var projects = this.projectsForType(WebInspector.projectTypes.Network); |
|
dgozman
2016/01/08 20:22:07
Search in all projects.
|
| projects = projects.concat(this.projectsForType(WebInspector.projectTypes.ContentScripts)); |
| for (var project of projects) { |
| - var uiSourceCode = project.uiSourceCodeForOriginURL(originURL); |
| + var uiSourceCode = project.uiSourceCodeForURL(url); |
| if (uiSourceCode) |
| return uiSourceCode; |
| } |
| @@ -434,13 +434,13 @@ WebInspector.Workspace.prototype = { |
| }, |
| /** |
| - * @param {string} originURL |
| + * @param {string} url |
| * @return {?WebInspector.UISourceCode} |
| */ |
| - filesystemUISourceCode: function(originURL) |
| + filesystemUISourceCode: function(url) |
|
dgozman
2016/01/08 20:22:07
Let's remove this one
|
| { |
| for (var project of this.projectsForType(WebInspector.projectTypes.FileSystem)) { |
| - var uiSourceCode = project.uiSourceCodeForOriginURL(originURL); |
| + var uiSourceCode = project.uiSourceCodeForURL(url); |
| if (uiSourceCode) |
| return uiSourceCode; |
| } |