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

Issue 2036023002: Rewire Android WebView's compositor changed signal. (Closed)

Created:
4 years, 6 months ago by hush (inactive)
Modified:
4 years, 6 months ago
Reviewers:
boliu, no sievers
CC:
chromium-reviews, yusukes+watch_chromium.org, shuchen+watch_chromium.org, jam, nona+watch_chromium.org, darin-cc_chromium.org, James Su, android-webview-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Rewire Android WebView's compositor changed signal. Make android_webview::BrowserViewRenderer a contents::WebContentsObserver that listens to RenderViewHostChanged. WebView used to rely on RWHVA::SetContentViewCore call to swap compositors, which assumed any RWHVA that is constructed will soon be current. This turned out to be false when WebView navigates to a page that has an SSL error (in which case a new RVH will be created for the new domain, but the new RVH won't be swapped). To be able to map from RVH to the compositor contained in it, we've introduced a CompositorID type, that combines the process_id and the routing_id of the RVH. BUG=616955 Committed: https://crrev.com/284add6d41ef58f8b2b2574767e6b7e03ebb0923 Cr-Commit-Position: refs/heads/master@{#400499}

Patch Set 1 : #

Total comments: 23

Patch Set 2 : review #

Total comments: 4

Patch Set 3 : fix browse_view_renderer construction and rebase #

Total comments: 28

Patch Set 4 : review #

Total comments: 2

Patch Set 5 : comment #

Patch Set 6 : fix test compilation: Pass null webcontents #

Patch Set 7 : fix test #

Patch Set 8 : fix per offline discussion #

Total comments: 6

Patch Set 9 : comments #

Patch Set 10 : fix the test.... #

Patch Set 11 : fix test for realz #

Patch Set 12 : Use web_contents_ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+193 lines, -97 lines) Patch
M android_webview/BUILD.gn View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M android_webview/android_webview.gyp View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M android_webview/browser/browser_view_renderer.h View 1 2 3 4 5 6 7 8 6 chunks +17 lines, -8 lines 0 comments Download
M android_webview/browser/browser_view_renderer.cc View 1 2 3 4 5 6 7 8 6 chunks +43 lines, -46 lines 0 comments Download
M android_webview/browser/child_frame.h View 1 2 3 3 chunks +3 lines, -2 lines 0 comments Download
M android_webview/browser/child_frame.cc View 1 2 3 4 1 chunk +1 line, -3 lines 0 comments Download
M android_webview/browser/compositor_frame_consumer.h View 1 2 3 2 chunks +3 lines, -1 line 0 comments Download
A android_webview/browser/compositor_id.h View 1 2 3 1 chunk +27 lines, -0 lines 0 comments Download
A android_webview/browser/compositor_id.cc View 1 2 3 1 chunk +37 lines, -0 lines 0 comments Download
M android_webview/browser/hardware_renderer.h View 1 2 3 3 chunks +3 lines, -2 lines 0 comments Download
M android_webview/browser/hardware_renderer.cc View 1 2 3 4 3 chunks +2 lines, -3 lines 0 comments Download
M android_webview/browser/render_thread_manager.h View 1 2 3 2 chunks +3 lines, -2 lines 0 comments Download
M android_webview/browser/render_thread_manager.cc View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M android_webview/browser/test/rendering_test.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M android_webview/native/aw_contents.h View 1 2 3 4 5 6 7 4 chunks +8 lines, -2 lines 0 comments Download
M android_webview/native/aw_contents.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +25 lines, -1 line 0 comments Download
M content/browser/android/synchronous_compositor_host.h View 1 2 3 2 chunks +1 line, -1 line 0 comments Download
M content/browser/android/synchronous_compositor_host.cc View 1 2 3 3 chunks +3 lines, -6 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.h View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.cc View 1 2 3 2 chunks +0 lines, -7 lines 0 comments Download
M content/public/browser/android/synchronous_compositor_client.h View 1 chunk +8 lines, -8 lines 0 comments Download
M content/public/test/test_synchronous_compositor_android.cc View 1 chunk +2 lines, -3 lines 0 comments Download

Messages

Total messages: 53 (20 generated)
hush (inactive)
Hello, PTAL
4 years, 6 months ago (2016-06-02 23:36:15 UTC) #3
boliu
https://codereview.chromium.org/2036023002/diff/20001/android_webview/android_webview.gyp File android_webview/android_webview.gyp (right): https://codereview.chromium.org/2036023002/diff/20001/android_webview/android_webview.gyp#newcode339 android_webview/android_webview.gyp:339: 'browser/compositor_id.cc', I vote for letting gyp rot https://codereview.chromium.org/2036023002/diff/20001/android_webview/browser/browser_view_renderer.cc File ...
4 years, 6 months ago (2016-06-03 02:18:20 UTC) #5
hush (inactive)
review
4 years, 6 months ago (2016-06-09 22:44:23 UTC) #7
hush (inactive)
https://codereview.chromium.org/2036023002/diff/20001/android_webview/android_webview.gyp File android_webview/android_webview.gyp (right): https://codereview.chromium.org/2036023002/diff/20001/android_webview/android_webview.gyp#newcode339 android_webview/android_webview.gyp:339: 'browser/compositor_id.cc', On 2016/06/03 02:18:20, boliu wrote: > I vote ...
4 years, 6 months ago (2016-06-09 22:44:53 UTC) #8
hush (inactive)
hold on there are some bugs
4 years, 6 months ago (2016-06-09 23:19:35 UTC) #9
boliu
cursory pass https://codereview.chromium.org/2036023002/diff/20001/android_webview/browser/compositor_id.h File android_webview/browser/compositor_id.h (right): https://codereview.chromium.org/2036023002/diff/20001/android_webview/browser/compositor_id.h#newcode13 android_webview/browser/compositor_id.h:13: CompositorID(const CompositorID& other); On 2016/06/09 22:44:53, hush ...
4 years, 6 months ago (2016-06-10 15:40:33 UTC) #10
boliu
https://codereview.chromium.org/2036023002/diff/40001/android_webview/browser/compositor_id.cc File android_webview/browser/compositor_id.cc (right): https://codereview.chromium.org/2036023002/diff/40001/android_webview/browser/compositor_id.cc#newcode23 android_webview/browser/compositor_id.cc:23: bool CompositorID::operator<(const CompositorID& other) const { Actually, overloading operator< ...
4 years, 6 months ago (2016-06-10 15:55:38 UTC) #11
hush (inactive)
https://codereview.chromium.org/2036023002/diff/40001/android_webview/browser/compositor_id.cc File android_webview/browser/compositor_id.cc (right): https://codereview.chromium.org/2036023002/diff/40001/android_webview/browser/compositor_id.cc#newcode23 android_webview/browser/compositor_id.cc:23: bool CompositorID::operator<(const CompositorID& other) const { On 2016/06/10 15:55:38, ...
4 years, 6 months ago (2016-06-10 23:28:44 UTC) #13
boliu
https://codereview.chromium.org/2036023002/diff/80001/android_webview/browser/browser_view_renderer.cc File android_webview/browser/browser_view_renderer.cc (right): https://codereview.chromium.org/2036023002/diff/80001/android_webview/browser/browser_view_renderer.cc#newcode504 android_webview/browser/browser_view_renderer.cc:504: compositor_id_ = CompositorID(); hmm, would this be more consistent ...
4 years, 6 months ago (2016-06-13 15:30:45 UTC) #14
hush (inactive)
https://codereview.chromium.org/2036023002/diff/80001/android_webview/browser/browser_view_renderer.cc File android_webview/browser/browser_view_renderer.cc (right): https://codereview.chromium.org/2036023002/diff/80001/android_webview/browser/browser_view_renderer.cc#newcode504 android_webview/browser/browser_view_renderer.cc:504: compositor_id_ = CompositorID(); On 2016/06/13 15:30:44, boliu wrote: > ...
4 years, 6 months ago (2016-06-14 23:48:29 UTC) #15
boliu
lgtm % comments https://codereview.chromium.org/2036023002/diff/80001/android_webview/browser/child_frame.cc File android_webview/browser/child_frame.cc (right): https://codereview.chromium.org/2036023002/diff/80001/android_webview/browser/child_frame.cc#newcode7 android_webview/browser/child_frame.cc:7: #include "android_webview/browser/child_frame.h" On 2016/06/13 15:30:44, boliu ...
4 years, 6 months ago (2016-06-15 00:04:02 UTC) #16
hush (inactive)
I tested on popups too, and they worked.
4 years, 6 months ago (2016-06-15 00:19:00 UTC) #17
hush (inactive)
https://codereview.chromium.org/2036023002/diff/80001/android_webview/browser/child_frame.cc File android_webview/browser/child_frame.cc (right): https://codereview.chromium.org/2036023002/diff/80001/android_webview/browser/child_frame.cc#newcode7 android_webview/browser/child_frame.cc:7: #include "android_webview/browser/child_frame.h" On 2016/06/15 00:04:02, boliu wrote: > On ...
4 years, 6 months ago (2016-06-15 18:10:24 UTC) #18
hush (inactive)
hello Daniel, PTAL content/
4 years, 6 months ago (2016-06-15 18:13:26 UTC) #20
no sievers
On 2016/06/15 18:13:26, hush wrote: > hello Daniel, > PTAL content/ lgtm
4 years, 6 months ago (2016-06-15 18:20:37 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2036023002/120001
4 years, 6 months ago (2016-06-15 18:23:48 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/88164)
4 years, 6 months ago (2016-06-15 18:38:31 UTC) #26
hush (inactive)
Hi Bo, I made a change in browser_view_renderer.cc to allow it to accept null web_contents ...
4 years, 6 months ago (2016-06-16 18:06:20 UTC) #27
boliu
On 2016/06/16 18:06:20, hush wrote: > Hi Bo, > I made a change in browser_view_renderer.cc ...
4 years, 6 months ago (2016-06-16 18:09:28 UTC) #28
boliu
On 2016/06/16 18:09:28, boliu wrote: > On 2016/06/16 18:06:20, hush wrote: > > Hi Bo, ...
4 years, 6 months ago (2016-06-16 18:13:21 UTC) #29
hush (inactive)
PTAL ps6. Mocking TestWebContents would be too heavy weight. (And I ran into crashed in ...
4 years, 6 months ago (2016-06-16 20:20:01 UTC) #31
hush (inactive)
On 2016/06/16 20:20:01, hush wrote: > PTAL ps6. > > Mocking TestWebContents would be too ...
4 years, 6 months ago (2016-06-16 20:20:20 UTC) #32
hush (inactive)
PTAL
4 years, 6 months ago (2016-06-16 22:05:07 UTC) #34
boliu
https://codereview.chromium.org/2036023002/diff/220001/android_webview/browser/browser_view_renderer.cc File android_webview/browser/browser_view_renderer.cc (right): https://codereview.chromium.org/2036023002/diff/220001/android_webview/browser/browser_view_renderer.cc#newcode94 android_webview/browser/browser_view_renderer.cc:94: CompositorID compositor_id, can we get rid of this parameter, ...
4 years, 6 months ago (2016-06-16 22:13:43 UTC) #35
hush (inactive)
https://codereview.chromium.org/2036023002/diff/220001/android_webview/browser/browser_view_renderer.cc File android_webview/browser/browser_view_renderer.cc (right): https://codereview.chromium.org/2036023002/diff/220001/android_webview/browser/browser_view_renderer.cc#newcode94 android_webview/browser/browser_view_renderer.cc:94: CompositorID compositor_id, On 2016/06/16 22:13:43, boliu wrote: > can ...
4 years, 6 months ago (2016-06-16 22:43:20 UTC) #36
boliu
lgtm
4 years, 6 months ago (2016-06-16 23:06:17 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2036023002/280001
4 years, 6 months ago (2016-06-16 23:33:59 UTC) #40
commit-bot: I haz the power
Try jobs failed on following builders: chromeos_daisy_chromium_compile_only_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_daisy_chromium_compile_only_ng/builds/154300) chromeos_x86-generic_chromium_compile_only_ng on tryserver.chromium.linux (JOB_FAILED, ...
4 years, 6 months ago (2016-06-16 23:54:42 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2036023002/280001
4 years, 6 months ago (2016-06-17 02:10:41 UTC) #44
commit-bot: I haz the power
Try jobs failed on following builders: chromeos_x86-generic_chromium_compile_only_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_x86-generic_chromium_compile_only_ng/builds/154395)
4 years, 6 months ago (2016-06-17 02:26:26 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2036023002/300001
4 years, 6 months ago (2016-06-17 19:47:23 UTC) #49
commit-bot: I haz the power
Committed patchset #12 (id:300001)
4 years, 6 months ago (2016-06-17 20:47:47 UTC) #51
commit-bot: I haz the power
4 years, 6 months ago (2016-06-17 20:49:48 UTC) #53
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/284add6d41ef58f8b2b2574767e6b7e03ebb0923
Cr-Commit-Position: refs/heads/master@{#400499}

Powered by Google App Engine
This is Rietveld 408576698