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

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

Issue 2368343002: Revert auto-hide-invisible mode for ARC++ (Closed)
Patch Set: Revert "Use MD-ash's auto hide behavior for arc++ windows." Created 4 years, 2 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/wm/window_state.h" 9 #include "ash/common/wm/window_state.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 DISALLOW_COPY_AND_ASSIGN(MaximizableWidgetDelegate); 44 DISALLOW_COPY_AND_ASSIGN(MaximizableWidgetDelegate);
45 }; 45 };
46 46
47 // Returns true if |window_state|'s window is in immersive fullscreen. Infer 47 // Returns true if |window_state|'s window is in immersive fullscreen. Infer
48 // whether the window is in immersive fullscreen based on whether the shelf is 48 // whether the window is in immersive fullscreen based on whether the shelf is
49 // hidden when the window is fullscreen. (This is not quite right because the 49 // hidden when the window is fullscreen. (This is not quite right because the
50 // shelf is hidden if a window is in both immersive fullscreen and tab 50 // shelf is hidden if a window is in both immersive fullscreen and tab
51 // fullscreen.) 51 // fullscreen.)
52 bool IsInImmersiveFullscreen(ash::wm::WindowState* window_state) { 52 bool IsInImmersiveFullscreen(ash::wm::WindowState* window_state) {
53 return window_state->IsFullscreen() && 53 return window_state->IsFullscreen() &&
54 (window_state->shelf_mode_in_fullscreen() != 54 !window_state->hide_shelf_when_fullscreen();
55 ash::wm::WindowState::SHELF_HIDDEN);
56 } 55 }
57 56
58 } // namespace 57 } // namespace
59 58
60 typedef InProcessBrowserTest AcceleratorCommandsBrowserTest; 59 typedef InProcessBrowserTest AcceleratorCommandsBrowserTest;
61 60
62 // Confirm that toggling window miximized works properly 61 // Confirm that toggling window miximized works properly
63 IN_PROC_BROWSER_TEST_F(AcceleratorCommandsBrowserTest, ToggleMaximized) { 62 IN_PROC_BROWSER_TEST_F(AcceleratorCommandsBrowserTest, ToggleMaximized) {
64 ASSERT_TRUE(ash::Shell::HasInstance()) << "No Instance"; 63 ASSERT_TRUE(ash::Shell::HasInstance()) << "No Instance";
65 ash::wm::WindowState* window_state = ash::wm::GetActiveWindowState(); 64 ash::wm::WindowState* window_state = ash::wm::GetActiveWindowState();
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 CloseAppWindow(app_window); 306 CloseAppWindow(app_window);
308 } 307 }
309 } 308 }
310 309
311 INSTANTIATE_TEST_CASE_P(InitiallyRestored, 310 INSTANTIATE_TEST_CASE_P(InitiallyRestored,
312 AcceleratorCommandsPlatformAppFullscreenBrowserTest, 311 AcceleratorCommandsPlatformAppFullscreenBrowserTest,
313 Values(ui::SHOW_STATE_NORMAL)); 312 Values(ui::SHOW_STATE_NORMAL));
314 INSTANTIATE_TEST_CASE_P(InitiallyMaximized, 313 INSTANTIATE_TEST_CASE_P(InitiallyMaximized,
315 AcceleratorCommandsPlatformAppFullscreenBrowserTest, 314 AcceleratorCommandsPlatformAppFullscreenBrowserTest,
316 Values(ui::SHOW_STATE_MAXIMIZED)); 315 Values(ui::SHOW_STATE_MAXIMIZED));
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698