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

Unified Diff: services/ui/public/cpp/window_tree_client.h

Issue 2183163002: mus: Change PointerWatcher to observe all pointer events, with moves optional. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Event conversion; comments; rebase 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: services/ui/public/cpp/window_tree_client.h
diff --git a/services/ui/public/cpp/window_tree_client.h b/services/ui/public/cpp/window_tree_client.h
index 5f11f731b219761bb7f976d573e59a5f24b07486..2393af156240e8b0931dc6414f97ece65cf5ea8a 100644
--- a/services/ui/public/cpp/window_tree_client.h
+++ b/services/ui/public/cpp/window_tree_client.h
@@ -178,10 +178,11 @@ class WindowTreeClient : public mojom::WindowTreeClient,
// race the asynchronous initialization; but in that case we return (0, 0).
gfx::Point GetCursorScreenPoint();
- // See description in window_tree.mojom. When an existing event observer is
- // updated or cleared then any future events from the server for that observer
+ // See description in window_tree.mojom. When an existing pointer watcher is
+ // updated or cleared then any future events from the server for that watcher
// will be ignored.
- void SetEventObserver(mojom::EventMatcherPtr matcher);
+ void StartPointerWatcher(bool want_moves);
+ void StopPointerWatcher();
// Performs a window move. |callback| will be asynchronously called with the
// whether the move loop completed successfully.
@@ -309,9 +310,9 @@ class WindowTreeClient : public mojom::WindowTreeClient,
void OnWindowInputEvent(uint32_t event_id,
Id window_id,
std::unique_ptr<ui::Event> event,
- uint32_t event_observer_id) override;
- void OnEventObserved(std::unique_ptr<ui::Event> event,
- uint32_t event_observer_id) override;
+ uint32_t pointer_watcher_id) override;
+ void OnPointerWatcherEvent(std::unique_ptr<ui::Event> event,
+ uint32_t pointer_watcher_id) override;
void OnWindowFocused(Id focused_window_id) override;
void OnWindowPredefinedCursorChanged(Id window_id,
mojom::Cursor cursor) override;
@@ -363,6 +364,8 @@ class WindowTreeClient : public mojom::WindowTreeClient,
const gfx::Vector2d& offset,
const gfx::Insets& hit_area) override;
+ void OnPointerWatcherEventImpl(const ui::Event& event, Window* target);
+
// The one int in |cursor_location_mapping_|. When we read from this
// location, we must always read from it atomically.
base::subtle::Atomic32* cursor_location_memory() {
@@ -414,10 +417,10 @@ class WindowTreeClient : public mojom::WindowTreeClient,
window_manager_internal_;
mojom::WindowManagerClientAssociatedPtr window_manager_internal_client_;
- bool has_event_observer_ = false;
+ bool has_pointer_watcher_ = false;
- // Monotonically increasing ID for event observers.
- uint32_t event_observer_id_ = 0u;
+ // Monotonically increasing ID for pointer watchers.
+ uint32_t pointer_watcher_id_ = 0u;
// The current change id for the client.
uint32_t current_move_loop_change_ = 0u;

Powered by Google App Engine
This is Rietveld 408576698