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

Issue 15920002: Fix WebView compositor input handling (Closed)

Created:
7 years, 7 months ago by jdduke (slow)
Modified:
7 years, 6 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, android-webview-reviews_chromium.org, apatrick_chromium
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Fix WebView compositor input handling Recent changes to compositor input handling deprecated existing hooks for Android WebView. This patch addresses these changes, allowing the browser to perform synchronous, in-process input event handling when the UI and compositor threads are merged. In particular, an InputHandlerManagerClient allows the embedder to customize delivery of and response to InputEvents. BUG=241641 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=204933

Patch Set 1 #

Patch Set 2 : Remove dead code #

Patch Set 3 : Remove public dependencies #

Patch Set 4 : Proper ref counting for InputEventFilter #

Total comments: 2

Patch Set 5 : Cleanup #

Total comments: 2

Patch Set 6 : Revert thread priority move #

Patch Set 7 : Make InputEventAckState public #

Total comments: 3

Patch Set 8 : Tailoring to pending move of android_webview files into content #

Patch Set 9 : Rebase with latest content reshuffling #

Patch Set 10 : Cleanup #

Total comments: 22

Patch Set 11 : Fix NULL check and missing OVERRIDE #

Patch Set 12 : Actually add the filter... #

Patch Set 13 : Code review #

Total comments: 6

Patch Set 14 : Rebase #

Patch Set 15 : Fix copyright #

Patch Set 16 : Fix unit test #

Total comments: 5

Patch Set 17 : Remove accidental change #

Patch Set 18 : Code review and rebase #

Total comments: 8

Patch Set 19 : Revert HandleInputEvent signature change where appropriate #

Total comments: 2

Patch Set 20 : Final review fix #

Patch Set 21 : Rebase #

Patch Set 22 : Fix windows build with necessary CONTENT_EXPORT #

Patch Set 23 : Add CONTENT_EXPORT to InputHandlerManagerClient #

Patch Set 24 : Rebase #

Patch Set 25 : Avoid DCHECKs when retrieving process ID #

Unified diffs Side-by-side diffs Delta from patch set Stats (+272 lines, -166 lines) Patch
M content/browser/android/content_view_core_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 3 chunks +0 lines, -6 lines 0 comments Download
M content/browser/android/content_view_core_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +0 lines, -9 lines 0 comments Download
M content/browser/android/in_process/DEPS View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M content/browser/android/in_process/synchronous_compositor_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 2 chunks +11 lines, -0 lines 0 comments Download
M content/browser/android/in_process/synchronous_compositor_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 5 chunks +29 lines, -4 lines 0 comments Download
A content/browser/android/in_process/synchronous_input_event_filter.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +46 lines, -0 lines 0 comments Download
A content/browser/android/in_process/synchronous_input_event_filter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +44 lines, -0 lines 0 comments Download
D content/browser/android/sync_input_event_filter.h View 1 chunk +0 lines, -39 lines 0 comments Download
D content/browser/android/sync_input_event_filter.cc View 1 chunk +0 lines, -31 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 2 chunks +9 lines, -4 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +2 lines, -2 lines 0 comments Download
M content/content_renderer.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/android/synchronous_compositor_factory.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +5 lines, -0 lines 0 comments Download
M content/renderer/gpu/input_event_filter.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +8 lines, -11 lines 0 comments Download
M content/renderer/gpu/input_event_filter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +11 lines, -8 lines 0 comments Download
M content/renderer/gpu/input_event_filter_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +5 lines, -3 lines 0 comments Download
M content/renderer/gpu/input_handler_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 4 chunks +7 lines, -16 lines 0 comments Download
M content/renderer/gpu/input_handler_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 5 chunks +26 lines, -26 lines 0 comments Download
A content/renderer/gpu/input_handler_manager_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +44 lines, -0 lines 0 comments Download
M content/renderer/gpu/input_handler_proxy.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +0 lines, -1 line 0 comments Download
M content/renderer/render_thread_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +3 lines, -0 lines 0 comments Download
M content/renderer/render_thread_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 3 chunks +20 lines, -5 lines 0 comments Download

Messages

Total messages: 48 (0 generated)
jdduke (slow)
OK, this version compiles for WebView and Android, and Android runs like a charm. I ...
7 years, 7 months ago (2013-05-23 19:08:29 UTC) #1
jdduke (slow)
> InputEventFilter, which has largely been left untouched exception some function > renaming and ownership ...
7 years, 7 months ago (2013-05-23 19:11:43 UTC) #2
jdduke (slow)
Also, I would love it if we could avoid making InputHandlerManagerClient public at all. It's ...
7 years, 7 months ago (2013-05-23 19:19:32 UTC) #3
jamesr
I don't like putting the IHMClient interface in content/common/. In a multi-process embedding, this class ...
7 years, 7 months ago (2013-05-24 00:31:29 UTC) #4
jdduke (slow)
OK, I'll move both IHMClient and SynchronousInputEventFilter out of content/common and into content/renderer. Really all ...
7 years, 7 months ago (2013-05-24 00:52:26 UTC) #5
jamesr
https://codereview.chromium.org/15920002/diff/14001/content/public/renderer/content_renderer_client.h File content/public/renderer/content_renderer_client.h (right): https://codereview.chromium.org/15920002/diff/14001/content/public/renderer/content_renderer_client.h#newcode259 content/public/renderer/content_renderer_client.h:259: SynchronousInputEventFilter* input_event_filter) {} it doesn't make sense for a ...
7 years, 7 months ago (2013-05-24 00:54:10 UTC) #6
jdduke (slow)
https://codereview.chromium.org/15920002/diff/14001/content/public/renderer/content_renderer_client.h File content/public/renderer/content_renderer_client.h (right): https://codereview.chromium.org/15920002/diff/14001/content/public/renderer/content_renderer_client.h#newcode259 content/public/renderer/content_renderer_client.h:259: SynchronousInputEventFilter* input_event_filter) {} On 2013/05/24 00:54:10, jamesr wrote: > ...
7 years, 7 months ago (2013-05-24 03:50:18 UTC) #7
jdduke (slow)
OK, sorry, this patch has become rather unwieldy. I'm thinking of splitting the movement of ...
7 years, 7 months ago (2013-05-24 17:28:08 UTC) #8
jamesr
I think splitting the public API changes out would be a good idea. I'm not ...
7 years, 7 months ago (2013-05-24 23:46:16 UTC) #9
jdduke (slow)
OK, moving InputEventAckState visibility change to crrev.com/15720007. I'll rebase this patch when that one lands, ...
7 years, 7 months ago (2013-05-25 01:22:11 UTC) #10
joth
https://codereview.chromium.org/15920002/diff/22001/content/public/renderer/content_renderer_client.h File content/public/renderer/content_renderer_client.h (left): https://codereview.chromium.org/15920002/diff/22001/content/public/renderer/content_renderer_client.h#oldcode254 content/public/renderer/content_renderer_client.h:254: virtual bool ShouldCreateCompositorInputHandler() const; note I'm blitzing the three ...
7 years, 6 months ago (2013-05-30 01:15:02 UTC) #11
jdduke (slow)
OK, PTAL; I think this is ready for closer inspection. SynchronousCompositorFactory now owns the SynchronousInputEventFilter, ...
7 years, 6 months ago (2013-05-31 17:04:59 UTC) #12
mkosiba (inactive)
I hit: F/chromium( 5910): [FATAL:input_handler_manager.cc(27)] Check failed: !client_ || !client. when trying this locally.
7 years, 6 months ago (2013-05-31 17:31:08 UTC) #13
jdduke (slow)
On 2013/05/31 17:31:08, mkosiba wrote: > I hit: > F/chromium( 5910): [FATAL:input_handler_manager.cc(27)] Check failed: !client_ ...
7 years, 6 months ago (2013-05-31 17:40:09 UTC) #14
jdduke (slow)
On 2013/05/31 17:40:09, jdduke wrote: > On 2013/05/31 17:31:08, mkosiba wrote: > > I hit: ...
7 years, 6 months ago (2013-05-31 17:41:35 UTC) #15
joth
good... this is much nicer now it can be done fully inside content/ without more ...
7 years, 6 months ago (2013-05-31 18:05:07 UTC) #16
jdduke (slow)
https://codereview.chromium.org/15920002/diff/37001/content/browser/android/in_process/synchronous_compositor_impl.h File content/browser/android/in_process/synchronous_compositor_impl.h (right): https://codereview.chromium.org/15920002/diff/37001/content/browser/android/in_process/synchronous_compositor_impl.h#newcode51 content/browser/android/in_process/synchronous_compositor_impl.h:51: InputEventAckState HandleInputEvent(const WebKit::WebInputEvent& input_event); On 2013/05/31 18:05:08, joth wrote: ...
7 years, 6 months ago (2013-05-31 20:48:24 UTC) #17
joth
PS3 lgtm https://codereview.chromium.org/15920002/diff/53001/content/browser/android/in_process/DEPS File content/browser/android/in_process/DEPS (right): https://codereview.chromium.org/15920002/diff/53001/content/browser/android/in_process/DEPS#newcode3 content/browser/android/in_process/DEPS:3: "+content/public/renderer/android", could you nix /android here too, ...
7 years, 6 months ago (2013-05-31 20:57:47 UTC) #18
joth
On 2013/05/31 20:57:47, joth wrote: > PS3 lgtm > of course I meant PS 13 ...
7 years, 6 months ago (2013-05-31 20:58:10 UTC) #19
jamesr
https://codereview.chromium.org/15920002/diff/53001/content/renderer/gpu/input_handler_manager_client.h File content/renderer/gpu/input_handler_manager_client.h (right): https://codereview.chromium.org/15920002/diff/53001/content/renderer/gpu/input_handler_manager_client.h#newcode27 content/renderer/gpu/input_handler_manager_client.h:27: typedef base::Callback<void(int /*routing_id*/, i think using a return value ...
7 years, 6 months ago (2013-06-04 06:51:11 UTC) #20
jdduke (slow)
Alright, I think this is in good enough shape for @mkosiba's needs. I'm planning to ...
7 years, 6 months ago (2013-06-04 15:46:23 UTC) #21
jdduke (slow)
@aelias: Could you take a look at content/browser/renderer_host/render_widget_host_view_android.cc? Thanks.
7 years, 6 months ago (2013-06-04 19:21:14 UTC) #22
joth
rebase onto the other patch lgtm too. yes - we need some notion of DidAddInputHandler() ...
7 years, 6 months ago (2013-06-04 19:25:05 UTC) #23
jdduke (slow)
https://codereview.chromium.org/15920002/diff/67036/content/browser/android/in_process/synchronous_input_event_filter.h File content/browser/android/in_process/synchronous_input_event_filter.h (right): https://codereview.chromium.org/15920002/diff/67036/content/browser/android/in_process/synchronous_input_event_filter.h#newcode9 content/browser/android/in_process/synchronous_input_event_filter.h:9: #include "base/callback.h" On 2013/06/04 19:25:05, joth wrote: > nit: ...
7 years, 6 months ago (2013-06-04 19:44:17 UTC) #24
joth
https://codereview.chromium.org/15920002/diff/67036/content/browser/android/in_process/synchronous_input_event_filter.h File content/browser/android/in_process/synchronous_input_event_filter.h (right): https://codereview.chromium.org/15920002/diff/67036/content/browser/android/in_process/synchronous_input_event_filter.h#newcode9 content/browser/android/in_process/synchronous_input_event_filter.h:9: #include "base/callback.h" On 2013/06/04 19:44:17, jdduke wrote: > On ...
7 years, 6 months ago (2013-06-04 19:50:07 UTC) #25
mkosiba (inactive)
LGTM. I'm assuming the DidAddInputHandler callback is going to be a separate CL?
7 years, 6 months ago (2013-06-04 20:55:34 UTC) #26
jdduke (slow)
On 2013/06/04 20:55:34, mkosiba wrote: > LGTM. I'm assuming the DidAddInputHandler callback is going to ...
7 years, 6 months ago (2013-06-04 21:12:38 UTC) #27
aelias_OOO_until_Jul13
render_widget_host_view_android lgtm
7 years, 6 months ago (2013-06-05 03:41:29 UTC) #28
jamesr
https://codereview.chromium.org/15920002/diff/79001/content/renderer/gpu/input_event_filter_unittest.cc File content/renderer/gpu/input_event_filter_unittest.cc (right): https://codereview.chromium.org/15920002/diff/79001/content/renderer/gpu/input_event_filter_unittest.cc#newcode49 content/renderer/gpu/input_event_filter_unittest.cc:49: const WebInputEvent& event) { what was wrong with const ...
7 years, 6 months ago (2013-06-05 03:57:16 UTC) #29
joth
On 4 June 2013 20:57, <jamesr@chromium.org> wrote: > > https://codereview.chromium.**org/15920002/diff/79001/** > content/renderer/gpu/input_**event_filter_unittest.cc<https://codereview.chromium.org/15920002/diff/79001/content/renderer/gpu/input_event_filter_unittest.cc> > File content/renderer/gpu/input_**event_filter_unittest.cc ...
7 years, 6 months ago (2013-06-05 04:45:57 UTC) #30
jamesr
On 2013/06/05 04:45:57, joth wrote: > On 4 June 2013 20:57, <mailto:jamesr@chromium.org> wrote: > > ...
7 years, 6 months ago (2013-06-05 05:38:42 UTC) #31
mkosiba (inactive)
On 2013/06/04 21:12:38, jdduke wrote: > On 2013/06/04 20:55:34, mkosiba wrote: > > LGTM. I'm ...
7 years, 6 months ago (2013-06-05 16:04:21 UTC) #32
jdduke (slow)
https://codereview.chromium.org/15920002/diff/79001/content/renderer/gpu/input_event_filter_unittest.cc File content/renderer/gpu/input_event_filter_unittest.cc (right): https://codereview.chromium.org/15920002/diff/79001/content/renderer/gpu/input_event_filter_unittest.cc#newcode49 content/renderer/gpu/input_event_filter_unittest.cc:49: const WebInputEvent& event) { On 2013/06/05 03:57:17, jamesr wrote: ...
7 years, 6 months ago (2013-06-05 18:46:30 UTC) #33
jdduke (slow)
7 years, 6 months ago (2013-06-05 18:46:36 UTC) #34
jamesr
lgtm https://codereview.chromium.org/15920002/diff/95001/content/renderer/gpu/input_event_filter.cc File content/renderer/gpu/input_event_filter.cc (right): https://codereview.chromium.org/15920002/diff/95001/content/renderer/gpu/input_event_filter.cc#newcode11 content/renderer/gpu/input_event_filter.cc:11: #include "ipc/ipc_sync_channel.h" is this #include used? remove if ...
7 years, 6 months ago (2013-06-05 19:07:36 UTC) #35
joth
On 2013/06/05 05:38:42, jamesr wrote: > On 2013/06/05 04:45:57, joth wrote: > > On 4 ...
7 years, 6 months ago (2013-06-05 19:13:35 UTC) #36
jdduke (slow)
https://codereview.chromium.org/15920002/diff/95001/content/renderer/gpu/input_event_filter.cc File content/renderer/gpu/input_event_filter.cc (right): https://codereview.chromium.org/15920002/diff/95001/content/renderer/gpu/input_event_filter.cc#newcode11 content/renderer/gpu/input_event_filter.cc:11: #include "ipc/ipc_sync_channel.h" On 2013/06/05 19:07:37, jamesr wrote: > is ...
7 years, 6 months ago (2013-06-05 19:30:24 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jdduke@chromium.org/15920002/106001
7 years, 6 months ago (2013-06-05 20:35:12 UTC) #38
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=7005
7 years, 6 months ago (2013-06-05 20:45:49 UTC) #39
jdduke (slow)
@jam: Could you take a look at content/content_browser.gypi and content/content_renderer.gypi ? Thanks.
7 years, 6 months ago (2013-06-05 20:49:43 UTC) #40
jam
On 2013/06/05 20:49:43, jdduke wrote: > @jam: Could you take a look at content/content_browser.gypi and ...
7 years, 6 months ago (2013-06-06 16:41:19 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jdduke@chromium.org/15920002/121001
7 years, 6 months ago (2013-06-06 16:44:54 UTC) #42
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 6 months ago (2013-06-06 19:10:39 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jdduke@chromium.org/15920002/143001
7 years, 6 months ago (2013-06-06 19:50:02 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jdduke@chromium.org/15920002/167001
7 years, 6 months ago (2013-06-07 15:39:15 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jdduke@chromium.org/15920002/182001
7 years, 6 months ago (2013-06-07 17:53:08 UTC) #47
commit-bot: I haz the power
7 years, 6 months ago (2013-06-07 21:24:10 UTC) #48
Message was sent while issue was closed.
Change committed as 204933

Powered by Google App Engine
This is Rietveld 408576698