| 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 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 * @param {string} parentPath | 343 * @param {string} parentPath |
| 344 * @param {string} name | 344 * @param {string} name |
| 345 * @param {string} originURL | 345 * @param {string} originURL |
| 346 * @param {!WebInspector.ContentProvider} contentProvider | 346 * @param {!WebInspector.ContentProvider} contentProvider |
| 347 * @return {string} | 347 * @return {string} |
| 348 */ | 348 */ |
| 349 addContentProvider: function(parentPath, name, originURL, contentProvider) | 349 addContentProvider: function(parentPath, name, originURL, contentProvider) |
| 350 { | 350 { |
| 351 var path = parentPath ? parentPath + "/" + name : name; | 351 var path = parentPath ? parentPath + "/" + name : name; |
| 352 if (this._contentProviders[path]) | 352 if (this._contentProviders[path]) |
| 353 return path; | 353 this.dispatchEventToListeners(WebInspector.ProjectDelegate.Events.Fi
leRemoved, path); |
| 354 var fileDescriptor = new WebInspector.FileDescriptor(parentPath, name, o
riginURL, contentProvider.contentType()); | 354 var fileDescriptor = new WebInspector.FileDescriptor(parentPath, name, o
riginURL, contentProvider.contentType()); |
| 355 this._contentProviders[path] = contentProvider; | 355 this._contentProviders[path] = contentProvider; |
| 356 this.dispatchEventToListeners(WebInspector.ProjectDelegate.Events.FileAd
ded, fileDescriptor); | 356 this.dispatchEventToListeners(WebInspector.ProjectDelegate.Events.FileAd
ded, fileDescriptor); |
| 357 return path; | 357 return path; |
| 358 }, | 358 }, |
| 359 | 359 |
| 360 /** | 360 /** |
| 361 * @param {string} path | 361 * @param {string} path |
| 362 */ | 362 */ |
| 363 removeFile: function(path) | 363 removeFile: function(path) |
| (...skipping 12 matching lines...) Expand all Loading... |
| 376 | 376 |
| 377 reset: function() | 377 reset: function() |
| 378 { | 378 { |
| 379 this._contentProviders = {}; | 379 this._contentProviders = {}; |
| 380 this._workspace.removeProject(this._id); | 380 this._workspace.removeProject(this._id); |
| 381 this._workspace.addProject(this._id, this); | 381 this._workspace.addProject(this._id, this); |
| 382 }, | 382 }, |
| 383 | 383 |
| 384 __proto__: WebInspector.Object.prototype | 384 __proto__: WebInspector.Object.prototype |
| 385 } | 385 } |
| OLD | NEW |