Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/bindings/ContentProviderBasedProjectDelegate.js

Issue 1409223006: DevTools: replace content provider when re-adding into network project (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Same with isLiveEdit flag in a scriptParsed. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698