OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ash/accelerators/accelerator_commands.h" | 5 #include "ash/accelerators/accelerator_commands.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/shell_delegate.h" | 8 #include "ash/shell_delegate.h" |
9 #include "ash/wm/window_cycle_controller.h" | 9 #include "ash/wm/window_cycle_controller.h" |
10 #include "ash/wm/window_state.h" | 10 #include "ash/wm/window_state.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 window_state->Minimize(); | 30 window_state->Minimize(); |
31 return true; | 31 return true; |
32 } | 32 } |
33 | 33 |
34 void ToggleMaximized() { | 34 void ToggleMaximized() { |
35 wm::WindowState* window_state = wm::GetActiveWindowState(); | 35 wm::WindowState* window_state = wm::GetActiveWindowState(); |
36 if (!window_state) | 36 if (!window_state) |
37 return; | 37 return; |
38 // Get out of fullscreen when in fullscreen mode. | 38 // Get out of fullscreen when in fullscreen mode. |
39 if (window_state->IsFullscreen()) | 39 if (window_state->IsFullscreen()) |
40 Shell::GetInstance()->delegate()->ToggleFullscreen(); | 40 ToggleFullscreen(); |
41 else | 41 else |
42 window_state->ToggleMaximized(); | 42 window_state->ToggleMaximized(); |
43 } | 43 } |
44 | 44 |
| 45 void ToggleFullscreen() { |
| 46 wm::WindowState* window_state = wm::GetActiveWindowState(); |
| 47 if (window_state) |
| 48 window_state->ToggleFullscreen(); |
| 49 } |
| 50 |
45 } // namespace accelerators | 51 } // namespace accelerators |
46 } // namespace ash | 52 } // namespace ash |
OLD | NEW |