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

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

Issue 626813002: Files.app: Move updateLocationLine function from FileManager class to the UI class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « ui/file_manager/file_manager/foreground/js/file_manager.js ('k') | 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/ui/file_manager_ui.js
diff --git a/ui/file_manager/file_manager/foreground/js/ui/file_manager_ui.js b/ui/file_manager/file_manager/foreground/js/ui/file_manager_ui.js
index ed378b68f267131bf4e3c3f54414742ae261437d..c162d7739668e8053c0f6fb0c060bdaa9e6baff8 100644
--- a/ui/file_manager/file_manager/foreground/js/ui/file_manager_ui.js
+++ b/ui/file_manager/file_manager/foreground/js/ui/file_manager_ui.js
@@ -236,6 +236,29 @@ FileManagerUI.prototype.initAdditionalUI = function() {
};
/**
+ * Updates the location information displayed on the toolbar.
+ * @param {DirectoryEntry=} opt_entry Directory entry to be displayed as
+ * current location. Default entry is the current directory.
+ */
+FileManagerUI.prototype.updateLocationLine = function(volumeManager, entry) {
+ // Updates volume icon.
+ var location = volumeManager.getLocationInfo(entry);
+ if (location && location.rootType && location.isRootEntry) {
+ this.locationVolumeIcon.setAttribute(
+ 'volume-type-icon', location.rootType);
+ this.locationVolumeIcon.removeAttribute('volume-subtype');
+ } else {
+ this.locationVolumeIcon.setAttribute(
+ 'volume-type-icon', location.volumeInfo.volumeType);
+ this.locationVolumeIcon.setAttribute(
+ 'volume-subtype', location.volumeInfo.deviceType);
+ }
+
+ // Updates breadcrumbs.
+ this.locationBreadcrumbs.show(entry);
+};
+
+/**
* Handles click event on the search button.
* @param {Event} event Click event.
* @private
@@ -243,4 +266,3 @@ FileManagerUI.prototype.initAdditionalUI = function() {
FileManagerUI.prototype.onSearchButtonClick_ = function(event) {
this.searchBox.inputElement.focus();
};
-
« no previous file with comments | « ui/file_manager/file_manager/foreground/js/file_manager.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698