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

Unified Diff: ash/accelerators/accelerator_controller.cc

Issue 23611005: ash: Allow web pages to use the Ctrl-M minimize shortcut (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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
Index: ash/accelerators/accelerator_controller.cc
diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc
index de85b561cb77ebcc209c724e667cb393562e497e..a9a5f9a9ff228382fde3f35848e2d207664995f6 100644
--- a/ash/accelerators/accelerator_controller.cc
+++ b/ash/accelerators/accelerator_controller.cc
@@ -9,6 +9,7 @@
#include <iostream>
#include <string>
+#include "ash/accelerators/accelerator_commands.h"
#include "ash/accelerators/accelerator_table.h"
#include "ash/ash_switches.h"
#include "ash/caps_lock_delegate.h"
@@ -843,23 +844,8 @@ bool AcceleratorController::PerformAction(int action,
internal::SnapSizer::RIGHT_EDGE);
return true;
}
- case WINDOW_MINIMIZE: {
- aura::Window* window = wm::GetActiveWindow();
- // Attempt to restore the window that would be cycled through next from
- // the launcher when there is no active window.
- if (!window)
- return HandleCycleWindowMRU(WindowCycleController::FORWARD, false);
- // Disable the shortcut for minimizing full screen window due to
- // crbug.com/131709, which is a crashing issue related to minimizing
- // full screen pepper window.
- if (!wm::IsWindowFullscreen(window) && wm::CanMinimizeWindow(window)) {
- ash::Shell::GetInstance()->delegate()->RecordUserMetricsAction(
- ash::UMA_MINIMIZE_PER_KEY);
- wm::MinimizeWindow(window);
- return true;
- }
- break;
- }
+ case WINDOW_MINIMIZE:
+ return accelerators::ToggleMinimized();
case TOGGLE_FULLSCREEN: {
if (key_code == ui::VKEY_MEDIA_LAUNCH_APP2) {
shell->delegate()->RecordUserMetricsAction(

Powered by Google App Engine
This is Rietveld 408576698