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

Issue 552503003: Introduce EventProcessor::OnEventProcessingStarted() (Closed)

Created:
6 years, 3 months ago by tdanderson
Modified:
6 years, 2 months ago
Reviewers:
sadrul, sky
CC:
chromium-reviews, tdanderson+views_chromium.org, ben+aura_chromium.org, tdresser+watch_chromium.org, tfarina, kalyank, sadrul, ben+views_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Introduce EventProcessor::OnEventProcessingStarted() Introduce EventProcessor::OnEventProcessingStarted(), to be called at the beginning of event-processing in EventProcessor::OnEventFromSource() before any targeting takes place. OnEventProcessingStarted() marks the event as handled if it is not to be dispatched, otherwise it optionally prepares the event for targeting and/or updates any state variables in the event processor. OnEventProcessingStarted() replaces EventProcessor::PrepareEventForDispatch() and allows us to remove all overrides of EventProcessor::OnEventFromSource() which are not part of unit tests. BUG=412776 TEST=EventProcessorTest.OnEventProcessingStarted, WidgetTest.GestureEventsNotProcessed, WindowEventDispatcherTest.MouseMovesHeld changed, WidgetTest.GestureEndEvents changed Committed: https://crrev.com/fb66d874c0916cdecd2405b585e7266c29826c5c Cr-Commit-Position: refs/heads/master@{#297521}

Patch Set 1 #

Patch Set 2 : WIP, rebase #

Patch Set 3 : WIP, rebase #

Patch Set 4 : WIP #

Patch Set 5 : tests added, CL for review #

Total comments: 4

Patch Set 6 : OnEventProcessingStarted() marks the event as handled instead of returning false #

Total comments: 4

Patch Set 7 : two comments from sadrul #

Total comments: 2

Patch Set 8 : comments addressed, tests changed #

Total comments: 5

Patch Set 9 : NOTREACHED in test failure addressed #

Total comments: 4

Patch Set 10 : sadrul comments addressed #

Unified diffs Side-by-side diffs Delta from patch set Stats (+286 lines, -155 lines) Patch
M chrome/browser/ui/views/frame/browser_root_view.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/frame/browser_root_view.cc View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M ui/aura/window_event_dispatcher.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M ui/aura/window_event_dispatcher.cc View 1 2 3 4 5 1 chunk +5 lines, -9 lines 0 comments Download
M ui/aura/window_event_dispatcher_unittest.cc View 1 2 3 4 5 6 7 5 chunks +21 lines, -1 line 0 comments Download
M ui/events/event_processor.h View 1 2 3 4 5 1 chunk +9 lines, -6 lines 0 comments Download
M ui/events/event_processor.cc View 1 2 3 4 5 6 7 3 chunks +6 lines, -3 lines 0 comments Download
M ui/events/event_processor_unittest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +40 lines, -1 line 0 comments Download
M ui/events/test/test_event_processor.h View 1 2 3 4 5 6 7 8 9 1 chunk +17 lines, -1 line 0 comments Download
M ui/events/test/test_event_processor.cc View 1 2 3 4 5 6 7 8 9 2 chunks +15 lines, -2 lines 0 comments Download
M ui/views/controls/menu/menu_host_root_view.h View 1 chunk +1 line, -1 line 0 comments Download
M ui/views/controls/menu/menu_host_root_view.cc View 1 2 3 1 chunk +9 lines, -15 lines 0 comments Download
M ui/views/widget/root_view.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M ui/views/widget/root_view.cc View 1 2 3 4 5 6 7 8 9 1 chunk +25 lines, -43 lines 0 comments Download
M ui/views/widget/root_view_targeter.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M ui/views/widget/widget_unittest.cc View 1 2 3 4 5 6 7 8 2 chunks +131 lines, -68 lines 0 comments Download

Messages

Total messages: 20 (4 generated)
tdanderson
Sadrul, can you please take a look?
6 years, 3 months ago (2014-09-12 17:23:03 UTC) #2
sadrul
https://codereview.chromium.org/552503003/diff/80001/ui/events/event_processor.h File ui/events/event_processor.h (right): https://codereview.chromium.org/552503003/diff/80001/ui/events/event_processor.h#newcode38 ui/events/event_processor.h:38: virtual bool OnEventProcessingStarted(Event* event); I remember we briefly discussed ...
6 years, 3 months ago (2014-09-15 14:10:36 UTC) #3
tdanderson
Sadrul, please see my replies to your comments below: https://codereview.chromium.org/552503003/diff/80001/ui/events/event_processor.h File ui/events/event_processor.h (right): https://codereview.chromium.org/552503003/diff/80001/ui/events/event_processor.h#newcode38 ui/events/event_processor.h:38: ...
6 years, 3 months ago (2014-09-15 18:20:27 UTC) #4
tdanderson
Sadrul, PS6 uploaded containing your suggestions. Running them on the trybots to see what fails.
6 years, 3 months ago (2014-09-15 18:58:53 UTC) #5
sadrul
https://codereview.chromium.org/552503003/diff/100001/ui/events/event_processor.cc File ui/events/event_processor.cc (right): https://codereview.chromium.org/552503003/diff/100001/ui/events/event_processor.cc#newcode29 ui/events/event_processor.cc:29: OnEventProcessingStarted(event); event_to_dispatch? https://codereview.chromium.org/552503003/diff/100001/ui/events/event_processor.cc#newcode30 ui/events/event_processor.cc:30: EventTarget* target = targeter->FindTargetForEvent(root, event_to_dispatch); ...
6 years, 3 months ago (2014-09-15 19:05:46 UTC) #6
tdanderson
https://codereview.chromium.org/552503003/diff/100001/ui/events/event_processor.cc File ui/events/event_processor.cc (right): https://codereview.chromium.org/552503003/diff/100001/ui/events/event_processor.cc#newcode29 ui/events/event_processor.cc:29: OnEventProcessingStarted(event); On 2014/09/15 19:05:46, sadrul wrote: > event_to_dispatch? Done. ...
6 years, 3 months ago (2014-09-15 19:14:27 UTC) #7
sadrul
The try failures look related. A comment on the change in EventProcessor (haven't looked closely ...
6 years, 3 months ago (2014-09-16 17:16:54 UTC) #8
tdanderson
Sadrul, can you please take a look at the latest patchset + my inline comments? ...
6 years, 3 months ago (2014-09-23 21:30:28 UTC) #9
sadrul
LGTM https://codereview.chromium.org/552503003/diff/140001/ui/events/event_processor.cc File ui/events/event_processor.cc (right): https://codereview.chromium.org/552503003/diff/140001/ui/events/event_processor.cc#newcode31 ui/events/event_processor.cc:31: target = targeter->FindTargetForEvent(root, event_to_dispatch); On 2014/09/23 21:30:27, tdanderson ...
6 years, 2 months ago (2014-09-25 16:12:01 UTC) #10
tdanderson
https://codereview.chromium.org/552503003/diff/140001/ui/events/event_processor.cc File ui/events/event_processor.cc (right): https://codereview.chromium.org/552503003/diff/140001/ui/events/event_processor.cc#newcode31 ui/events/event_processor.cc:31: target = targeter->FindTargetForEvent(root, event_to_dispatch); On 2014/09/25 16:12:00, sadrul wrote: ...
6 years, 2 months ago (2014-09-25 17:11:59 UTC) #11
tdanderson
Ben, can you please review the changes in chrome/ ?
6 years, 2 months ago (2014-09-25 17:44:16 UTC) #13
tdanderson
Scott, can you please take a look at the changes in chrome/ ?
6 years, 2 months ago (2014-09-30 21:04:24 UTC) #15
sky
LGTM
6 years, 2 months ago (2014-09-30 21:52:04 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/552503003/180001
6 years, 2 months ago (2014-09-30 22:09:51 UTC) #18
commit-bot: I haz the power
Committed patchset #10 (id:180001) as 3cf12715fb0c9b6099a2a6f56777297d6d4b06c2
6 years, 2 months ago (2014-09-30 22:15:53 UTC) #19
commit-bot: I haz the power
6 years, 2 months ago (2014-09-30 22:16:29 UTC) #20
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/fb66d874c0916cdecd2405b585e7266c29826c5c
Cr-Commit-Position: refs/heads/master@{#297521}

Powered by Google App Engine
This is Rietveld 408576698