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

Unified Diff: ash/accelerators/accelerator_controller.cc

Issue 10914231: Map fullscreen button to maximize (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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 2b9eaa5a15dab8c6313e52455074a5b874e1b760..ca58478b4eec396ae2ef22a9c39e968c47791f49 100644
--- a/ash/accelerators/accelerator_controller.cc
+++ b/ash/accelerators/accelerator_controller.cc
@@ -650,18 +650,20 @@ bool AcceleratorController::PerformAction(int action,
break;
}
case WINDOW_MAXIMIZE_RESTORE: {
+ if (key_code == ui::VKEY_F4 && shell->delegate())
+ shell->delegate()->RecordUserMetricsAction(UMA_ACCEL_MAXIMIZE_RESTORE);
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)
sky 2012/09/12 14:57:33 Is it intentional that hitting this button cycles
sschmitz 2012/09/12 23:45:50 After conferring with PM and sky@, took it out. Do
mazda 2012/09/13 00:26:00 This is for http://crbug.com/133337. If we've dec
sschmitz 2012/09/13 19:34:13 On further discussion PM decided to leave as is.
return HandleCycleWindowMRU(WindowCycleController::FORWARD, false);
- if (!wm::IsWindowFullscreen(window)) {
- if (wm::IsWindowMaximized(window))
- wm::RestoreWindow(window);
- else
- wm::MaximizeWindow(window);
- return true;
- }
+ if (wm::IsWindowFullscreen(window) && shell->delegate())
sky 2012/09/12 14:57:33 On looking at this, why do you even need this? Doe
sschmitz 2012/09/12 23:45:50 Yes. We get out of fullscreen mode when F4 is pres
sky 2012/09/13 00:46:22 My question is, why do you need to route to the de
sschmitz 2012/09/13 19:34:13 Two Reasons for this: 1. PM changed behavior when
sky 2012/09/13 19:36:33 If that's the case, then it probably means Browser
+ shell->delegate()->RemoveFullScreenExitBubble();
+ if (wm::IsWindowFullscreen(window) || wm::IsWindowMaximized(window))
+ wm::RestoreWindow(window);
+ else
+ wm::MaximizeWindow(window);
sky 2012/09/12 14:57:33 This is problematic, it assumes all windows can ma
sschmitz 2012/09/12 23:45:50 Added wm::CanMaximizeWindow(window)(thanks sadrul@
+ return true;
break;
}
case WINDOW_POSITION_CENTER: {
« no previous file with comments | « no previous file | ash/accelerators/accelerator_table.cc » ('j') | chrome/browser/ui/ash/chrome_shell_delegate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698