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

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: 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
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..c9a68218591a8363569f9ba99a08998b890145c6 100644
--- a/chrome/browser/ui/ash/chrome_shell_delegate.cc
+++ b/chrome/browser/ui/ash/chrome_shell_delegate.cc
@@ -182,6 +182,18 @@ 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;
+ }
+ ash::wm::ToggleMaximizedWindow(window);
+}
+
void ChromeShellDelegate::OpenFileManager(bool as_dialog) {
#if defined(OS_CHROMEOS)
if (as_dialog) {
« no previous file with comments | « chrome/browser/ui/ash/chrome_shell_delegate.h ('k') | chrome/browser/ui/ash/chrome_shell_delegate_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698