diff options
author | pkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-24 09:05:57 +0000 |
---|---|---|
committer | pkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-24 09:05:57 +0000 |
commit | e9e9025c4a80c8ea572697a887db4529d85a38a5 (patch) | |
tree | f7acac63354545d621c3a6bc56800b96c4084455 /ash | |
parent | 390227889236aca3255418e388424e860bd45a1a (diff) | |
download | chromium_src-e9e9025c4a80c8ea572697a887db4529d85a38a5.zip chromium_src-e9e9025c4a80c8ea572697a887db4529d85a38a5.tar.gz chromium_src-e9e9025c4a80c8ea572697a887db4529d85a38a5.tar.bz2 |
Enable fullscreening an app window using Shift+F4
BUG=229213
TEST=Manual, see bug
R=jamescook
TBR=sky (for change in chrome/browser/ui/views/accelerator_table.cc)
Review URL: https://chromiumcodereview.appspot.com/14389004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@196096 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r-- | ash/accelerators/accelerator_table.cc | 2 | ||||
-rw-r--r-- | ash/accelerators/accelerator_table.h | 1 | ||||
-rw-r--r-- | ash/shell/shell_delegate_impl.cc | 4 | ||||
-rw-r--r-- | ash/shell/shell_delegate_impl.h | 1 | ||||
-rw-r--r-- | ash/shell_delegate.h | 4 | ||||
-rw-r--r-- | ash/test/test_shell_delegate.cc | 3 | ||||
-rw-r--r-- | ash/test/test_shell_delegate.h | 1 |
7 files changed, 16 insertions, 0 deletions
diff --git a/ash/accelerators/accelerator_table.cc b/ash/accelerators/accelerator_table.cc index 9daa8b1..a3f4c5b 100644 --- a/ash/accelerators/accelerator_table.cc +++ b/ash/accelerators/accelerator_table.cc @@ -124,6 +124,7 @@ const AcceleratorData kAcceleratorData[] = { { false, ui::VKEY_LWIN, ui::EF_NONE, TOGGLE_APP_LIST }, { false, ui::VKEY_LWIN, ui::EF_ALT_DOWN, TOGGLE_CAPS_LOCK }, { true, ui::VKEY_MEDIA_LAUNCH_APP2, ui::EF_NONE, TOGGLE_MAXIMIZED }, + { true, ui::VKEY_MEDIA_LAUNCH_APP2, ui::EF_SHIFT_DOWN, TOGGLE_FULLSCREEN }, { true, ui::VKEY_VOLUME_MUTE, ui::EF_NONE, VOLUME_MUTE }, { true, ui::VKEY_VOLUME_DOWN, ui::EF_NONE, VOLUME_DOWN }, { true, ui::VKEY_VOLUME_UP, ui::EF_NONE, VOLUME_UP }, @@ -313,6 +314,7 @@ const AcceleratorAction kNonrepeatableActions[] = { SCALE_UI_UP, SCALE_UI_DOWN, SCALE_UI_RESET, + TOGGLE_FULLSCREEN, TOGGLE_MAXIMIZED, WINDOW_MINIMIZE, }; diff --git a/ash/accelerators/accelerator_table.h b/ash/accelerators/accelerator_table.h index b28e4e9..361f314 100644 --- a/ash/accelerators/accelerator_table.h +++ b/ash/accelerators/accelerator_table.h @@ -73,6 +73,7 @@ enum AcceleratorAction { TOGGLE_CAPS_LOCK, TOGGLE_CAPS_LOCK_BY_ALT_LWIN, TOGGLE_DESKTOP_BACKGROUND_MODE, + TOGGLE_FULLSCREEN, TOGGLE_MAXIMIZED, TOGGLE_ROOT_WINDOW_FULL_SCREEN, TOGGLE_SPOKEN_FEEDBACK, diff --git a/ash/shell/shell_delegate_impl.cc b/ash/shell/shell_delegate_impl.cc index 264363d..25d092a 100644 --- a/ash/shell/shell_delegate_impl.cc +++ b/ash/shell/shell_delegate_impl.cc @@ -97,6 +97,10 @@ void ShellDelegateImpl::NewWindow(bool incognito) { ash::shell::ToplevelWindow::CreateToplevelWindow(create_params); } +void ShellDelegateImpl::ToggleFullscreen() { + ToggleMaximized(); +} + void ShellDelegateImpl::ToggleMaximized() { aura::Window* window = ash::wm::GetActiveWindow(); if (window) diff --git a/ash/shell/shell_delegate_impl.h b/ash/shell/shell_delegate_impl.h index 81d5228..ddd6b95 100644 --- a/ash/shell/shell_delegate_impl.h +++ b/ash/shell/shell_delegate_impl.h @@ -35,6 +35,7 @@ class ShellDelegateImpl : public ash::ShellDelegate { virtual void Exit() OVERRIDE; virtual void NewTab() OVERRIDE; virtual void NewWindow(bool incognito) OVERRIDE; + virtual void ToggleFullscreen() OVERRIDE; virtual void ToggleMaximized() OVERRIDE; virtual void OpenFileManager(bool as_dialog) OVERRIDE; virtual void OpenCrosh() OVERRIDE; diff --git a/ash/shell_delegate.h b/ash/shell_delegate.h index 0ff5fe6..c561bf1 100644 --- a/ash/shell_delegate.h +++ b/ash/shell_delegate.h @@ -55,6 +55,7 @@ enum UserMetricsAction { UMA_ACCEL_LOCK_SCREEN_L, UMA_ACCEL_LOCK_SCREEN_LOCK_BUTTON, UMA_ACCEL_LOCK_SCREEN_POWER_BUTTON, + UMA_ACCEL_FULLSCREEN_F4, UMA_ACCEL_MAXIMIZE_RESTORE_F4, UMA_ACCEL_NEWTAB_T, UMA_ACCEL_NEXTWINDOW_F5, @@ -126,6 +127,9 @@ class ASH_EXPORT ShellDelegate { // Invoked when the user uses Ctrl-N or Ctrl-Shift-N to open a new window. virtual void NewWindow(bool incognito) = 0; + // Invoked when the user uses Shift+F4 to toggle the window fullscreen state. + virtual void ToggleFullscreen() = 0; + // Invoked when the user uses F4 to toggle window maximized state. virtual void ToggleMaximized() = 0; diff --git a/ash/test/test_shell_delegate.cc b/ash/test/test_shell_delegate.cc index 8013d08..17792c7 100644 --- a/ash/test/test_shell_delegate.cc +++ b/ash/test/test_shell_delegate.cc @@ -67,6 +67,9 @@ void TestShellDelegate::ToggleMaximized() { ash::wm::ToggleMaximizedWindow(window); } +void TestShellDelegate::ToggleFullscreen() { +} + void TestShellDelegate::OpenFileManager(bool as_dialog) { } diff --git a/ash/test/test_shell_delegate.h b/ash/test/test_shell_delegate.h index 6c95ea8..04f2997 100644 --- a/ash/test/test_shell_delegate.h +++ b/ash/test/test_shell_delegate.h @@ -34,6 +34,7 @@ class TestShellDelegate : public ShellDelegate { virtual void Exit() OVERRIDE; virtual void NewTab() OVERRIDE; virtual void NewWindow(bool incognito) OVERRIDE; + virtual void ToggleFullscreen() OVERRIDE; virtual void ToggleMaximized() OVERRIDE; virtual void OpenFileManager(bool as_dialog) OVERRIDE; virtual void OpenCrosh() OVERRIDE; |