diff options
author | jamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-04 23:31:33 +0000 |
---|---|---|
committer | jamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-04 23:31:33 +0000 |
commit | fa94127695795ba1b35953a88d829e4381e78e7b (patch) | |
tree | 7f251844ca8b7fc8380501b3b2a55a19eb810874 /chrome/browser/ui/browser_command_controller.cc | |
parent | 9e2cf275e8780741004c0f5245bce7f7e0afab4b (diff) | |
download | chromium_src-fa94127695795ba1b35953a88d829e4381e78e7b.zip chromium_src-fa94127695795ba1b35953a88d829e4381e78e7b.tar.gz chromium_src-fa94127695795ba1b35953a88d829e4381e78e7b.tar.bz2 |
ash: Allow web pages to use the Ctrl-M minimize shortcut
The active window is minimized only if the active web page or app does not
handle the key first.
BUG=284522
TEST=manual, ash_unittests AcceleratorCommandsTest.*
Review URL: https://chromiumcodereview.appspot.com/23611005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221294 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/browser_command_controller.cc')
-rw-r--r-- | chrome/browser/ui/browser_command_controller.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/chrome/browser/ui/browser_command_controller.cc b/chrome/browser/ui/browser_command_controller.cc index 07e1822..b91d63f 100644 --- a/chrome/browser/ui/browser_command_controller.cc +++ b/chrome/browser/ui/browser_command_controller.cc @@ -51,6 +51,7 @@ #endif #if defined(USE_ASH) +#include "ash/accelerators/accelerator_commands.h" #include "chrome/browser/ui/ash/ash_util.h" #endif @@ -444,6 +445,11 @@ void BrowserCommandController::ExecuteCommandWithDisposition( case IDC_TOGGLE_ASH_DESKTOP: chrome::ToggleAshDesktop(); break; + case IDC_MINIMIZE_WINDOW: + ash::accelerators::ToggleMinimized(); + break; + // If Ash needs many more commands here we should implement a general + // mechanism to pass accelerators back into Ash. http://crbug.com/285308 #endif #if defined(OS_WIN) @@ -836,6 +842,9 @@ void BrowserCommandController::InitCommandState() { chrome::HOST_DESKTOP_TYPE_NATIVE != chrome::HOST_DESKTOP_TYPE_ASH) command_updater_.UpdateCommandEnabled(IDC_TOGGLE_ASH_DESKTOP, true); #endif +#if defined(USE_ASH) + command_updater_.UpdateCommandEnabled(IDC_MINIMIZE_WINDOW, true); +#endif // Page-related commands command_updater_.UpdateCommandEnabled(IDC_EMAIL_PAGE_LOCATION, true); |