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

Side by Side Diff: ash/common/wm/immersive_context_ash.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
« no previous file with comments | « ash/common/shelf/shelf_layout_manager.cc ('k') | ash/common/wm/window_state.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/wm/immersive_context_ash.h" 5 #include "ash/common/wm/immersive_context_ash.h"
6 6
7 #include "ash/common/shelf/wm_shelf.h" 7 #include "ash/common/shelf/wm_shelf.h"
8 #include "ash/common/wm/window_state.h" 8 #include "ash/common/wm/window_state.h"
9 #include "ash/common/wm_lookup.h" 9 #include "ash/common/wm_lookup.h"
10 #include "ash/common/wm_shell.h" 10 #include "ash/common/wm_shell.h"
(...skipping 14 matching lines...) Expand all
25 WmWindow* window = WmLookup::Get()->GetWindowForWidget(controller->widget()); 25 WmWindow* window = WmLookup::Get()->GetWindowForWidget(controller->widget());
26 window->InstallResizeHandleWindowTargeter(controller); 26 window->InstallResizeHandleWindowTargeter(controller);
27 } 27 }
28 28
29 void ImmersiveContextAsh::OnEnteringOrExitingImmersive( 29 void ImmersiveContextAsh::OnEnteringOrExitingImmersive(
30 ImmersiveFullscreenController* controller, 30 ImmersiveFullscreenController* controller,
31 bool entering) { 31 bool entering) {
32 WmWindow* window = WmLookup::Get()->GetWindowForWidget(controller->widget()); 32 WmWindow* window = WmLookup::Get()->GetWindowForWidget(controller->widget());
33 wm::WindowState* window_state = window->GetWindowState(); 33 wm::WindowState* window_state = window->GetWindowState();
34 // Auto hide the shelf in immersive fullscreen instead of hiding it. 34 // Auto hide the shelf in immersive fullscreen instead of hiding it.
35 window_state->set_shelf_mode_in_fullscreen( 35 window_state->set_hide_shelf_when_fullscreen(!entering);
36 entering ? ash::wm::WindowState::SHELF_AUTO_HIDE_VISIBLE
37 : ash::wm::WindowState::SHELF_HIDDEN);
38
39 // Update the window's immersive mode state for the window manager. 36 // Update the window's immersive mode state for the window manager.
40 window_state->set_in_immersive_fullscreen(entering); 37 window_state->set_in_immersive_fullscreen(entering);
41 38
42 for (WmWindow* root_window : WmShell::Get()->GetAllRootWindows()) 39 for (WmWindow* root_window : WmShell::Get()->GetAllRootWindows())
43 WmShelf::ForWindow(root_window)->UpdateVisibilityState(); 40 WmShelf::ForWindow(root_window)->UpdateVisibilityState();
44 } 41 }
45 42
46 gfx::Rect ImmersiveContextAsh::GetDisplayBoundsInScreen(views::Widget* widget) { 43 gfx::Rect ImmersiveContextAsh::GetDisplayBoundsInScreen(views::Widget* widget) {
47 WmWindow* window = WmLookup::Get()->GetWindowForWidget(widget); 44 WmWindow* window = WmLookup::Get()->GetWindowForWidget(widget);
48 return window->GetDisplayNearestWindow().bounds(); 45 return window->GetDisplayNearestWindow().bounds();
(...skipping 11 matching lines...) Expand all
60 57
61 bool ImmersiveContextAsh::DoesAnyWindowHaveCapture() { 58 bool ImmersiveContextAsh::DoesAnyWindowHaveCapture() {
62 return WmShell::Get()->GetCaptureWindow() != nullptr; 59 return WmShell::Get()->GetCaptureWindow() != nullptr;
63 } 60 }
64 61
65 bool ImmersiveContextAsh::IsMouseEventsEnabled() { 62 bool ImmersiveContextAsh::IsMouseEventsEnabled() {
66 return WmShell::Get()->IsMouseEventsEnabled(); 63 return WmShell::Get()->IsMouseEventsEnabled();
67 } 64 }
68 65
69 } // namespace ash 66 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/shelf/shelf_layout_manager.cc ('k') | ash/common/wm/window_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698