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

Unified Diff: ui/file_manager/file_manager/foreground/js/directory_model.js

Issue 695713002: Automatically open FSP mounted file systems. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed. Created 6 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/file_manager/foreground/js/directory_model.js
diff --git a/ui/file_manager/file_manager/foreground/js/directory_model.js b/ui/file_manager/file_manager/foreground/js/directory_model.js
index ac27ae8b1dc7d35dbb18507d5a297fe464da72d9..c46055c0a921dc9c2a632f38d597482e215449ad 100644
--- a/ui/file_manager/file_manager/foreground/js/directory_model.js
+++ b/ui/file_manager/file_manager/foreground/js/directory_model.js
@@ -998,6 +998,16 @@ DirectoryModel.prototype.onVolumeInfoListUpdated_ = function(event) {
this.changeDirectoryEntry(displayRoot);
}.bind(this));
}
+
+ // If a new provided volume is mounted, then redirect to it in the focused
+ // window. Note, that this is a temporary solution for crbug.com/427776.
+ if (window.isFocused() &&
+ event.added.length === 1 &&
+ event.added[0].volumeType ==
+ VolumeManagerCommon.VolumeType.VOLUME_TYPE_PROVIDED &&
+ event.added[0].displayRoot) {
+ this.changeDirectoryEntry(event.added[0].displayRoot);
+ }
};
/**
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698