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

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: Fixed patch set 8 errors. 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
« no previous file with comments | « ash/common/wm/immersive_context_ash.h ('k') | ash/common/wm_shell.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 30 matching lines...) Expand all
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
OLDNEW
« no previous file with comments | « ash/common/wm/immersive_context_ash.h ('k') | ash/common/wm_shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698