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

Unified Diff: services/ui/ws/window_tree.h

Issue 2125663002: mus: Add watcher for all touch events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Overload copy assignment operator for Change struct. 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/ws/window_tree.h
diff --git a/services/ui/ws/window_tree.h b/services/ui/ws/window_tree.h
index c975b06e0d61f82010c5c70599b19d540a1528c8..fd73bf3c8bb16403f8fb7ba7a415c356b8fe144a 100644
--- a/services/ui/ws/window_tree.h
+++ b/services/ui/ws/window_tree.h
@@ -360,8 +360,9 @@ class WindowTree : public mojom::WindowTree,
override;
void SetCapture(uint32_t change_id, Id window_id) override;
void ReleaseCapture(uint32_t change_id, Id window_id) override;
- void SetEventObserver(mojom::EventMatcherPtr matcher,
+ void AddEventObserver(mojom::EventMatcherPtr matcher,
uint32_t observer_id) override;
+ void RemoveEventObserver(uint32_t observer_id) override;
void SetWindowBounds(uint32_t change_id,
Id window_id,
const gfx::Rect& bounds) override;
@@ -472,12 +473,10 @@ class WindowTree : public mojom::WindowTree,
// reasonable timeframe.
bool janky_ = false;
- // Set when the client is using SetEventObserver() to observe events,
- // otherwise null.
- std::unique_ptr<EventMatcher> event_observer_matcher_;
-
- // The ID supplied by the client for the current event observer.
- uint32_t event_observer_id_ = 0;
+ // Set when the client is using AddEventObserver() to observe events,
+ // otherwise null. Key is an ID supplied by the client for the
+ // event observer
+ std::map<uint32_t, std::unique_ptr<EventMatcher>> event_observer_matchers_;
// WindowManager the current event came from.
WindowManagerState* event_source_wms_ = nullptr;

Powered by Google App Engine
This is Rietveld 408576698