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

Side by Side Diff: ash/wm/immersive_context_ash.cc

Issue 2908333003: [mus+ash] Removes WmWindow from ash (app_list, frame, metrics, session, system, wallpaper) (Closed)
Patch Set: [mus ash] Removes WmWindow from ash (rebase, nits and cleanup of use of ResizeHandleWindowTargeter) Created 3 years, 6 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 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/wm/immersive_context_ash.h" 5 #include "ash/wm/immersive_context_ash.h"
6 6
7 #include "ash/shared/immersive_fullscreen_controller.h" 7 #include "ash/shared/immersive_fullscreen_controller.h"
8 #include "ash/shelf/shelf.h" 8 #include "ash/shelf/shelf.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/shell_port.h" 10 #include "ash/shell_port.h"
11 #include "ash/wm/resize_handle_window_targeter.h" 11 #include "ash/wm/resize_handle_window_targeter.h"
12 #include "ash/wm/window_state.h" 12 #include "ash/wm/window_state.h"
13 #include "ash/wm/window_util.h" 13 #include "ash/wm/window_util.h"
14 #include "base/logging.h" 14 #include "base/logging.h"
15 #include "ui/display/display.h" 15 #include "ui/display/display.h"
16 #include "ui/display/screen.h" 16 #include "ui/display/screen.h"
17 #include "ui/views/widget/widget.h" 17 #include "ui/views/widget/widget.h"
18 18
19 namespace ash { 19 namespace ash {
20 20
21 ImmersiveContextAsh::ImmersiveContextAsh() {} 21 ImmersiveContextAsh::ImmersiveContextAsh() {}
22 22
23 ImmersiveContextAsh::~ImmersiveContextAsh() {} 23 ImmersiveContextAsh::~ImmersiveContextAsh() {}
24 24
25 void ImmersiveContextAsh::InstallResizeHandleWindowTargeter( 25 void ImmersiveContextAsh::InstallResizeHandleWindowTargeter(
26 ImmersiveFullscreenController* controller) { 26 ImmersiveFullscreenController* controller) {
27 aura::Window* window = controller->widget()->GetNativeWindow(); 27 wm::InstallResizeHandleWindowTargeterForWindow(
28 window->SetEventTargeter( 28 controller->widget()->GetNativeWindow(), controller);
29 base::MakeUnique<ResizeHandleWindowTargeter>(window, controller));
30 } 29 }
31 30
32 void ImmersiveContextAsh::OnEnteringOrExitingImmersive( 31 void ImmersiveContextAsh::OnEnteringOrExitingImmersive(
33 ImmersiveFullscreenController* controller, 32 ImmersiveFullscreenController* controller,
34 bool entering) { 33 bool entering) {
35 aura::Window* window = controller->widget()->GetNativeWindow(); 34 aura::Window* window = controller->widget()->GetNativeWindow();
36 wm::WindowState* window_state = wm::GetWindowState(window); 35 wm::WindowState* window_state = wm::GetWindowState(window);
37 // Auto hide the shelf in immersive fullscreen instead of hiding it. 36 // Auto hide the shelf in immersive fullscreen instead of hiding it.
38 window_state->set_hide_shelf_when_fullscreen(!entering); 37 window_state->set_hide_shelf_when_fullscreen(!entering);
39 // Update the window's immersive mode state for the window manager. 38 // Update the window's immersive mode state for the window manager.
(...skipping 22 matching lines...) Expand all
62 61
63 bool ImmersiveContextAsh::DoesAnyWindowHaveCapture() { 62 bool ImmersiveContextAsh::DoesAnyWindowHaveCapture() {
64 return wm::GetCaptureWindow() != nullptr; 63 return wm::GetCaptureWindow() != nullptr;
65 } 64 }
66 65
67 bool ImmersiveContextAsh::IsMouseEventsEnabled() { 66 bool ImmersiveContextAsh::IsMouseEventsEnabled() {
68 return ShellPort::Get()->IsMouseEventsEnabled(); 67 return ShellPort::Get()->IsMouseEventsEnabled();
69 } 68 }
70 69
71 } // namespace ash 70 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wallpaper/wallpaper_widget_controller.cc ('k') | ash/wm/lock_action_handler_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698