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