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

Unified Diff: third_party/WebKit/Source/devtools/front_end/workspace/IsolatedFileSystemManager.js

Issue 2651043006: DevTools: Remove files in the navigator when they are deleted externally (Closed)
Patch Set: fix test Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/workspace/IsolatedFileSystem.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/workspace/IsolatedFileSystemManager.js
diff --git a/third_party/WebKit/Source/devtools/front_end/workspace/IsolatedFileSystemManager.js b/third_party/WebKit/Source/devtools/front_end/workspace/IsolatedFileSystemManager.js
index a8f599436a9f9459fa35f7bbe6c240df5ab10081..2e08147931da4841c8576b23e9924b18108d8fc8 100644
--- a/third_party/WebKit/Source/devtools/front_end/workspace/IsolatedFileSystemManager.js
+++ b/third_party/WebKit/Source/devtools/front_end/workspace/IsolatedFileSystemManager.js
@@ -47,7 +47,7 @@ Workspace.IsolatedFileSystemManager = class extends Common.Object {
InspectorFrontendHost.events.addEventListener(
InspectorFrontendHostAPI.Events.FileSystemAdded, this._onFileSystemAdded, this);
InspectorFrontendHost.events.addEventListener(
- InspectorFrontendHostAPI.Events.FileSystemFilesChanged, this._onFileSystemFilesChanged, this);
+ InspectorFrontendHostAPI.Events.FileSystemFilesChangedAddedRemoved, this._onFileSystemFilesChanged, this);
InspectorFrontendHost.events.addEventListener(
InspectorFrontendHostAPI.Events.IndexingTotalWorkCalculated, this._onIndexingTotalWorkCalculated, this);
InspectorFrontendHost.events.addEventListener(
@@ -167,9 +167,12 @@ Workspace.IsolatedFileSystemManager = class extends Common.Object {
* @param {!Common.Event} event
*/
_onFileSystemFilesChanged(event) {
- var embedderPaths = /** @type {!Array<string>} */ (event.data);
- var paths = embedderPaths.map(embedderPath => Common.ParsedURL.platformPathToURL(embedderPath));
- this.dispatchEventToListeners(Workspace.IsolatedFileSystemManager.Events.FileSystemFilesChanged, paths);
+ var paths = /** @type {!Workspace.IsolatedFileSystemManager.FilesChangedData} */ (event.data);
+ var urlPaths = {};
+ urlPaths.changed = paths.changed.map(embedderPath => Common.ParsedURL.platformPathToURL(embedderPath));
+ urlPaths.added = paths.added.map(embedderPath => Common.ParsedURL.platformPathToURL(embedderPath));
+ urlPaths.removed = paths.removed.map(embedderPath => Common.ParsedURL.platformPathToURL(embedderPath));
+ this.dispatchEventToListeners(Workspace.IsolatedFileSystemManager.Events.FileSystemFilesChanged, urlPaths);
}
/**
@@ -298,6 +301,9 @@ Workspace.IsolatedFileSystemManager = class extends Common.Object {
/** @typedef {!{fileSystemName: string, rootURL: string, fileSystemPath: string}} */
Workspace.IsolatedFileSystemManager.FileSystem;
+/** @typedef {!{changed:!Array<string>, added:!Array<string>, removed:!Array<string>}} */
+Workspace.IsolatedFileSystemManager.FilesChangedData;
+
/** @enum {symbol} */
Workspace.IsolatedFileSystemManager.Events = {
FileSystemAdded: Symbol('FileSystemAdded'),
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/workspace/IsolatedFileSystem.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698