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

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

Issue 13871005: filemanager: Show Drive related gear menu for the sidebar "Shared with me", "Recent", "Offline". (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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/js/file_manager.js
diff --git a/chrome/browser/resources/file_manager/js/file_manager.js b/chrome/browser/resources/file_manager/js/file_manager.js
index ad05600384f6dd568a15d406330a1d5b24abb52a..a76c0c89d93f8b070230c506d8ab59431850db67 100644
--- a/chrome/browser/resources/file_manager/js/file_manager.js
+++ b/chrome/browser/resources/file_manager/js/file_manager.js
@@ -1664,8 +1664,11 @@ DialogType.isModal = function(type) {
* Drive.
*/
FileManager.prototype.isOnDrive = function() {
- return this.directoryModel_.getCurrentRootType() === RootType.DRIVE ||
- this.directoryModel_.getCurrentRootType() === RootType.DRIVE_OFFLINE;
+ var rootType = this.directoryModel_.getCurrentRootType();
+ return rootType === RootType.DRIVE ||
+ rootType === RootType.DRIVE_SHARED_WITH_ME ||
+ rootType === RootType.DRIVE_RECENT ||
+ rootType === RootType.DRIVE_OFFLINE;
};
/**
@@ -2092,10 +2095,11 @@ DialogType.isModal = function(type) {
* @private
*/
FileManager.prototype.updateGearMenu_ = function() {
- this.syncButton.hidden = !this.isOnDrive();
- this.hostedButton.hidden = !this.isOnDrive();
+ var hideItemsForDrive = !this.isOnDrive();
+ this.syncButton.hidden = hideItemsForDrive;
+ this.hostedButton.hidden = hideItemsForDrive;
this.document_.getElementById('drive-separator').hidden =
- !this.isOnDrive();
+ hideItemsForDrive;
// If volume has changed, then fetch remaining space data.
if (this.previousRootUrl_ != this.directoryModel_.getCurrentMountPointUrl())
« 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