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

Unified Diff: ash/accelerators/accelerator_controller.cc

Issue 11082002: Remove TOGGLE_MAXIMIZED_* from Ash reserved actions list. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add ash::wm::ToggleMaximizedWindow to window_util.h Created 8 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 | « no previous file | ash/accelerators/accelerator_table.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/accelerator_controller.cc
diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc
index bc742c74cb6f419442a9cbb330a5129f90865cf4..03976d288f357a71f68415c62ffe1db659ccf56e 100644
--- a/ash/accelerators/accelerator_controller.cc
+++ b/ash/accelerators/accelerator_controller.cc
@@ -713,19 +713,7 @@ bool AcceleratorController::PerformAction(int action,
shell->delegate()->RecordUserMetricsAction(
UMA_ACCEL_MAXIMIZE_RESTORE_F4);
}
- aura::Window* window = wm::GetActiveWindow();
- if (!window)
- return true;
- if (wm::IsWindowFullscreen(window)) {
- // Chrome also uses VKEY_F4 as a shortcut. Its action is to toggle
- // fullscreen. We return false below so Chrome will process the
- // shortcut again and, in case of VKEY_F4, exit fullscreen.
- return false;
- }
- if (wm::IsWindowMaximized(window))
- wm::RestoreWindow(window);
- else if (wm::CanMaximizeWindow(window))
- wm::MaximizeWindow(window);
+ shell->delegate()->ToggleMaximized();
return true;
}
case TOGGLE_MAXIMIZED_RELEASED: {
« no previous file with comments | « no previous file | ash/accelerators/accelerator_table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698