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

Unified Diff: chrome/browser/ui/ash/chrome_shell_delegate.cc

Issue 11082002: Remove TOGGLE_MAXIMIZED_* from Ash reserved actions list. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix AcceleratorControllerTest.WindowSnap 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
Index: chrome/browser/ui/ash/chrome_shell_delegate.cc
diff --git a/chrome/browser/ui/ash/chrome_shell_delegate.cc b/chrome/browser/ui/ash/chrome_shell_delegate.cc
index 7c8b3af17e38cd23889ebc4a8350d0d5a8e22c5d..b971ca530468360a8acec6180b6fc43f73149f5d 100644
--- a/chrome/browser/ui/ash/chrome_shell_delegate.cc
+++ b/chrome/browser/ui/ash/chrome_shell_delegate.cc
@@ -182,6 +182,21 @@ void ChromeShellDelegate::NewWindow(bool is_incognito) {
is_incognito ? profile->GetOffTheRecordProfile() : profile);
}
+void ChromeShellDelegate::ToggleMaximized() {
+ aura::Window* window = ash::wm::GetActiveWindow();
+ if (!window)
+ return;
+ // Get out of fullscreen when in fullscreen mode.
+ if (ash::wm::IsWindowFullscreen(window)) {
+ chrome::ToggleFullscreenMode(GetTargetBrowser());
+ return;
+ }
+ if (ash::wm::IsWindowMaximized(window))
sky 2012/10/09 15:50:53 Promote this to a common place so TestShellDelegat
mazda 2012/10/09 20:50:33 I added ToggleMaximizedWindow to ash/wm/window_uti
+ ash::wm::RestoreWindow(window);
+ else if (ash::wm::CanMaximizeWindow(window))
+ ash::wm::MaximizeWindow(window);
+}
+
void ChromeShellDelegate::OpenFileManager(bool as_dialog) {
#if defined(OS_CHROMEOS)
if (as_dialog) {

Powered by Google App Engine
This is Rietveld 408576698