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

Issue 2765443004: AndroidOverlay implementation using Dialog. (Closed)

Created:
3 years, 9 months ago by liberato (no reviews please)
Modified:
3 years, 7 months ago
CC:
agrieve+watch_chromium.org, avayvod+watch_chromium.org, chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, feature-media-reviews_chromium.org, jam, mlamouri+watch-content_chromium.org, mlamouri+watch-media_chromium.org, nasko+codewatch_chromium.org, piman+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

AndroidOverlay implementation using Dialog. This CL adds DialogOverlayImpl, which uses AndroidDialogs to provide an overlay. The intended use looks something like this: RenderFrame(Impl) requests a routing token from RenderFrameHostImpl RFHI returns token to RF RF sends this token to WebMediaPlayerImpl WMPI sends this (via chrome IPC) to AVDA (gpu process) AVDA requests an overlay from AndroidOverlayProviderImpl using this token (via mojo to the browser). AndroidOverlayProviderImpl creates a DialogOverlayImpl in the browser AOPI returns the DialogOverlayImpl to AVDA. BUG=618368 TEST=DialogOverlayImplTest, DialogOverlayCoreTest CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_site_isolation;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Review-Url: https://codereview.chromium.org/2765443004 Cr-Commit-Position: refs/heads/master@{#468760} Committed: https://chromium.googlesource.com/chromium/src/+/a8da3b572593e1a166bc2e3a22821a17feb0af27

Patch Set 1 #

Patch Set 2 : more work on unit tests #

Patch Set 3 : added DialogOverlayCore junit test #

Patch Set 4 : added secure flag #

Patch Set 5 : stopped always sending an overlay routing token #

Patch Set 6 : rebased #

Patch Set 7 : replaced accidentally deleted negation #

Patch Set 8 : added missing files #

Patch Set 9 : fixed gn #

Total comments: 29

Patch Set 10 : fixed build errors for content_junit_tests #

Total comments: 20

Patch Set 11 : make findbugs happy #

Total comments: 2

Patch Set 12 : cl feedback, except surface_tracker refactor #

Total comments: 7

Patch Set 13 : send token directly in IPC #

Patch Set 14 : fixes after rebase #

Total comments: 10

Patch Set 15 : cl feedback, fixed browsertests #

Total comments: 6

Patch Set 16 : cl feedback #

Patch Set 17 : rebased #

Patch Set 18 : rebased onto gpu_surface_tracker #

Total comments: 18

Patch Set 19 : cl feedback #

Patch Set 20 : removed a TODO that wouldn't work #

Total comments: 11

Patch Set 21 : fixed initial position bug #

Patch Set 22 : cl feedback - UIAction, nativeInit, weakref #

Total comments: 2

Patch Set 23 : Callable<Void> => Runnable #

Total comments: 6

Patch Set 24 : removed OS_ANDROID from RFI/RFHI, s/Get/Update #

Patch Set 25 : rebased #

Patch Set 26 : rebased again #

Patch Set 27 : fixed test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1684 lines, -41 lines) Patch
M base/android/java/src/org/chromium/base/UnguessableToken.java View 1 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/BUILD.gn 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 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/android/browser_jni_registrar.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 +3 lines, -0 lines 0 comments Download
A content/browser/android/dialog_overlay_impl.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 +56 lines, -0 lines 0 comments Download
A content/browser/android/dialog_overlay_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +151 lines, -0 lines 0 comments Download
M content/browser/frame_host/render_frame_host_android.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +5 lines, -0 lines 0 comments Download
M content/browser/frame_host/render_frame_host_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +9 lines, -0 lines 0 comments Download
M content/browser/frame_host/render_frame_host_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 5 chunks +21 lines, -0 lines 0 comments Download
M content/browser/frame_host/render_frame_host_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 25 6 chunks +37 lines, -0 lines 0 comments Download
M content/common/frame_messages.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 25 2 chunks +8 lines, -0 lines 0 comments Download
M content/public/android/BUILD.gn 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 8 chunks +12 lines, -1 line 0 comments Download
D content/public/android/java/src/org/chromium/content/browser/androidoverlay/AndroidOverlayImpl.java View 1 chunk +0 lines, -35 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/androidoverlay/AndroidOverlayProviderImpl.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +72 lines, -3 lines 0 comments Download
A content/public/android/java/src/org/chromium/content/browser/androidoverlay/DialogOverlayCore.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +233 lines, -0 lines 0 comments Download
A content/public/android/java/src/org/chromium/content/browser/androidoverlay/DialogOverlayImpl.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +275 lines, -0 lines 0 comments Download
A content/public/android/java/src/org/chromium/content/browser/androidoverlay/ThreadHoppingHost.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +70 lines, -0 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/framehost/RenderFrameHostImpl.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +11 lines, -0 lines 0 comments Download
A content/public/android/javatests/src/org/chromium/content/browser/androidoverlay/DialogOverlayImplTest.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +264 lines, -0 lines 0 comments Download
A content/public/android/junit/src/org/chromium/content/browser/androidoverlay/DialogOverlayCoreTest.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +280 lines, -0 lines 0 comments Download
M content/renderer/render_frame_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 25 7 chunks +22 lines, -0 lines 0 comments Download
M content/renderer/render_frame_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 25 2 chunks +24 lines, -0 lines 0 comments Download
M content/renderer/render_frame_impl_browsertest.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 25 26 2 chunks +56 lines, -0 lines 0 comments Download
M content/test/BUILD.gn 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 1 chunk +2 lines, -0 lines 0 comments Download
M media/base/android/BUILD.gn 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 1 chunk +1 line, -0 lines 0 comments Download
M media/base/android/android_overlay.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +3 lines, -0 lines 0 comments Download
A media/base/routing_token_callback.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 1 chunk +19 lines, -0 lines 0 comments Download
M media/mojo/clients/BUILD.gn View 1 1 chunk +3 lines, -0 lines 0 comments Download
M media/mojo/clients/mojo_android_overlay.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download
M media/mojo/clients/mojo_android_overlay_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +14 lines, -0 lines 0 comments Download
M media/mojo/interfaces/android_overlay.mojom View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +4 lines, -0 lines 0 comments Download
M ui/android/java/src/org/chromium/ui/base/WindowAndroid.java View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +16 lines, -0 lines 0 comments Download
M ui/android/window_android.h View 1 chunk +3 lines, -0 lines 0 comments Download
M ui/android/window_android.cc View 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 92 (71 generated)
liberato (no reviews please)
hi all Here's the implementation for android overlays via Dialog that goes with the mojo ...
3 years, 8 months ago (2017-03-29 22:28:45 UTC) #16
boliu
mostly ok, skipped tests and renderer so I can send this out today.. https://codereview.chromium.org/2765443004/diff/160001/content/browser/android/dialog_overlay_operations_impl.cc File ...
3 years, 8 months ago (2017-03-30 22:42:03 UTC) #31
dcheng
https://codereview.chromium.org/2765443004/diff/220001/content/common/frame_messages.h File content/common/frame_messages.h (right): https://codereview.chromium.org/2765443004/diff/220001/content/common/frame_messages.h#newcode895 content/common/frame_messages.h:895: uint64_t /* high */, Why not just send the ...
3 years, 8 months ago (2017-04-03 19:12:40 UTC) #39
liberato (no reviews please)
thanks for the feedback. still outstanding: - gpu_surface_tracker refactor is in a separate CL (https://codereview.chromium.org/2791723003/) ...
3 years, 8 months ago (2017-04-04 17:49:29 UTC) #40
boliu
looked at diff, so only minor things https://codereview.chromium.org/2765443004/diff/160001/gpu/ipc/common/gpu_surface_tracker.h File gpu/ipc/common/gpu_surface_tracker.h (right): https://codereview.chromium.org/2765443004/diff/160001/gpu/ipc/common/gpu_surface_tracker.h#newcode46 gpu/ipc/common/gpu_surface_tracker.h:46: int RegisterViewSurface(jobject ...
3 years, 8 months ago (2017-04-04 23:53:21 UTC) #45
tguilbert
LGTM -- media/* https://codereview.chromium.org/2765443004/diff/220001/content/public/android/javatests/src/org/chromium/content/browser/androidoverlay/DialogOverlayImplTest.java File content/public/android/javatests/src/org/chromium/content/browser/androidoverlay/DialogOverlayImplTest.java (right): https://codereview.chromium.org/2765443004/diff/220001/content/public/android/javatests/src/org/chromium/content/browser/androidoverlay/DialogOverlayImplTest.java#newcode145 content/public/android/javatests/src/org/chromium/content/browser/androidoverlay/DialogOverlayImplTest.java:145: mojoToken.high = routingToken.getHighForSerialization(); On 2017/04/04 17:49:29, ...
3 years, 8 months ago (2017-04-05 01:03:56 UTC) #46
liberato (no reviews please)
thanks for the feedback. -fl https://codereview.chromium.org/2765443004/diff/260001/content/browser/android/browser_jni_registrar.cc File content/browser/android/browser_jni_registrar.cc (right): https://codereview.chromium.org/2765443004/diff/260001/content/browser/android/browser_jni_registrar.cc#newcode61 content/browser/android/browser_jni_registrar.cc:61: On 2017/04/04 23:53:21, boliu ...
3 years, 8 months ago (2017-04-05 15:13:31 UTC) #49
dcheng
ipc lgtm it's unfortunate, but feels unavoidable. hopefully we can get rid of this soon ...
3 years, 8 months ago (2017-04-06 07:14:51 UTC) #52
liberato (no reviews please)
thanks for the feedback. -fl https://codereview.chromium.org/2765443004/diff/280001/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/2765443004/diff/280001/content/browser/frame_host/render_frame_host_impl.cc#newcode542 content/browser/frame_host/render_frame_host_impl.cc:542: if (!overlay_routing_token_.has_value()) { On ...
3 years, 8 months ago (2017-04-10 21:24:54 UTC) #55
liberato (no reviews please)
i rebased this onto the GpuSurfaceTracker CL for clarity, though it doesn't show it as ...
3 years, 8 months ago (2017-04-21 00:39:46 UTC) #58
boliu
https://codereview.chromium.org/2765443004/diff/340001/base/android/java/src/org/chromium/base/UnguessableToken.java File base/android/java/src/org/chromium/base/UnguessableToken.java (right): https://codereview.chromium.org/2765443004/diff/340001/base/android/java/src/org/chromium/base/UnguessableToken.java#newcode36 base/android/java/src/org/chromium/base/UnguessableToken.java:36: public long getHighForSerialization() { I think you should be ...
3 years, 8 months ago (2017-04-22 00:22:43 UTC) #59
liberato (no reviews please)
thanks for the feedback. -fl https://codereview.chromium.org/2765443004/diff/340001/base/android/java/src/org/chromium/base/UnguessableToken.java File base/android/java/src/org/chromium/base/UnguessableToken.java (right): https://codereview.chromium.org/2765443004/diff/340001/base/android/java/src/org/chromium/base/UnguessableToken.java#newcode36 base/android/java/src/org/chromium/base/UnguessableToken.java:36: public long getHighForSerialization() { ...
3 years, 8 months ago (2017-04-24 22:19:42 UTC) #62
boliu
some other suggestions, I think weakref is the only material comment left from me :) ...
3 years, 8 months ago (2017-04-26 00:19:08 UTC) #63
liberato (no reviews please)
thanks for the feedback. also added a fix for the initial position in DialogOverlayCore. not ...
3 years, 8 months ago (2017-04-26 17:26:35 UTC) #66
boliu
lgtm https://codereview.chromium.org/2765443004/diff/380001/content/browser/android/dialog_overlay_impl.h File content/browser/android/dialog_overlay_impl.h (right): https://codereview.chromium.org/2765443004/diff/380001/content/browser/android/dialog_overlay_impl.h#newcode44 content/browser/android/dialog_overlay_impl.h:44: base::android::ScopedJavaGlobalRef<jobject> receiver_; On 2017/04/26 17:26:34, liberato wrote: > ...
3 years, 8 months ago (2017-04-26 17:40:11 UTC) #67
liberato (no reviews please)
thanks for the feedback! aelias: PTAL as owner @ content/renderer/render_frame_impl* thanks -fl https://codereview.chromium.org/2765443004/diff/420001/content/public/android/javatests/src/org/chromium/content/browser/androidoverlay/DialogOverlayImplTest.java File content/public/android/javatests/src/org/chromium/content/browser/androidoverlay/DialogOverlayImplTest.java ...
3 years, 8 months ago (2017-04-26 18:26:28 UTC) #70
aelias_OOO_until_Jul13
https://codereview.chromium.org/2765443004/diff/440001/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/2765443004/diff/440001/content/browser/frame_host/render_frame_host_impl.cc#newcode539 content/browser/frame_host/render_frame_host_impl.cc:539: #if defined(OS_ANDROID) Likewise I would prefer OS_ANDROID be removed ...
3 years, 8 months ago (2017-04-26 23:41:22 UTC) #71
aelias_OOO_until_Jul13
lgtm otherwise
3 years, 7 months ago (2017-04-26 23:54:07 UTC) #72
liberato (no reviews please)
thanks for the feedback, everybody! the (hidden) CL on which this depends landed yesterday, so ...
3 years, 7 months ago (2017-05-02 17:05:12 UTC) #79
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/2765443004/520001
3 years, 7 months ago (2017-05-02 20:18:10 UTC) #89
commit-bot: I haz the power
3 years, 7 months ago (2017-05-02 20:24:10 UTC) #92
Message was sent while issue was closed.
Committed patchset #27 (id:520001) as
https://chromium.googlesource.com/chromium/src/+/a8da3b572593e1a166bc2e3a2282...

Powered by Google App Engine
This is Rietveld 408576698