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

Issue 2125663002: mus: Add watcher for all touch events. (Closed)

Created:
4 years, 5 months ago by riajiang
Modified:
4 years, 5 months ago
Reviewers:
msw, James Cook, sadrul, sky
CC:
chromium-reviews, rjkroege, tfarina, James Cook
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

mus: Add watcher for all touch events. BUG=588311 TEST=views_mus_unittests Committed: https://crrev.com/aa9394e02706b89d95c3676396ebed708a6a2ea7 Cr-Commit-Position: refs/heads/master@{#405297}

Patch Set 1 #

Total comments: 9

Patch Set 2 : Support multiple event observers. #

Patch Set 3 : Erase id when removing watcher. #

Patch Set 4 : Change to receive array of event observer ids. #

Patch Set 5 : Change back a test case. #

Patch Set 6 : Move Change struct. #

Patch Set 7 : Overload copy assignment operator for Change struct. #

Total comments: 3

Patch Set 8 : Change back to support only one event matcher with TODOs and DCHECKs. #

Total comments: 12

Patch Set 9 : Use std::find; check if has PointerWatcher/TouchEventWatcher. #

Total comments: 7

Patch Set 10 : DCHECK #

Patch Set 11 : DCHECK #

Total comments: 13

Patch Set 12 : Early return; etc #

Patch Set 13 : Add touch_event_watcher.h to includes #

Patch Set 14 : Change back to ifs #

Total comments: 2

Patch Set 15 : Fix a comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+225 lines, -20 lines) Patch
M services/ui/ws/window_tree.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +19 lines, -9 lines 0 comments Download
M ui/views/mus/window_manager_connection.h View 1 2 3 4 5 6 7 8 9 4 chunks +7 lines, -1 line 0 comments Download
M ui/views/mus/window_manager_connection.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +50 lines, -8 lines 0 comments Download
M ui/views/mus/window_manager_connection_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +96 lines, -0 lines 0 comments Download
M ui/views/pointer_watcher.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +8 lines, -2 lines 0 comments Download
A ui/views/touch_event_watcher.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +43 lines, -0 lines 0 comments Download
M ui/views/views.gyp View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M ui/views/views_exports.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 40 (16 generated)
riajiang
4 years, 5 months ago (2016-07-05 16:30:31 UTC) #2
sky
Can you outline what functionality you need? https://codereview.chromium.org/2125663002/diff/1/ui/views/views.gyp File ui/views/views.gyp (right): https://codereview.chromium.org/2125663002/diff/1/ui/views/views.gyp#newcode302 ui/views/views.gyp:302: 'touch_event_watcher.h', I ...
4 years, 5 months ago (2016-07-06 16:23:14 UTC) #3
riajiang
On 2016/07/06 16:23:14, sky wrote: > Can you outline what functionality you need? > > ...
4 years, 5 months ago (2016-07-06 17:57:42 UTC) #4
sky
https://codereview.chromium.org/2125663002/diff/1/services/ui/ws/window_tree.cc File services/ui/ws/window_tree.cc (right): https://codereview.chromium.org/2125663002/diff/1/services/ui/ws/window_tree.cc#newcode1182 services/ui/ws/window_tree.cc:1182: } else if (matcher->pointer_kind_matcher) { Shouldn't this conditional be ...
4 years, 5 months ago (2016-07-06 20:22:02 UTC) #5
riajiang
https://codereview.chromium.org/2125663002/diff/1/services/ui/ws/window_tree.cc File services/ui/ws/window_tree.cc (right): https://codereview.chromium.org/2125663002/diff/1/services/ui/ws/window_tree.cc#newcode1182 services/ui/ws/window_tree.cc:1182: } else if (matcher->pointer_kind_matcher) { On 2016/07/06 20:22:02, sky ...
4 years, 5 months ago (2016-07-08 02:51:40 UTC) #6
sky
https://codereview.chromium.org/2125663002/diff/120001/services/ui/public/interfaces/window_tree.mojom File services/ui/public/interfaces/window_tree.mojom (right): https://codereview.chromium.org/2125663002/diff/120001/services/ui/public/interfaces/window_tree.mojom#newcode76 services/ui/public/interfaces/window_tree.mojom:76: AddEventObserver(EventMatcher? matcher, uint32 observer_id); In thinking about this a ...
4 years, 5 months ago (2016-07-08 15:41:11 UTC) #7
sadrul
https://codereview.chromium.org/2125663002/diff/120001/services/ui/public/interfaces/window_tree.mojom File services/ui/public/interfaces/window_tree.mojom (right): https://codereview.chromium.org/2125663002/diff/120001/services/ui/public/interfaces/window_tree.mojom#newcode76 services/ui/public/interfaces/window_tree.mojom:76: AddEventObserver(EventMatcher? matcher, uint32 observer_id); On 2016/07/08 15:41:11, sky wrote: ...
4 years, 5 months ago (2016-07-08 15:51:30 UTC) #8
sky
I'm ok with a TODO and DCHECK that we don't attempt to register both types ...
4 years, 5 months ago (2016-07-08 16:35:46 UTC) #9
riajiang
+msw, since sky is OOO https://codereview.chromium.org/2125663002/diff/120001/services/ui/public/interfaces/window_tree.mojom File services/ui/public/interfaces/window_tree.mojom (right): https://codereview.chromium.org/2125663002/diff/120001/services/ui/public/interfaces/window_tree.mojom#newcode76 services/ui/public/interfaces/window_tree.mojom:76: AddEventObserver(EventMatcher? matcher, uint32 observer_id); ...
4 years, 5 months ago (2016-07-11 20:13:22 UTC) #11
sadrul
https://codereview.chromium.org/2125663002/diff/140001/services/ui/ws/window_tree.cc File services/ui/ws/window_tree.cc (right): https://codereview.chromium.org/2125663002/diff/140001/services/ui/ws/window_tree.cc#newcode1184 services/ui/ws/window_tree.cc:1184: for (ui::mojom::EventType event_type : event_type_whitelist) { Can you use ...
4 years, 5 months ago (2016-07-11 20:47:52 UTC) #12
riajiang
https://codereview.chromium.org/2125663002/diff/140001/services/ui/ws/window_tree.cc File services/ui/ws/window_tree.cc (right): https://codereview.chromium.org/2125663002/diff/140001/services/ui/ws/window_tree.cc#newcode1184 services/ui/ws/window_tree.cc:1184: for (ui::mojom::EventType event_type : event_type_whitelist) { On 2016/07/11 20:47:51, ...
4 years, 5 months ago (2016-07-11 21:51:40 UTC) #13
sadrul
lgtm with the comments addressed https://codereview.chromium.org/2125663002/diff/160001/services/ui/ws/window_tree.cc File services/ui/ws/window_tree.cc (right): https://codereview.chromium.org/2125663002/diff/160001/services/ui/ws/window_tree.cc#newcode1193 services/ui/ws/window_tree.cc:1193: allowed = iter != ...
4 years, 5 months ago (2016-07-12 19:21:05 UTC) #14
riajiang
https://codereview.chromium.org/2125663002/diff/160001/services/ui/ws/window_tree.cc File services/ui/ws/window_tree.cc (right): https://codereview.chromium.org/2125663002/diff/160001/services/ui/ws/window_tree.cc#newcode1193 services/ui/ws/window_tree.cc:1193: allowed = iter != std::end(pointer_kind_whitelist); On 2016/07/12 19:21:05, sadrul ...
4 years, 5 months ago (2016-07-12 20:35:47 UTC) #15
msw
lgtm with nits and a q; +CC jamescook for FYI. https://codereview.chromium.org/2125663002/diff/200001/services/ui/ws/window_tree.cc File services/ui/ws/window_tree.cc (right): https://codereview.chromium.org/2125663002/diff/200001/services/ui/ws/window_tree.cc#newcode1189 ...
4 years, 5 months ago (2016-07-12 22:23:11 UTC) #17
James Cook
It feels weird to me to have two "watchers" that can both listen for touch-down ...
4 years, 5 months ago (2016-07-12 23:22:59 UTC) #19
sadrul
On 2016/07/12 23:22:59, James Cook wrote: > It feels weird to me to have two ...
4 years, 5 months ago (2016-07-13 00:28:30 UTC) #20
riajiang
https://codereview.chromium.org/2125663002/diff/200001/services/ui/ws/window_tree.cc File services/ui/ws/window_tree.cc (right): https://codereview.chromium.org/2125663002/diff/200001/services/ui/ws/window_tree.cc#newcode1184 services/ui/ws/window_tree.cc:1184: allowed = iter != std::end(event_type_whitelist); On 2016/07/12 23:22:59, James ...
4 years, 5 months ago (2016-07-13 15:40:21 UTC) #21
riajiang
PTAL https://codereview.chromium.org/2125663002/diff/160001/ui/views/mus/window_manager_connection.cc File ui/views/mus/window_manager_connection.cc (right): https://codereview.chromium.org/2125663002/diff/160001/ui/views/mus/window_manager_connection.cc#newcode225 ui/views/mus/window_manager_connection.cc:225: if (event.IsTouchEvent() || event.IsTouchPointerEvent()) { On 2016/07/12 20:35:47, ...
4 years, 5 months ago (2016-07-13 20:03:09 UTC) #26
sadrul
still lgtm https://codereview.chromium.org/2125663002/diff/260001/ui/views/mus/window_manager_connection.cc File ui/views/mus/window_manager_connection.cc (right): https://codereview.chromium.org/2125663002/diff/260001/ui/views/mus/window_manager_connection.cc#newcode124 ui/views/mus/window_manager_connection.cc:124: // Last PointerWatcher removed, stop the event ...
4 years, 5 months ago (2016-07-13 20:05:50 UTC) #27
riajiang
https://codereview.chromium.org/2125663002/diff/260001/ui/views/mus/window_manager_connection.cc File ui/views/mus/window_manager_connection.cc (right): https://codereview.chromium.org/2125663002/diff/260001/ui/views/mus/window_manager_connection.cc#newcode124 ui/views/mus/window_manager_connection.cc:124: // Last PointerWatcher removed, stop the event observer. On ...
4 years, 5 months ago (2016-07-13 20:14:27 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2125663002/280001
4 years, 5 months ago (2016-07-13 20:16:01 UTC) #34
commit-bot: I haz the power
Committed patchset #15 (id:280001)
4 years, 5 months ago (2016-07-13 21:37:33 UTC) #36
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-13 21:37:37 UTC) #37
commit-bot: I haz the power
4 years, 5 months ago (2016-07-13 21:39:17 UTC) #39
Message was sent while issue was closed.
Patchset 15 (id:??) landed as
https://crrev.com/aa9394e02706b89d95c3676396ebed708a6a2ea7
Cr-Commit-Position: refs/heads/master@{#405297}

Powered by Google App Engine
This is Rietveld 408576698