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

Unified Diff: chrome/browser/resources/file_manager/foreground/js/file_manager.js

Issue 145123005: Fix titles of Files app windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/file_manager/foreground/js/file_manager.js
diff --git a/chrome/browser/resources/file_manager/foreground/js/file_manager.js b/chrome/browser/resources/file_manager/foreground/js/file_manager.js
index c4523d28f3aca887f25142666bf7fd920e48b29f..e39955e48ae4e87eeb5b68642fc5ffc9f7cbb46a 100644
--- a/chrome/browser/resources/file_manager/foreground/js/file_manager.js
+++ b/chrome/browser/resources/file_manager/foreground/js/file_manager.js
@@ -2283,6 +2283,21 @@ var BOTTOM_MARGIN_FOR_PREVIEW_PANEL_PX = 52;
* @private
*/
FileManager.prototype.onDirectoryChanged_ = function(event) {
+ var newCurrentVolumeInfo = this.volumeManager_.getVolumeInfo(
+ event.newDirEntry);
+
+ // If volume has changed, then update the gear menu.
+ if (this.currentVolumeInfo_ !== newCurrentVolumeInfo) {
+ this.updateGearMenu_();
+ // If the volume has changed, and it was previously set, then do not
+ // close on unmount anymore.
+ if (this.currentVolumeInfo_)
+ this.closeOnUnmount_ = false;
+ }
+
+ // Remember the current volume info.
+ this.currentVolumeInfo_ = newCurrentVolumeInfo;
+
this.selectionHandler_.onFileSelectionChanged();
this.ui_.searchBox.clear();
// TODO(mtomasz): Use Entry.toURL() instead of fullPath.
@@ -2298,24 +2313,10 @@ var BOTTOM_MARGIN_FOR_PREVIEW_PANEL_PX = 52;
this.updateUnformattedVolumeStatus_();
this.updateTitle_();
- var newCurrentVolumeInfo = this.volumeManager_.getVolumeInfo(
- event.newDirEntry);
-
- // If volume has changed, then update the gear menu.
- if (this.currentVolumeInfo_ !== newCurrentVolumeInfo) {
- this.updateGearMenu_();
- // If the volume has changed, and it was previously set, then do not
- // close on unmount anymore.
- if (this.currentVolumeInfo_)
- this.closeOnUnmount_ = false;
- }
var currentEntry = this.getCurrentDirectoryEntry();
this.previewPanel_.currentEntry = util.isFakeEntry(currentEntry) ?
null : currentEntry;
-
- // Remember the current volume info.
- this.currentVolumeInfo_ = newCurrentVolumeInfo;
};
FileManager.prototype.updateUnformattedVolumeStatus_ = function() {
« 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