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

Side by Side Diff: Source/devtools/front_end/sdk/ContentProviderBasedProjectDelegate.js

Issue 313603003: Devtools: get rid of ProjectWillReset event, introduce ProjectRemoved instead of it (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months 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 | Annotate | Revision Log
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 22 matching lines...) Expand all
33 * @implements {WebInspector.ProjectDelegate} 33 * @implements {WebInspector.ProjectDelegate}
34 * @param {!WebInspector.Workspace} workspace 34 * @param {!WebInspector.Workspace} workspace
35 * @param {string} id 35 * @param {string} id
36 * @param {!WebInspector.projectTypes} type 36 * @param {!WebInspector.projectTypes} type
37 */ 37 */
38 WebInspector.ContentProviderBasedProjectDelegate = function(workspace, id, type) 38 WebInspector.ContentProviderBasedProjectDelegate = function(workspace, id, type)
39 { 39 {
40 this._type = type; 40 this._type = type;
41 /** @type {!Object.<string, !WebInspector.ContentProvider>} */ 41 /** @type {!Object.<string, !WebInspector.ContentProvider>} */
42 this._contentProviders = {}; 42 this._contentProviders = {};
43 this._workspace = workspace;
44 this._id = id;
43 this._projectStore = workspace.addProject(id, this); 45 this._projectStore = workspace.addProject(id, this);
44 } 46 }
45 47
46 WebInspector.ContentProviderBasedProjectDelegate.prototype = { 48 WebInspector.ContentProviderBasedProjectDelegate.prototype = {
47 /** 49 /**
48 * @return {string} 50 * @return {string}
49 */ 51 */
50 type: function() 52 type: function()
51 { 53 {
52 return this._type; 54 return this._type;
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 * @return {!Object.<string, !WebInspector.ContentProvider>} 329 * @return {!Object.<string, !WebInspector.ContentProvider>}
328 */ 330 */
329 contentProviders: function() 331 contentProviders: function()
330 { 332 {
331 return this._contentProviders; 333 return this._contentProviders;
332 }, 334 },
333 335
334 reset: function() 336 reset: function()
335 { 337 {
336 this._contentProviders = {}; 338 this._contentProviders = {};
337 this._projectStore.reset(); 339 this._workspace.removeProject(this._id);
340 this._projectStore = this._workspace.addProject(this._id, this);
vsevik 2014/06/04 06:04:50 Looks like there are cases when we addProject with
338 } 341 }
339 } 342 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698