| Index: third_party/WebKit/Source/devtools/front_end/bindings/FileSystemWorkspaceBinding.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/bindings/FileSystemWorkspaceBinding.js b/third_party/WebKit/Source/devtools/front_end/bindings/FileSystemWorkspaceBinding.js
|
| index bf40f7f6d11a8ba60f1ec05865d4806bf11054a1..3b9d743859f7c72270dbc37edb25498bf80e783c 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/bindings/FileSystemWorkspaceBinding.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/bindings/FileSystemWorkspaceBinding.js
|
| @@ -32,14 +32,11 @@
|
| * @constructor
|
| * @param {!WebInspector.IsolatedFileSystemManager} isolatedFileSystemManager
|
| * @param {!WebInspector.Workspace} workspace
|
| - * @param {!WebInspector.NetworkMapping} networkMapping
|
| */
|
| -WebInspector.FileSystemWorkspaceBinding = function(isolatedFileSystemManager, workspace, networkMapping)
|
| +WebInspector.FileSystemWorkspaceBinding = function(isolatedFileSystemManager, workspace)
|
| {
|
| this._isolatedFileSystemManager = isolatedFileSystemManager;
|
| this._workspace = workspace;
|
| - // FIXME: This dependency should be removed from here once we do not need URL to create a UISourceCode.
|
| - this._networkMapping = networkMapping;
|
| this._isolatedFileSystemManager.addEventListener(WebInspector.IsolatedFileSystemManager.Events.FileSystemAdded, this._fileSystemAdded, this);
|
| this._isolatedFileSystemManager.addEventListener(WebInspector.IsolatedFileSystemManager.Events.FileSystemRemoved, this._fileSystemRemoved, this);
|
| /** @type {!Map.<string, !WebInspector.FileSystemWorkspaceBinding.FileSystem>} */
|
| @@ -77,7 +74,7 @@ WebInspector.FileSystemWorkspaceBinding.prototype = {
|
| _fileSystemAdded: function(event)
|
| {
|
| var fileSystem = /** @type {!WebInspector.IsolatedFileSystem} */ (event.data);
|
| - var boundFileSystem = new WebInspector.FileSystemWorkspaceBinding.FileSystem(this, fileSystem, this._workspace, this._networkMapping);
|
| + var boundFileSystem = new WebInspector.FileSystemWorkspaceBinding.FileSystem(this, fileSystem, this._workspace);
|
| this._boundFileSystems.set(fileSystem.normalizedPath(), boundFileSystem);
|
| },
|
|
|
| @@ -202,9 +199,8 @@ WebInspector.FileSystemWorkspaceBinding.prototype = {
|
| * @param {!WebInspector.FileSystemWorkspaceBinding} fileSystemWorkspaceBinding
|
| * @param {!WebInspector.IsolatedFileSystem} isolatedFileSystem
|
| * @param {!WebInspector.Workspace} workspace
|
| - * @param {!WebInspector.NetworkMapping} networkMapping
|
| */
|
| -WebInspector.FileSystemWorkspaceBinding.FileSystem = function(fileSystemWorkspaceBinding, isolatedFileSystem, workspace, networkMapping)
|
| +WebInspector.FileSystemWorkspaceBinding.FileSystem = function(fileSystemWorkspaceBinding, isolatedFileSystem, workspace)
|
| {
|
| WebInspector.Object.call(this);
|
| this._fileSystemWorkspaceBinding = fileSystemWorkspaceBinding;
|
| @@ -212,8 +208,6 @@ WebInspector.FileSystemWorkspaceBinding.FileSystem = function(fileSystemWorkspac
|
| this._fileSystemBaseURL = "file://" + this._fileSystem.normalizedPath() + "/";
|
| this._fileSystemProjectURL = "filesystem:" + this._fileSystem.normalizedPath();
|
| this._workspace = workspace;
|
| - // FIXME: This dependency should be removed from here once we do not need URL to create a UISourceCode.
|
| - this._networkMapping = networkMapping;
|
|
|
| this._projectId = WebInspector.FileSystemWorkspaceBinding.projectId(this._fileSystem.path());
|
| console.assert(!this._workspace.project(this._projectId));
|
| @@ -323,7 +317,7 @@ WebInspector.FileSystemWorkspaceBinding.FileSystem.prototype = {
|
| * @override
|
| * @param {string} path
|
| * @param {string} newName
|
| - * @param {function(boolean, string=, string=, string=, !WebInspector.ResourceType=)} callback
|
| + * @param {function(boolean, string=, string=, !WebInspector.ResourceType=)} callback
|
| */
|
| rename: function(path, newName, callback)
|
| {
|
| @@ -347,11 +341,10 @@ WebInspector.FileSystemWorkspaceBinding.FileSystem.prototype = {
|
| var parentPath = filePath.substring(0, slash);
|
| filePath = parentPath + "/" + validNewName;
|
| filePath = filePath.substr(1);
|
| - var newURL = this._networkMapping.urlForPath(this._fileSystem.path(), filePath);
|
| var extension = this._extensionForPath(validNewName);
|
| var newOriginURL = this._fileSystemBaseURL + filePath;
|
| var newContentType = this._contentTypeForExtension(extension);
|
| - callback(true, validNewName, newURL, newOriginURL, newContentType);
|
| + callback(true, validNewName, newOriginURL, newContentType);
|
| }
|
| },
|
|
|
| @@ -587,11 +580,10 @@ WebInspector.FileSystemWorkspaceBinding.FileSystem.prototype = {
|
| var parentPath = filePath.substring(0, slash);
|
| var name = filePath.substring(slash + 1);
|
|
|
| - var url = this._networkMapping.urlForPath(this._fileSystem.path(), filePath);
|
| var extension = this._extensionForPath(name);
|
| var contentType = this._contentTypeForExtension(extension);
|
|
|
| - var fileDescriptor = new WebInspector.FileDescriptor(parentPath, name, this._fileSystemBaseURL + filePath, url, contentType);
|
| + var fileDescriptor = new WebInspector.FileDescriptor(parentPath, name, this._fileSystemBaseURL + filePath, contentType);
|
| this.dispatchEventToListeners(WebInspector.ProjectDelegate.Events.FileAdded, fileDescriptor);
|
| },
|
|
|
|
|