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) { |