Remove TOGGLE_MAXIMIZED_* from Ash reserved actions list.
The following changes are for removing TOGGLE_MAXIMIZED_* from Ash reserved actions list.
- Add ShellDelegate::ToggleMaximized
- Remove VKEY_F4 from browser accelerators list
Also added a browser test for ChromeShellDelegate::ToggleMaximized.
BUG=152265
TEST=Manual
Review URL: https://chromiumcodereview.appspot.com/11082002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161015 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/ash/shell/shell_delegate_impl.cc b/ash/shell/shell_delegate_impl.cc
index ca2696d..93cad7f3 100644
--- a/ash/shell/shell_delegate_impl.cc
+++ b/ash/shell/shell_delegate_impl.cc
@@ -9,6 +9,7 @@
#include "ash/shell/launcher_delegate_impl.h"
#include "ash/shell/toplevel_window.h"
#include "ash/shell_window_ids.h"
+#include "ash/wm/window_util.h"
#include "base/message_loop.h"
#include "ui/aura/window.h"
@@ -75,6 +76,12 @@
ash::shell::ToplevelWindow::CreateToplevelWindow(create_params);
}
+void ShellDelegateImpl::ToggleMaximized() {
+ aura::Window* window = ash::wm::GetActiveWindow();
+ if (window)
+ ash::wm::ToggleMaximizedWindow(window);
+}
+
void ShellDelegateImpl::OpenFileManager(bool as_dialog) {
}