Index: third_party/WebKit/Source/devtools/front_end/bindings/NetworkMapping.js |
diff --git a/third_party/WebKit/Source/devtools/front_end/bindings/NetworkMapping.js b/third_party/WebKit/Source/devtools/front_end/bindings/NetworkMapping.js |
index 399a348a934231c4eb5fa88750d4150db5e5c9f7..4278e688bf3ef6e857ea0954c0fbe73b395693a8 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/bindings/NetworkMapping.js |
+++ b/third_party/WebKit/Source/devtools/front_end/bindings/NetworkMapping.js |
@@ -18,13 +18,6 @@ WebInspector.NetworkMapping = function(targetManager, workspace, fileSystemWorks |
InspectorFrontendHost.events.addEventListener(InspectorFrontendHostAPI.Events.RevealSourceLine, this._revealSourceLine, this); |
var fileSystemManager = fileSystemWorkspaceBinding.fileSystemManager(); |
- this._eventListeners = [ |
- fileSystemManager.addEventListener(WebInspector.IsolatedFileSystemManager.Events.FileSystemAdded, this._fileSystemAdded, this), |
- fileSystemManager.addEventListener(WebInspector.IsolatedFileSystemManager.Events.FileSystemRemoved, this._fileSystemRemoved, this), |
- this._fileSystemMapping.addEventListener(WebInspector.FileSystemMapping.Events.FileMappingAdded, this._fileSystemMappingChanged, this), |
- this._fileSystemMapping.addEventListener(WebInspector.FileSystemMapping.Events.FileMappingRemoved, this._fileSystemMappingChanged, this) |
- ]; |
- |
fileSystemManager.waitForFileSystems() |
dgozman
2016/09/22 19:55:53
We either don't do waitForFileSystems or we listen
lushnikov
2016/09/23 21:56:12
Done.
|
.then(this._fileSystemsLoaded.bind(this)); |
} |
@@ -40,16 +33,6 @@ WebInspector.NetworkMapping.prototype = { |
}, |
/** |
- * @param {!WebInspector.Event} event |
- */ |
- _fileSystemAdded: function(event) |
- { |
- var fileSystem = /** @type {!WebInspector.IsolatedFileSystem} */ (event.data); |
- this._addMappingsForFilesystem(fileSystem); |
- this._fileSystemMappingChanged(); |
- }, |
- |
- /** |
* @param {!WebInspector.IsolatedFileSystem} fileSystem |
*/ |
_addMappingsForFilesystem: function(fileSystem) |
@@ -72,38 +55,17 @@ WebInspector.NetworkMapping.prototype = { |
}, |
/** |
- * @param {!WebInspector.Event} event |
- */ |
- _fileSystemRemoved: function(event) |
- { |
- var fileSystem = /** @type {!WebInspector.IsolatedFileSystem} */ (event.data); |
- this._fileSystemMapping.removeFileSystem(fileSystem.path()); |
- this._fileSystemMappingChanged(); |
- }, |
- |
- /** |
* @param {!WebInspector.UISourceCode} uiSourceCode |
* @return {string} |
*/ |
networkURL: function(uiSourceCode) |
{ |
- if (uiSourceCode.project().type() === WebInspector.projectTypes.FileSystem) { |
- var fileSystemPath = this._fileSystemWorkspaceBinding.fileSystemPath(uiSourceCode.project().id()); |
- return this._networkURLForFileSystemURL(fileSystemPath, uiSourceCode.url()); |
- } |
+ if (uiSourceCode.project().type() === WebInspector.projectTypes.FileSystem) |
+ return ""; |
return uiSourceCode.url(); |
}, |
/** |
- * @param {string} url |
- * @return {boolean} |
- */ |
- hasMappingForNetworkURL: function(url) |
- { |
- return this._fileSystemMapping.hasMappingForNetworkURL(url); |
- }, |
- |
- /** |
* @param {!WebInspector.Target} target |
* @param {?WebInspector.ResourceTreeFrame} frame |
* @param {string} url |
@@ -126,20 +88,6 @@ WebInspector.NetworkMapping.prototype = { |
}, |
/** |
- * @param {string} url |
- * @return {?WebInspector.UISourceCode} |
- */ |
- _fileSystemUISourceCodeForURL: function(url) |
- { |
- var file = this._fileSystemMapping.fileForURL(url); |
- if (file) { |
- var projectId = WebInspector.FileSystemWorkspaceBinding.projectId(file.fileSystemPath); |
- return this._workspace.uiSourceCode(projectId, file.fileURL); |
- } |
- return null; |
- }, |
- |
- /** |
* @param {!WebInspector.Target} target |
* @param {?WebInspector.ResourceTreeFrame} frame |
* @param {string} url |
@@ -147,7 +95,7 @@ WebInspector.NetworkMapping.prototype = { |
*/ |
_uiSourceCodeForURL: function(target, frame, url) |
{ |
- return this._fileSystemUISourceCodeForURL(url) || this._networkUISourceCodeForURL(target, frame, url) || this._contentScriptUISourceCodeForURL(target, frame, url); |
+ return this._networkUISourceCodeForURL(target, frame, url) || this._contentScriptUISourceCodeForURL(target, frame, url); |
}, |
/** |
@@ -178,17 +126,7 @@ WebInspector.NetworkMapping.prototype = { |
*/ |
uiSourceCodeForURLForAnyTarget: function(url) |
{ |
- return this._fileSystemUISourceCodeForURL(url) || WebInspector.workspace.uiSourceCodeForURL(url); |
- }, |
- |
- /** |
- * @param {string} fileSystemPath |
- * @param {string} filePath |
- * @return {string} |
- */ |
- _networkURLForFileSystemURL: function(fileSystemPath, filePath) |
- { |
- return this._fileSystemMapping.networkURLForFileSystemURL(fileSystemPath, filePath); |
+ return WebInspector.workspace.uiSourceCodeForURL(url); |
}, |
/** |
@@ -199,7 +137,7 @@ WebInspector.NetworkMapping.prototype = { |
{ |
var url = this.networkURL(networkUISourceCode); |
var path = uiSourceCode.url(); |
- var fileSystemPath = this._fileSystemWorkspaceBinding.fileSystemPath(uiSourceCode.project().id()); |
+ var fileSystemPath = WebInspector.FileSystemWorkspaceBinding.fileSystemPath(uiSourceCode.project().id()); |
this._fileSystemMapping.addMappingForResource(url, fileSystemPath, path); |
}, |
@@ -243,16 +181,8 @@ WebInspector.NetworkMapping.prototype = { |
this._workspace.addEventListener(WebInspector.Workspace.Events.UISourceCodeAdded, listener, this); |
}, |
- _fileSystemMappingChanged: function() |
- { |
- if (this._addingFileSystem) |
- return; |
- this._targetManager.suspendAndResumeAllTargets(); |
- }, |
- |
dispose: function() |
{ |
- WebInspector.EventTarget.removeEventListeners(this._eventListeners); |
} |
} |