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

Issue 2163453002: mus: Change PointerWatcher to watch for all events. (Closed)

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

Description

mus: Change PointerWatcher to watch for all events. BUG=628663 TEST=views_mus_unittests

Patch Set 1 #

Patch Set 2 : Fix a comment. #

Patch Set 3 : Fix a comment. #

Total comments: 8

Patch Set 4 : AddPointerEventWatcher #

Total comments: 1

Patch Set 5 : Change PointerWatcher to watch for all events. #

Patch Set 6 : Add back location #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+235 lines, -233 lines) Patch
M ash/common/shelf/overflow_bubble.h View 1 2 3 4 5 1 chunk +3 lines, -6 lines 0 comments Download
M ash/common/shelf/overflow_bubble.cc View 1 2 3 4 5 1 chunk +4 lines, -9 lines 1 comment Download
M ash/common/system/tray/tray_event_filter.h View 1 2 3 4 5 1 chunk +3 lines, -6 lines 0 comments Download
M ash/common/system/tray/tray_event_filter.cc View 1 2 3 4 5 1 chunk +4 lines, -9 lines 0 comments Download
M ash/pointer_watcher_delegate_aura.cc View 1 2 3 4 5 1 chunk +8 lines, -6 lines 0 comments Download
M ash/shelf/shelf_tooltip_manager.h View 1 2 3 4 5 1 chunk +3 lines, -6 lines 0 comments Download
M ash/shelf/shelf_tooltip_manager.cc View 1 2 3 4 5 1 chunk +5 lines, -11 lines 0 comments Download
M ash/sysui/pointer_watcher_delegate_mus.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M ash/touch_hud/mus/touch_hud_application.cc View 1 2 3 4 5 3 chunks +9 lines, -7 lines 0 comments Download
M content/browser/renderer_host/web_input_event_aura.cc View 1 2 3 4 1 chunk +3 lines, -2 lines 0 comments Download
M ui/events/event_constants.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M ui/events/gestures/motion_event_aura.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M ui/views/mus/window_manager_connection.h View 1 2 3 4 5 4 chunks +4 lines, -7 lines 0 comments Download
M ui/views/mus/window_manager_connection.cc View 1 2 3 4 5 6 chunks +45 lines, -55 lines 1 comment Download
M ui/views/mus/window_manager_connection_unittest.cc View 1 2 3 4 5 8 chunks +135 lines, -53 lines 0 comments Download
M ui/views/pointer_watcher.h View 1 2 3 4 5 2 chunks +4 lines, -8 lines 0 comments Download
D ui/views/touch_event_watcher.h View 1 chunk +0 lines, -43 lines 0 comments Download
M ui/views/views.gyp View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M ui/views/views_exports.cc View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 31 (8 generated)
riajiang
4 years, 5 months ago (2016-07-18 21:25:42 UTC) #2
sadrul
https://codereview.chromium.org/2163453002/diff/40001/ui/views/mus/window_manager_connection.h File ui/views/mus/window_manager_connection.h (right): https://codereview.chromium.org/2163453002/diff/40001/ui/views/mus/window_manager_connection.h#newcode68 ui/views/mus/window_manager_connection.h:68: void AddPointerWatcher(PointerWatcher* watcher); Rename to AddPointerDownWatcher(PointerDownWatcher*) https://codereview.chromium.org/2163453002/diff/40001/ui/views/mus/window_manager_connection.h#newcode75 ui/views/mus/window_manager_connection.h:75: void ...
4 years, 5 months ago (2016-07-19 00:18:03 UTC) #7
sadrul
+sky@ for his thoughts on renaming PointerWatcher* to PointerDownWatcher*, TouchEventWatcher to PointerEventWatcher, and having a ...
4 years, 5 months ago (2016-07-19 14:58:16 UTC) #9
sky
On 2016/07/19 14:58:16, sadrul wrote: > +sky@ for his thoughts on renaming PointerWatcher* to PointerDownWatcher*, ...
4 years, 5 months ago (2016-07-19 17:59:35 UTC) #10
riajiang
https://codereview.chromium.org/2163453002/diff/40001/ui/views/mus/window_manager_connection.h File ui/views/mus/window_manager_connection.h (right): https://codereview.chromium.org/2163453002/diff/40001/ui/views/mus/window_manager_connection.h#newcode68 ui/views/mus/window_manager_connection.h:68: void AddPointerWatcher(PointerWatcher* watcher); On 2016/07/19 00:18:03, sadrul wrote: > ...
4 years, 5 months ago (2016-07-19 18:46:34 UTC) #11
sadrul
https://codereview.chromium.org/2163453002/diff/60001/ui/views/mus/window_manager_connection.h File ui/views/mus/window_manager_connection.h (right): https://codereview.chromium.org/2163453002/diff/60001/ui/views/mus/window_manager_connection.h#newcode105 ui/views/mus/window_manager_connection.h:105: base::ObserverList<PointerEventWatcher, true> mouse_event_watchers_; Can this be an ObserverList<> pointer_event_watchers_, ...
4 years, 5 months ago (2016-07-20 16:14:54 UTC) #12
James Cook
drive-by since I just saw the rename CL land... It seems confusing to me to ...
4 years, 5 months ago (2016-07-20 17:38:54 UTC) #14
sky
+1 to the option On Wed, Jul 20, 2016 at 10:38 AM, <jamescook@chromium.org> wrote: > ...
4 years, 5 months ago (2016-07-20 19:38:50 UTC) #15
sadrul
On 2016/07/20 19:38:50, sky wrote: > +1 to the option > > On Wed, Jul ...
4 years, 5 months ago (2016-07-20 19:43:33 UTC) #16
sky
What James outlines doesn't require any changes to SetEventObserver. Maybe I'm missing something? On Wed, ...
4 years, 5 months ago (2016-07-20 19:54:34 UTC) #17
sadrul
On 2016/07/20 19:54:34, sky wrote: > What James outlines doesn't require any changes to SetEventObserver. ...
4 years, 5 months ago (2016-07-20 20:18:06 UTC) #18
James Cook
On 2016/07/20 20:18:06, sadrul wrote: > On 2016/07/20 19:54:34, sky wrote: > > What James ...
4 years, 5 months ago (2016-07-20 20:26:52 UTC) #19
sky
Ash will need to see and consume certain sets of events in some situations. For ...
4 years, 5 months ago (2016-07-20 22:21:48 UTC) #20
riajiang
On 2016/07/20 22:21:48, sky wrote: > Ash will need to see and consume certain sets ...
4 years, 5 months ago (2016-07-21 18:26:16 UTC) #21
James Cook
On 2016/07/21 18:26:16, riajiang wrote: > On 2016/07/20 22:21:48, sky wrote: > > Ash will ...
4 years, 5 months ago (2016-07-21 19:06:30 UTC) #22
sky
SGTM too On Thu, Jul 21, 2016 at 12:06 PM, <jamescook@chromium.org> wrote: > On 2016/07/21 ...
4 years, 5 months ago (2016-07-21 19:54:37 UTC) #23
riajiang
PTAL. Thanks!
4 years, 5 months ago (2016-07-22 20:38:44 UTC) #25
James Cook
On 2016/07/22 20:38:44, riajiang wrote: > PTAL. Thanks! This is a step in the right ...
4 years, 5 months ago (2016-07-22 22:06:01 UTC) #26
James Cook
https://codereview.chromium.org/2163453002/diff/100001/ash/common/shelf/overflow_bubble.cc File ash/common/shelf/overflow_bubble.cc (right): https://codereview.chromium.org/2163453002/diff/100001/ash/common/shelf/overflow_bubble.cc#newcode78 ash/common/shelf/overflow_bubble.cc:78: ProcessPressedEvent(location_in_screen); For example, I would expect you to have ...
4 years, 5 months ago (2016-07-22 22:06:26 UTC) #27
sadrul
On 2016/07/22 22:06:01, James Cook wrote: > On 2016/07/22 20:38:44, riajiang wrote: > > PTAL. ...
4 years, 5 months ago (2016-07-22 22:16:42 UTC) #28
James Cook
On 2016/07/22 22:16:42, sadrul wrote: > On 2016/07/22 22:06:01, James Cook wrote: > > On ...
4 years, 5 months ago (2016-07-22 22:37:26 UTC) #29
sadrul
On 2016/07/22 22:37:26, James Cook wrote: > On 2016/07/22 22:16:42, sadrul wrote: > > On ...
4 years, 5 months ago (2016-07-23 00:22:54 UTC) #30
James Cook
4 years, 5 months ago (2016-07-23 06:57:08 UTC) #31
On 2016/07/23 00:22:54, sadrul wrote:
> On 2016/07/22 22:37:26, James Cook wrote:
> > On 2016/07/22 22:16:42, sadrul wrote:
> > > On 2016/07/22 22:06:01, James Cook wrote:
> > > > On 2016/07/22 20:38:44, riajiang wrote:
> > > > > PTAL. Thanks!
> > > > 
> > > > This is a step in the right direction, but it isn't what I thought you
> were
> > > > going to build. I thought you would introduce AddPointerWatcher(watcher,
> > > source
> > > > = MOUSE|TOUCH|ALL, want_moves = true|false), which I could call multiple
> > times
> > > > with any combination of source/want_moves, and my PointerWatchers would
be
> > > > notified of the *all* the mouse/touch events they requested, plus or
minus
> > > > moves.
> > > > 
> > > > What you have will work in the narrow cases used by touch-hud and ash
> > > > close-bubble-on-click, but I think it's confusing and doesn't provide us
> > much
> > > > future flexibility.
> > > 
> > > Sounds like you are suggesting supporting event-observers for multiple
types
> > of
> > > EventMatcher (i.e. crbug.com/627146). It's not clear what kind of
> flexibility
> > we
> > > would actually need. That's why we are punting on supporting multiple
types
> of
> > > watchers from the same client for now (crbug.com/627146)
> > 
> > This is why I think we should just send all non-hover pointer events to the
> > client.
> > 
> > Right now the code is very confusing, in that |wants_moves| false implies
> > something about the type of events you are requesting. (I missed that detail
> in
> > your original comment.) It also means we have a function
> > PointerWatcher::OnPointerEventObserved() that sometimes gets called with all
> > events, sometime with press only, and the high-level AddPointerWatcher()
call
> > doesn't provide any hints that you're just going to get press events.
> 
> Yes, this is why we originally went with separate PointerDownWatcher and
> PointerEventWatcher interfaces.

What I had in mind was something like this:
https://codereview.chromium.org/2180683003

Let's talk in the meeting Monday about how to proceed.

Powered by Google App Engine
This is Rietveld 408576698