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

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

Issue 2271393002: Wires up drags to pointer watcher adapter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Created 4 years, 3 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/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
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 bool wants_moves,
54 WmShell::Get()->AddPointerWatcher(watcher, wants_moves); 54 bool wants_drags) {
55 WmShell::Get()->AddPointerWatcher(watcher, wants_moves, wants_drags);
55 } 56 }
56 57
57 void ImmersiveContextAsh::RemovePointerWatcher(views::PointerWatcher* watcher) { 58 void ImmersiveContextAsh::RemovePointerWatcher(views::PointerWatcher* watcher) {
58 WmShell::Get()->RemovePointerWatcher(watcher); 59 WmShell::Get()->RemovePointerWatcher(watcher);
59 } 60 }
60 61
61 bool ImmersiveContextAsh::DoesAnyWindowHaveCapture() { 62 bool ImmersiveContextAsh::DoesAnyWindowHaveCapture() {
62 return WmShell::Get()->GetCaptureWindow() != nullptr; 63 return WmShell::Get()->GetCaptureWindow() != nullptr;
63 } 64 }
64 65
65 bool ImmersiveContextAsh::IsMouseEventsEnabled() { 66 bool ImmersiveContextAsh::IsMouseEventsEnabled() {
66 return WmShell::Get()->IsMouseEventsEnabled(); 67 return WmShell::Get()->IsMouseEventsEnabled();
67 } 68 }
68 69
69 } // namespace ash 70 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698