diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-30 20:20:08 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-30 20:20:08 +0000 |
commit | 4539057c3d9df5a7c12e6b9045ab6ca1e2cf55ed (patch) | |
tree | 5ddcc6c5be03fa5f9af1de4bc8051b6c0fd16204 /ash/accelerators/accelerator_commands.cc | |
parent | 5b0605321afe769c1d7efc51445eb68fe7585c3b (diff) | |
download | chromium_src-4539057c3d9df5a7c12e6b9045ab6ca1e2cf55ed.zip chromium_src-4539057c3d9df5a7c12e6b9045ab6ca1e2cf55ed.tar.gz chromium_src-4539057c3d9df5a7c12e6b9045ab6ca1e2cf55ed.tar.bz2 |
Introduce WindowStateDelegate::ToggleFullscreen
Replace kAnimateToFullscreenKey with a boolean flag
in WindowState
I removed #if defined(OS_WIN).. #endif in chrome_shell_delegate.cc because you'll never get window in desktop environment there.
Next step. I'll look into if we can change so that WindowState::Restore can restore from fullscreen state properly.
BUG=309837
Review URL: https://codereview.chromium.org/42353002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231903 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/accelerators/accelerator_commands.cc')
-rw-r--r-- | ash/accelerators/accelerator_commands.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ash/accelerators/accelerator_commands.cc b/ash/accelerators/accelerator_commands.cc index 73f1b1a..003562e 100644 --- a/ash/accelerators/accelerator_commands.cc +++ b/ash/accelerators/accelerator_commands.cc @@ -37,10 +37,16 @@ void ToggleMaximized() { return; // Get out of fullscreen when in fullscreen mode. if (window_state->IsFullscreen()) - Shell::GetInstance()->delegate()->ToggleFullscreen(); + ToggleFullscreen(); else window_state->ToggleMaximized(); } +void ToggleFullscreen() { + wm::WindowState* window_state = wm::GetActiveWindowState(); + if (window_state) + window_state->ToggleFullscreen(); +} + } // namespace accelerators } // namespace ash |