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

Unified Diff: ui/views/mus/window_manager_connection.h

Issue 2125663002: mus: Add watcher for all touch events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/mus/window_manager_connection.h
diff --git a/ui/views/mus/window_manager_connection.h b/ui/views/mus/window_manager_connection.h
index fe5869c1207b2c3fb4391cb36968555fc82e5e8c..f109ca71ac3170708a1563fe4cff315f094297e6 100644
--- a/ui/views/mus/window_manager_connection.h
+++ b/ui/views/mus/window_manager_connection.h
@@ -28,6 +28,7 @@ namespace views {
class ClipboardMus;
class NativeWidget;
class PointerWatcher;
+class TouchEventWatcher;
class ScreenMus;
namespace internal {
class NativeWidgetDelegate;
@@ -67,6 +68,9 @@ class VIEWS_MUS_EXPORT WindowManagerConnection
void AddPointerWatcher(PointerWatcher* watcher);
void RemovePointerWatcher(PointerWatcher* watcher);
+ void AddTouchEventWatcher(TouchEventWatcher* watcher);
+ void RemoveTouchEventWatcher(TouchEventWatcher* watcher);
+
private:
friend class WindowManagerConnectionTest;
@@ -75,6 +79,7 @@ class VIEWS_MUS_EXPORT WindowManagerConnection
// Returns true if there is one or more pointer watchers for this client.
bool HasPointerWatcher();
+ bool HasTouchEventWatcher();
// ui::WindowTreeClientDelegate:
void OnEmbed(ui::Window* root) override;
@@ -91,6 +96,7 @@ class VIEWS_MUS_EXPORT WindowManagerConnection
std::unique_ptr<ui::WindowTreeClient> client_;
// Must be empty on destruction.
base::ObserverList<PointerWatcher, true> pointer_watchers_;
+ base::ObserverList<TouchEventWatcher, true> touch_event_watchers_;
DISALLOW_COPY_AND_ASSIGN(WindowManagerConnection);
};

Powered by Google App Engine
This is Rietveld 408576698