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

Issue 2681933002: Add Java wrapper for RenderFrameHost (Closed)

Created:
3 years, 10 months ago by rwlbuis
Modified:
3 years, 9 months ago
CC:
chromium-reviews, jam, nasko+codewatch_chromium.org, darin-cc_chromium.org, creis+watch_chromium.org, agrieve+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add Java wrapper for RenderFrameHost This patch adds a Java wrapper for RenderFrameHost. It also adds a getMainFrame method to WebContents. This will be useful for Payment Request which needs to know the exact (sub)frame issued the payment request. BUG=620173 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Review-Url: https://codereview.chromium.org/2681933002 Cr-Original-Commit-Position: refs/heads/master@{#455635} Committed: https://chromium.googlesource.com/chromium/src/+/67dd9f2795389cc3776481ff07740984b2389f43 Review-Url: https://codereview.chromium.org/2681933002 Cr-Commit-Position: refs/heads/master@{#456152} Committed: https://chromium.googlesource.com/chromium/src/+/300b08741f54d52bbdf1c6e400f54dcf64b0da34

Patch Set 1 #

Patch Set 2 : Fix linux compile #

Patch Set 3 : Add getMainFrame API and test it #

Patch Set 4 : Add getMainFrame API and test it #

Patch Set 5 : Add getMainFrame API and test it #

Total comments: 8

Patch Set 6 : Use base::SupportsUserData #

Patch Set 7 : Address rouslan's comments #

Patch Set 8 : s/GetURL/GetLastCommittedURL/g #

Total comments: 8

Patch Set 9 : Address some of the review comments #

Patch Set 10 : Address rest of review comments and remove DEPS change #

Patch Set 11 : Fix potential dtor problem #

Total comments: 12

Patch Set 12 : Rebase #

Patch Set 13 : Introduce RenderFrameHostDelegate #

Patch Set 14 : Hold on to RFH main frame #

Total comments: 17

Patch Set 15 : First batch of review comments fixes #

Patch Set 16 : Try to address all review comments #

Total comments: 14

Patch Set 17 : Address review comments #

Total comments: 10

Patch Set 18 : Address all review comments #

Total comments: 2

Patch Set 19 : Try to address weak ref usage #

Total comments: 2

Patch Set 20 : More iteration on local ref #

Total comments: 1

Patch Set 21 : Disable assertEquals test in testWebContentsMainFrame #

Total comments: 2

Patch Set 22 : Make test work with PlzNavigate #

Unified diffs Side-by-side diffs Delta from patch set Stats (+316 lines, -3 lines) Patch
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 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 2 chunks +2 lines, -0 lines 0 comments Download
A 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 17 1 chunk +50 lines, -0 lines 0 comments Download
A 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 17 18 19 1 chunk +58 lines, -0 lines 0 comments Download
M content/browser/frame_host/render_frame_host_delegate.h 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_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +7 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 3 chunks +6 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 3 chunks +20 lines, -1 line 0 comments Download
M content/browser/web_contents/web_contents_android.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 +3 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_android.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 +6 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_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 +4 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_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 +7 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 3 chunks +4 lines, -0 lines 0 comments Download
A content/public/android/java/src/org/chromium/content/browser/framehost/RenderFrameHostDelegate.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +11 lines, -0 lines 0 comments Download
A 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 1 chunk +49 lines, -0 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 6 chunks +23 lines, -2 lines 0 comments Download
A content/public/android/java/src/org/chromium/content_public/browser/RenderFrameHost.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +18 lines, -0 lines 0 comments Download
M content/public/android/java/src/org/chromium/content_public/browser/WebContents.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 +5 lines, -0 lines 0 comments Download
M content/public/android/javatests/src/org/chromium/content/browser/webcontents/WebContentsTest.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 3 chunks +32 lines, -0 lines 0 comments Download

Messages

Total messages: 76 (34 generated)
rwlbuis
PTAL. Same approach as was done for WebContents is implemented here. Two issues from my ...
3 years, 10 months ago (2017-02-14 17:18:47 UTC) #17
please use gerrit instead
Ted, who would be a good reviewer for the JNI changes? https://codereview.chromium.org/2681933002/diff/280001/content/browser/frame_host/render_frame_host_android.cc File content/browser/frame_host/render_frame_host_android.cc (right): ...
3 years, 10 months ago (2017-02-14 18:31:10 UTC) #19
Ted C
+boliu I'm not necessarily against adding this, but would be good to know how this ...
3 years, 10 months ago (2017-02-14 18:43:36 UTC) #21
please use gerrit instead
On 2017/02/14 18:43:36, Ted C wrote: > I'm not necessarily against adding this, but would ...
3 years, 10 months ago (2017-02-14 18:52:55 UTC) #22
Ted C
On 2017/02/14 18:52:55, rouslan wrote: > On 2017/02/14 18:43:36, Ted C wrote: > > I'm ...
3 years, 10 months ago (2017-02-14 18:59:05 UTC) #23
rwlbuis
On 2017/02/14 18:59:05, Ted C wrote: > On 2017/02/14 18:52:55, rouslan wrote: > > On ...
3 years, 10 months ago (2017-02-14 19:08:15 UTC) #24
rwlbuis
https://codereview.chromium.org/2681933002/diff/280001/content/browser/frame_host/render_frame_host_android.cc File content/browser/frame_host/render_frame_host_android.cc (right): https://codereview.chromium.org/2681933002/diff/280001/content/browser/frame_host/render_frame_host_android.cc#newcode70 content/browser/frame_host/render_frame_host_android.cc:70: env, render_frame_host_->GetLastCommittedURL().spec()); On 2017/02/14 18:31:10, rouslan wrote: > Can ...
3 years, 10 months ago (2017-02-14 19:26:27 UTC) #25
rwlbuis
On 2017/02/14 18:43:36, Ted C wrote: > Also, we should aim at keeping the API ...
3 years, 10 months ago (2017-02-14 21:35:40 UTC) #26
boliu
Sorry for the delay.. High level feedback For changes to public (content_public for java) I ...
3 years, 10 months ago (2017-02-15 02:12:51 UTC) #27
rwlbuis
https://codereview.chromium.org/2681933002/diff/340001/content/browser/frame_host/DEPS File content/browser/frame_host/DEPS (right): https://codereview.chromium.org/2681933002/diff/340001/content/browser/frame_host/DEPS#newcode24 content/browser/frame_host/DEPS:24: "+content/browser/web_contents", On 2017/02/15 02:12:51, boliu wrote: > this is ...
3 years, 10 months ago (2017-02-15 22:08:49 UTC) #28
rwlbuis
On 2017/02/15 02:12:51, boliu wrote: > Sorry for the delay.. High level feedback Thanks for ...
3 years, 10 months ago (2017-02-15 22:16:42 UTC) #29
boliu
Ownership is tricky. Now that native only holds a weak reference to java RFH, nothing ...
3 years, 10 months ago (2017-02-16 01:00:59 UTC) #30
rwlbuis
@boliu apologies, I was on vacation and then was occupied by other stuff. >Ownership is ...
3 years, 9 months ago (2017-03-01 21:53:58 UTC) #34
boliu
https://codereview.chromium.org/2681933002/diff/510001/content/browser/frame_host/render_frame_host_android.h File content/browser/frame_host/render_frame_host_android.h (right): https://codereview.chromium.org/2681933002/diff/510001/content/browser/frame_host/render_frame_host_android.h#newcode36 content/browser/frame_host/render_frame_host_android.h:36: RenderFrameHostImpl* render_frame_host() const { return render_frame_host_; } unused https://codereview.chromium.org/2681933002/diff/510001/content/browser/frame_host/render_frame_host_android.h#newcode46 ...
3 years, 9 months ago (2017-03-03 23:55:30 UTC) #35
rwlbuis
PTAL. Of course let me know if I got you incorrectly regarding the proposed design. ...
3 years, 9 months ago (2017-03-06 20:58:58 UTC) #36
boliu
https://codereview.chromium.org/2681933002/diff/510001/content/public/android/java/src/org/chromium/content_public/browser/RenderFrameHostDelegate.java File content/public/android/java/src/org/chromium/content_public/browser/RenderFrameHostDelegate.java (right): https://codereview.chromium.org/2681933002/diff/510001/content/public/android/java/src/org/chromium/content_public/browser/RenderFrameHostDelegate.java#newcode15 content/public/android/java/src/org/chromium/content_public/browser/RenderFrameHostDelegate.java:15: WebContents getAsWebContents(); On 2017/03/06 20:58:58, rwlbuis wrote: > On ...
3 years, 9 months ago (2017-03-06 23:12:38 UTC) #37
rwlbuis
>> I moved RenderFrameHostDelegate out of content_public and introduced >> WebContentsImpl.fromRenderFrameHost. Since fromRenderFrameHost needs to ...
3 years, 9 months ago (2017-03-07 19:44:56 UTC) #38
boliu
almost there, a few small things, and dealing correctly with weakref https://codereview.chromium.org/2681933002/diff/570001/content/browser/frame_host/render_frame_host_android.cc File content/browser/frame_host/render_frame_host_android.cc (right): ...
3 years, 9 months ago (2017-03-08 00:39:32 UTC) #39
do_not_use
PTAL. https://codereview.chromium.org/2681933002/diff/570001/content/browser/frame_host/render_frame_host_android.cc File content/browser/frame_host/render_frame_host_android.cc (right): https://codereview.chromium.org/2681933002/diff/570001/content/browser/frame_host/render_frame_host_android.cc#newcode30 content/browser/frame_host/render_frame_host_android.cc:30: ScopedJavaLocalRef<jobject> obj = Java_RenderFrameHostImpl_create( On 2017/03/08 00:39:32, boliu ...
3 years, 9 months ago (2017-03-08 18:28:27 UTC) #41
boliu
https://codereview.chromium.org/2681933002/diff/590001/content/browser/frame_host/render_frame_host_android.cc File content/browser/frame_host/render_frame_host_android.cc (right): https://codereview.chromium.org/2681933002/diff/590001/content/browser/frame_host/render_frame_host_android.cc#newcode42 content/browser/frame_host/render_frame_host_android.cc:42: ScopedJavaLocalRef<jobject> obj = Java_RenderFrameHostImpl_create( need to declare this out ...
3 years, 9 months ago (2017-03-08 21:43:37 UTC) #43
rwlbuis
PTAL. https://codereview.chromium.org/2681933002/diff/590001/content/browser/frame_host/render_frame_host_android.cc File content/browser/frame_host/render_frame_host_android.cc (right): https://codereview.chromium.org/2681933002/diff/590001/content/browser/frame_host/render_frame_host_android.cc#newcode42 content/browser/frame_host/render_frame_host_android.cc:42: ScopedJavaLocalRef<jobject> obj = Java_RenderFrameHostImpl_create( On 2017/03/08 21:43:37, boliu ...
3 years, 9 months ago (2017-03-08 22:20:48 UTC) #44
boliu
https://codereview.chromium.org/2681933002/diff/610001/content/browser/frame_host/render_frame_host_android.cc File content/browser/frame_host/render_frame_host_android.cc (right): https://codereview.chromium.org/2681933002/diff/610001/content/browser/frame_host/render_frame_host_android.cc#newcode41 content/browser/frame_host/render_frame_host_android.cc:41: ScopedJavaLocalRef<jobject> obj; this code is correct, but can still ...
3 years, 9 months ago (2017-03-08 22:27:16 UTC) #45
rwlbuis
PTAL. https://codereview.chromium.org/2681933002/diff/610001/content/browser/frame_host/render_frame_host_android.cc File content/browser/frame_host/render_frame_host_android.cc (right): https://codereview.chromium.org/2681933002/diff/610001/content/browser/frame_host/render_frame_host_android.cc#newcode41 content/browser/frame_host/render_frame_host_android.cc:41: ScopedJavaLocalRef<jobject> obj; On 2017/03/08 22:27:16, boliu wrote: > ...
3 years, 9 months ago (2017-03-08 22:51:14 UTC) #46
boliu
lgtm
3 years, 9 months ago (2017-03-08 22:53:09 UTC) #47
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/2681933002/630001
3 years, 9 months ago (2017-03-08 23:02:43 UTC) #49
please use gerrit instead
lgtm
3 years, 9 months ago (2017-03-08 23:12:43 UTC) #50
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/397365)
3 years, 9 months ago (2017-03-09 00:06:55 UTC) #52
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/2681933002/630001
3 years, 9 months ago (2017-03-09 00:37:01 UTC) #54
commit-bot: I haz the power
Committed patchset #20 (id:630001) as https://chromium.googlesource.com/chromium/src/+/67dd9f2795389cc3776481ff07740984b2389f43
3 years, 9 months ago (2017-03-09 01:57:30 UTC) #57
jam
testWebContentsMainFrame fails with --enable-browser-side-navigation Can you fix this please?
3 years, 9 months ago (2017-03-09 22:46:22 UTC) #59
jam
3 years, 9 months ago (2017-03-09 22:46:41 UTC) #60
jam
A revert of this CL (patchset #20 id:630001) has been created in https://codereview.chromium.org/2741043004/ by jam@chromium.org. ...
3 years, 9 months ago (2017-03-09 22:53:16 UTC) #61
boliu
https://codereview.chromium.org/2681933002/diff/630001/content/public/android/javatests/src/org/chromium/content/browser/webcontents/WebContentsTest.java File content/public/android/javatests/src/org/chromium/content/browser/webcontents/WebContentsTest.java (right): https://codereview.chromium.org/2681933002/diff/630001/content/public/android/javatests/src/org/chromium/content/browser/webcontents/WebContentsTest.java#newcode333 content/public/android/javatests/src/org/chromium/content/browser/webcontents/WebContentsTest.java:333: assertEquals("RenderFrameHost has incorrect last committed URL", "about:blank", failure is: ...
3 years, 9 months ago (2017-03-09 22:54:34 UTC) #62
rwlbuis
On 2017/03/09 22:53:16, jam wrote: > A revert of this CL (patchset #20 id:630001) has ...
3 years, 9 months ago (2017-03-09 23:12:23 UTC) #63
rwlbuis
On 2017/03/09 22:54:34, boliu wrote: > https://codereview.chromium.org/2681933002/diff/630001/content/public/android/javatests/src/org/chromium/content/browser/webcontents/WebContentsTest.java > File > content/public/android/javatests/src/org/chromium/content/browser/webcontents/WebContentsTest.java > (right): > > ...
3 years, 9 months ago (2017-03-09 23:33:45 UTC) #64
rwlbuis
On 2017/03/09 22:54:34, boliu wrote: > https://codereview.chromium.org/2681933002/diff/630001/content/public/android/javatests/src/org/chromium/content/browser/webcontents/WebContentsTest.java > File > content/public/android/javatests/src/org/chromium/content/browser/webcontents/WebContentsTest.java > (right): > > ...
3 years, 9 months ago (2017-03-09 23:40:52 UTC) #65
rwlbuis
Reopening this again.
3 years, 9 months ago (2017-03-09 23:59:12 UTC) #66
boliu
https://codereview.chromium.org/2681933002/diff/650001/content/public/android/javatests/src/org/chromium/content/browser/webcontents/WebContentsTest.java File content/public/android/javatests/src/org/chromium/content/browser/webcontents/WebContentsTest.java (right): https://codereview.chromium.org/2681933002/diff/650001/content/public/android/javatests/src/org/chromium/content/browser/webcontents/WebContentsTest.java#newcode333 content/public/android/javatests/src/org/chromium/content/browser/webcontents/WebContentsTest.java:333: // FIXME: make this work with PlzNavigate. so.. how ...
3 years, 9 months ago (2017-03-10 00:03:42 UTC) #68
rwlbuis
PTAL. https://codereview.chromium.org/2681933002/diff/650001/content/public/android/javatests/src/org/chromium/content/browser/webcontents/WebContentsTest.java File content/public/android/javatests/src/org/chromium/content/browser/webcontents/WebContentsTest.java (right): https://codereview.chromium.org/2681933002/diff/650001/content/public/android/javatests/src/org/chromium/content/browser/webcontents/WebContentsTest.java#newcode333 content/public/android/javatests/src/org/chromium/content/browser/webcontents/WebContentsTest.java:333: // FIXME: make this work with PlzNavigate. On ...
3 years, 9 months ago (2017-03-10 19:08:54 UTC) #69
boliu
lgtm
3 years, 9 months ago (2017-03-10 19:23:15 UTC) #70
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/2681933002/670001
3 years, 9 months ago (2017-03-10 19:25:52 UTC) #73
commit-bot: I haz the power
3 years, 9 months ago (2017-03-10 20:44:49 UTC) #76
Message was sent while issue was closed.
Committed patchset #22 (id:670001) as
https://chromium.googlesource.com/chromium/src/+/300b08741f54d52bbdf1c6e400f5...

Powered by Google App Engine
This is Rietveld 408576698