Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Side by Side Diff: chrome/browser/ui/ash/accelerator_commands_browsertest.cc

Issue 2248773002: Use MD-ash's auto hide behavior for arc++ windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add ash/shell.h bac to merge to m53 Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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));
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698