| 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 */ | 134 */ |
| 135 canRename: function() | 135 canRename: function() |
| 136 { | 136 { |
| 137 return false; | 137 return false; |
| 138 }, | 138 }, |
| 139 | 139 |
| 140 /** | 140 /** |
| 141 * @override | 141 * @override |
| 142 * @param {string} path | 142 * @param {string} path |
| 143 * @param {string} newName | 143 * @param {string} newName |
| 144 * @param {function(boolean, string=, string=, string=, !WebInspector.Resour
ceType=)} callback | 144 * @param {function(boolean, string=, string=, !WebInspector.ResourceType=)}
callback |
| 145 */ | 145 */ |
| 146 rename: function(path, newName, callback) | 146 rename: function(path, newName, callback) |
| 147 { | 147 { |
| 148 this.performRename(path, newName, innerCallback.bind(this)); | 148 this.performRename(path, newName, innerCallback.bind(this)); |
| 149 | 149 |
| 150 /** | 150 /** |
| 151 * @param {boolean} success | 151 * @param {boolean} success |
| 152 * @param {string=} newName | 152 * @param {string=} newName |
| 153 * @this {WebInspector.ContentProviderBasedProjectDelegate} | 153 * @this {WebInspector.ContentProviderBasedProjectDelegate} |
| 154 */ | 154 */ |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 */ | 328 */ |
| 329 indexContent: function(progress) | 329 indexContent: function(progress) |
| 330 { | 330 { |
| 331 setTimeout(progress.done.bind(progress), 0); | 331 setTimeout(progress.done.bind(progress), 0); |
| 332 }, | 332 }, |
| 333 | 333 |
| 334 /** | 334 /** |
| 335 * @param {string} parentPath | 335 * @param {string} parentPath |
| 336 * @param {string} name | 336 * @param {string} name |
| 337 * @param {string} originURL | 337 * @param {string} originURL |
| 338 * @param {string} url | |
| 339 * @param {!WebInspector.ContentProvider} contentProvider | 338 * @param {!WebInspector.ContentProvider} contentProvider |
| 340 * @return {string} | 339 * @return {string} |
| 341 */ | 340 */ |
| 342 addContentProvider: function(parentPath, name, originURL, url, contentProvid
er) | 341 addContentProvider: function(parentPath, name, originURL, contentProvider) |
| 343 { | 342 { |
| 344 var path = parentPath ? parentPath + "/" + name : name; | 343 var path = parentPath ? parentPath + "/" + name : name; |
| 345 if (this._contentProviders[path]) | 344 if (this._contentProviders[path]) |
| 346 return path; | 345 return path; |
| 347 var fileDescriptor = new WebInspector.FileDescriptor(parentPath, name, o
riginURL, url, contentProvider.contentType()); | 346 var fileDescriptor = new WebInspector.FileDescriptor(parentPath, name, o
riginURL, contentProvider.contentType()); |
| 348 this._contentProviders[path] = contentProvider; | 347 this._contentProviders[path] = contentProvider; |
| 349 this.dispatchEventToListeners(WebInspector.ProjectDelegate.Events.FileAd
ded, fileDescriptor); | 348 this.dispatchEventToListeners(WebInspector.ProjectDelegate.Events.FileAd
ded, fileDescriptor); |
| 350 return path; | 349 return path; |
| 351 }, | 350 }, |
| 352 | 351 |
| 353 /** | 352 /** |
| 354 * @param {string} path | 353 * @param {string} path |
| 355 */ | 354 */ |
| 356 removeFile: function(path) | 355 removeFile: function(path) |
| 357 { | 356 { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 369 | 368 |
| 370 reset: function() | 369 reset: function() |
| 371 { | 370 { |
| 372 this._contentProviders = {}; | 371 this._contentProviders = {}; |
| 373 this._workspace.removeProject(this._id); | 372 this._workspace.removeProject(this._id); |
| 374 this._workspace.addProject(this._id, this); | 373 this._workspace.addProject(this._id, this); |
| 375 }, | 374 }, |
| 376 | 375 |
| 377 __proto__: WebInspector.Object.prototype | 376 __proto__: WebInspector.Object.prototype |
| 378 } | 377 } |
| OLD | NEW |