OLD | NEW |
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 30 matching lines...) Expand all Loading... |
41 | 41 |
42 for (WmWindow* root_window : WmShell::Get()->GetAllRootWindows()) | 42 for (WmWindow* root_window : WmShell::Get()->GetAllRootWindows()) |
43 WmShelf::ForWindow(root_window)->UpdateVisibilityState(); | 43 WmShelf::ForWindow(root_window)->UpdateVisibilityState(); |
44 } | 44 } |
45 | 45 |
46 gfx::Rect ImmersiveContextAsh::GetDisplayBoundsInScreen(views::Widget* widget) { | 46 gfx::Rect ImmersiveContextAsh::GetDisplayBoundsInScreen(views::Widget* widget) { |
47 WmWindow* window = WmLookup::Get()->GetWindowForWidget(widget); | 47 WmWindow* window = WmLookup::Get()->GetWindowForWidget(widget); |
48 return window->GetDisplayNearestWindow().bounds(); | 48 return window->GetDisplayNearestWindow().bounds(); |
49 } | 49 } |
50 | 50 |
51 void ImmersiveContextAsh::AddPointerWatcher(views::PointerWatcher* watcher, | 51 void ImmersiveContextAsh::AddPointerWatcher( |
52 bool wants_moves) { | 52 views::PointerWatcher* watcher, |
53 WmShell::Get()->AddPointerWatcher(watcher, wants_moves); | 53 views::PointerWatcherEventTypes events) { |
| 54 WmShell::Get()->AddPointerWatcher(watcher, events); |
54 } | 55 } |
55 | 56 |
56 void ImmersiveContextAsh::RemovePointerWatcher(views::PointerWatcher* watcher) { | 57 void ImmersiveContextAsh::RemovePointerWatcher(views::PointerWatcher* watcher) { |
57 WmShell::Get()->RemovePointerWatcher(watcher); | 58 WmShell::Get()->RemovePointerWatcher(watcher); |
58 } | 59 } |
59 | 60 |
60 bool ImmersiveContextAsh::DoesAnyWindowHaveCapture() { | 61 bool ImmersiveContextAsh::DoesAnyWindowHaveCapture() { |
61 return WmShell::Get()->GetCaptureWindow() != nullptr; | 62 return WmShell::Get()->GetCaptureWindow() != nullptr; |
62 } | 63 } |
63 | 64 |
64 bool ImmersiveContextAsh::IsMouseEventsEnabled() { | 65 bool ImmersiveContextAsh::IsMouseEventsEnabled() { |
65 return WmShell::Get()->IsMouseEventsEnabled(); | 66 return WmShell::Get()->IsMouseEventsEnabled(); |
66 } | 67 } |
67 | 68 |
68 } // namespace ash | 69 } // namespace ash |
OLD | NEW |