Index: ui/file_manager/file_manager/foreground/js/gear_menu_controller.js |
diff --git a/ui/file_manager/file_manager/foreground/js/gear_menu_controller.js b/ui/file_manager/file_manager/foreground/js/gear_menu_controller.js |
index 48e9ae2e7a1f1a4626b32188f16163b9ec352fc5..fc1bbbf65c1cbe222e4ac9e2daf8222b776f87c1 100644 |
--- a/ui/file_manager/file_manager/foreground/js/gear_menu_controller.js |
+++ b/ui/file_manager/file_manager/foreground/js/gear_menu_controller.js |
@@ -4,6 +4,7 @@ |
/** |
* @param {!cr.ui.MenuButton} gearButton |
+ * @param {!FilesToggleRipple} toggleRipple |
* @param {!GearMenu} gearMenu |
* @param {!DirectoryModel} directoryModel |
* @param {!CommandHandler} commandHandler |
@@ -11,7 +12,14 @@ |
* @struct |
*/ |
function GearMenuController( |
- gearButton, gearMenu, directoryModel, commandHandler) { |
+ gearButton, toggleRipple, gearMenu, directoryModel, commandHandler) { |
+ /** |
+ * @type {!FilesToggleRipple} |
+ * @const |
+ * @private |
+ */ |
+ this.toggleRipple_ = toggleRipple; |
+ |
/** |
* @type {!GearMenu} |
* @const |
@@ -34,6 +42,7 @@ function GearMenuController( |
this.commandHandler_ = commandHandler; |
gearButton.addEventListener('menushow', this.onShowGearMenu_.bind(this)); |
+ gearButton.addEventListener('menuhide', this.onHideGearMenu_.bind(this)); |
directoryModel.addEventListener( |
'directory-changed', this.onDirectoryChanged_.bind(this)); |
chrome.fileManagerPrivate.onPreferencesChanged.addListener( |
@@ -45,6 +54,7 @@ function GearMenuController( |
* @private |
*/ |
GearMenuController.prototype.onShowGearMenu_ = function() { |
+ this.toggleRipple_.activated = true; |
this.refreshRemainingSpace_(false); /* Without loading caption. */ |
// Update view of drive-related settings. |
@@ -52,6 +62,13 @@ GearMenuController.prototype.onShowGearMenu_ = function() { |
}; |
/** |
+ * @private |
+ */ |
+GearMenuController.prototype.onHideGearMenu_ = function() { |
+ this.toggleRipple_.activated = false; |
+}; |
+ |
+/** |
* @param {Event} event |
* @private |
*/ |