| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 { | 315 { |
| 316 if (!success) { | 316 if (!success) { |
| 317 callback(false, newName); | 317 callback(false, newName); |
| 318 return; | 318 return; |
| 319 } | 319 } |
| 320 var validNewName = /** @type {string} */ (newName); | 320 var validNewName = /** @type {string} */ (newName); |
| 321 console.assert(validNewName); | 321 console.assert(validNewName); |
| 322 var slash = filePath.lastIndexOf("/"); | 322 var slash = filePath.lastIndexOf("/"); |
| 323 var parentPath = filePath.substring(0, slash); | 323 var parentPath = filePath.substring(0, slash); |
| 324 filePath = parentPath + "/" + validNewName; | 324 filePath = parentPath + "/" + validNewName; |
| 325 filePath = filePath.substr(1); |
| 325 var newURL = this._workspace.urlForPath(this._fileSystem.path(), fil
ePath); | 326 var newURL = this._workspace.urlForPath(this._fileSystem.path(), fil
ePath); |
| 326 var extension = this._extensionForPath(validNewName); | 327 var extension = this._extensionForPath(validNewName); |
| 327 var newOriginURL = this._fileSystemURL + filePath | 328 var newOriginURL = this._fileSystemURL + filePath |
| 328 var newContentType = this._contentTypeForExtension(extension); | 329 var newContentType = this._contentTypeForExtension(extension); |
| 329 callback(true, validNewName, newURL, newOriginURL, newContentType); | 330 callback(true, validNewName, newURL, newOriginURL, newContentType); |
| 330 } | 331 } |
| 331 }, | 332 }, |
| 332 | 333 |
| 333 /** | 334 /** |
| 334 * @param {string} path | 335 * @param {string} path |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 dispose: function() | 583 dispose: function() |
| 583 { | 584 { |
| 584 this._workspace.removeProject(this._projectId); | 585 this._workspace.removeProject(this._projectId); |
| 585 } | 586 } |
| 586 } | 587 } |
| 587 | 588 |
| 588 /** | 589 /** |
| 589 * @type {!WebInspector.FileSystemWorkspaceBinding} | 590 * @type {!WebInspector.FileSystemWorkspaceBinding} |
| 590 */ | 591 */ |
| 591 WebInspector.fileSystemWorkspaceBinding; | 592 WebInspector.fileSystemWorkspaceBinding; |
| OLD | NEW |