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/common/accelerators/accelerator_commands.h" | 5 #include "ash/common/accelerators/accelerator_commands.h" |
6 | 6 |
7 #include "ash/accelerators/accelerator_commands_aura.h" | 7 #include "ash/accelerators/accelerator_commands_aura.h" |
8 #include "ash/aura/wm_window_aura.h" | 8 #include "ash/aura/wm_window_aura.h" |
9 #include "ash/common/ash_switches.h" | 9 #include "ash/common/ash_switches.h" |
10 #include "ash/common/wm/window_state.h" | 10 #include "ash/common/wm/window_state.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 DISALLOW_COPY_AND_ASSIGN(MaximizableWidgetDelegate); | 45 DISALLOW_COPY_AND_ASSIGN(MaximizableWidgetDelegate); |
46 }; | 46 }; |
47 | 47 |
48 // Returns true if |window_state|'s window is in immersive fullscreen. Infer | 48 // Returns true if |window_state|'s window is in immersive fullscreen. Infer |
49 // whether the window is in immersive fullscreen based on whether the shelf is | 49 // whether the window is in immersive fullscreen based on whether the shelf is |
50 // hidden when the window is fullscreen. (This is not quite right because the | 50 // hidden when the window is fullscreen. (This is not quite right because the |
51 // shelf is hidden if a window is in both immersive fullscreen and tab | 51 // shelf is hidden if a window is in both immersive fullscreen and tab |
52 // fullscreen.) | 52 // fullscreen.) |
53 bool IsInImmersiveFullscreen(ash::wm::WindowState* window_state) { | 53 bool IsInImmersiveFullscreen(ash::wm::WindowState* window_state) { |
54 return window_state->IsFullscreen() && | 54 return window_state->IsFullscreen() && |
55 !window_state->hide_shelf_when_fullscreen(); | 55 (window_state->shelf_mode_in_fullscreen() != |
| 56 ash::wm::WindowState::SHELF_HIDDEN); |
56 } | 57 } |
57 | 58 |
58 } // namespace | 59 } // namespace |
59 | 60 |
60 typedef InProcessBrowserTest AcceleratorCommandsBrowserTest; | 61 typedef InProcessBrowserTest AcceleratorCommandsBrowserTest; |
61 | 62 |
62 // Confirm that toggling window miximized works properly | 63 // Confirm that toggling window miximized works properly |
63 IN_PROC_BROWSER_TEST_F(AcceleratorCommandsBrowserTest, ToggleMaximized) { | 64 IN_PROC_BROWSER_TEST_F(AcceleratorCommandsBrowserTest, ToggleMaximized) { |
64 ASSERT_TRUE(ash::Shell::HasInstance()) << "No Instance"; | 65 ASSERT_TRUE(ash::Shell::HasInstance()) << "No Instance"; |
65 ash::wm::WindowState* window_state = ash::wm::GetActiveWindowState(); | 66 ash::wm::WindowState* window_state = ash::wm::GetActiveWindowState(); |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 CloseAppWindow(app_window); | 308 CloseAppWindow(app_window); |
308 } | 309 } |
309 } | 310 } |
310 | 311 |
311 INSTANTIATE_TEST_CASE_P(InitiallyRestored, | 312 INSTANTIATE_TEST_CASE_P(InitiallyRestored, |
312 AcceleratorCommandsPlatformAppFullscreenBrowserTest, | 313 AcceleratorCommandsPlatformAppFullscreenBrowserTest, |
313 Values(ui::SHOW_STATE_NORMAL)); | 314 Values(ui::SHOW_STATE_NORMAL)); |
314 INSTANTIATE_TEST_CASE_P(InitiallyMaximized, | 315 INSTANTIATE_TEST_CASE_P(InitiallyMaximized, |
315 AcceleratorCommandsPlatformAppFullscreenBrowserTest, | 316 AcceleratorCommandsPlatformAppFullscreenBrowserTest, |
316 Values(ui::SHOW_STATE_MAXIMIZED)); | 317 Values(ui::SHOW_STATE_MAXIMIZED)); |
OLD | NEW |