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

Issue 831523005: Remove most native WebContents references from Java (Closed)

Created:
5 years, 11 months ago by David Trainor- moved to gerrit
Modified:
5 years, 11 months ago
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, David Trainor- moved to gerrit, avayvod+watch_chromium.org, jam, darin-cc_chromium.org, mkwst+moarreviews-shell_chromium.org, android-webview-reviews_chromium.org, jochen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove most native WebContents references from Java - Make all Tab#initialize(0 methods take a WebContents instead of a native WebContents pointer or a ContentViewCore. - Make ContentViewCore#initialize() take a java WebContents - Update methods in ContentViewUtil to no longer expose native WebContents. - Add WebContents#destroy() to handle deleting a native WebContents and Java WebContents object. - Remove many other references that cascade from these changes. Committed: https://crrev.com/25ee0c3fad8d124fa66174fdeedf028482015346 Cr-Commit-Position: refs/heads/master@{#313338}

Patch Set 1 #

Patch Set 2 : Added javadocs, cleaned some stuff up #

Total comments: 8

Patch Set 3 : Fixed build breaks #

Patch Set 4 : JNI boundary ref counting is sneaky! #

Patch Set 5 : Removed methods from ContentViewUtil and cascaded changes #

Patch Set 6 : Kept same error checking behavior for aw_contents.cc #

Total comments: 6

Patch Set 7 : Addressed tedchoc@ and michaelbai@ comments #

Patch Set 8 : Updated findbugs #

Patch Set 9 : Rebased #

Patch Set 10 : Rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+302 lines, -190 lines) Patch
M android_webview/java/src/org/chromium/android_webview/AwContents.java View 1 2 3 4 5 6 7 8 3 chunks +6 lines, -6 lines 0 comments Download
M android_webview/java/src/org/chromium/android_webview/AwSettings.java View 1 2 3 chunks +5 lines, -4 lines 0 comments Download
M android_webview/native/aw_contents.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M android_webview/native/aw_contents.cc View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -2 lines 0 comments Download
M android_webview/native/aw_settings.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M android_webview/native/aw_settings.cc View 1 2 2 chunks +10 lines, -7 lines 0 comments Download
M build/android/findbugs_filter/findbugs_known_bugs.txt View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ChromeWebContentsDelegateAndroid.java View 1 2 3 4 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ContentViewUtil.java View 1 2 3 4 2 chunks +29 lines, -19 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/EmptyTabObserver.java View 1 2 3 4 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/Tab.java View 1 2 3 4 5 6 7 8 6 chunks +45 lines, -52 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/TabObserver.java View 1 2 3 4 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/document/PendingDocumentData.java View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/prerender/ExternalPrerenderHandler.java View 1 2 3 4 4 chunks +15 lines, -12 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelJniBridge.java View 1 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/tabmodel/document/DocumentTabModelImpl.java View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/tabmodel/document/TabDelegate.java View 1 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/input/SelectPopupOtherContentViewTest.java View 1 2 3 4 2 chunks +18 lines, -14 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/prerender/ExternalPrerenderRequestTest.java View 1 2 3 4 4 chunks +13 lines, -13 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/tabmodel/TabModelSelectorTabObserverTest.java View 1 2 3 4 5 6 3 chunks +3 lines, -2 lines 0 comments Download
M chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellTab.java View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellTabModel.java View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/android/chrome_web_contents_delegate_android.cc View 1 chunk +9 lines, -2 lines 0 comments Download
M chrome/browser/android/content_view_util.cc View 1 2 3 4 5 6 3 chunks +14 lines, -6 lines 0 comments Download
M chrome/browser/android/tab_android.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/prerender/external_prerender_handler_android.h View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/prerender/external_prerender_handler_android.cc View 1 2 3 4 4 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/ui/android/tab_model/tab_model_jni_bridge.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/test/android/javatests/src/org/chromium/chrome/test/util/browser/tabmodel/document/MockTabDelegate.java View 2 chunks +2 lines, -1 line 0 comments Download
M components/web_contents_delegate_android/android/java/src/org/chromium/components/web_contents_delegate_android/WebContentsDelegateAndroid.java View 1 2 3 4 2 chunks +3 lines, -2 lines 0 comments Download
M components/web_contents_delegate_android/web_contents_delegate_android.cc View 1 2 3 4 1 chunk +13 lines, -3 lines 0 comments Download
M content/browser/android/content_view_core_impl.cc View 1 2 3 1 chunk +17 lines, -2 lines 0 comments Download
M content/browser/web_contents/web_contents_android.cc View 1 2 3 4 5 6 2 chunks +17 lines, -1 line 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java View 1 2 3 4 5 6 7 8 5 chunks +14 lines, -5 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java View 1 2 3 4 3 chunks +9 lines, -1 line 0 comments Download
M content/public/android/java/src/org/chromium/content_public/browser/WebContents.java View 1 2 3 4 2 chunks +6 lines, -0 lines 0 comments Download
M content/shell/android/java/src/org/chromium/content_shell/Shell.java View 1 1 chunk +3 lines, -3 lines 0 comments Download
M content/shell/browser/shell_android.cc View 1 2 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 22 (6 generated)
David Trainor- moved to gerrit
preliminary patch.
5 years, 11 months ago (2015-01-15 02:40:29 UTC) #2
David Trainor- moved to gerrit
Probably ready for initial review now. Still lots of stuff we can pull out in ...
5 years, 11 months ago (2015-01-16 22:58:29 UTC) #3
Ted C
lgtm https://codereview.chromium.org/831523005/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/ContentViewUtil.java File chrome/android/java/src/org/chromium/chrome/browser/ContentViewUtil.java (right): https://codereview.chromium.org/831523005/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/ContentViewUtil.java#newcode54 chrome/android/java/src/org/chromium/chrome/browser/ContentViewUtil.java:54: @Deprecated Can these be removed after the corresponding ...
5 years, 11 months ago (2015-01-17 01:34:49 UTC) #4
David Trainor- moved to gerrit
https://chromiumcodereview.appspot.com/831523005/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/ContentViewUtil.java File chrome/android/java/src/org/chromium/chrome/browser/ContentViewUtil.java (right): https://chromiumcodereview.appspot.com/831523005/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/ContentViewUtil.java#newcode54 chrome/android/java/src/org/chromium/chrome/browser/ContentViewUtil.java:54: @Deprecated On 2015/01/17 01:34:49, Ted C wrote: > Can ...
5 years, 11 months ago (2015-01-21 19:36:02 UTC) #5
David Trainor- moved to gerrit
ptal: michaelbai@: android_webview/* cbentzel@: chrome/browser/prerender/* tedchoc@: *!
5 years, 11 months ago (2015-01-21 19:43:02 UTC) #7
michaelbai
android_webview lgtm https://chromiumcodereview.appspot.com/831523005/diff/100001/content/browser/web_contents/web_contents_android.h File content/browser/web_contents/web_contents_android.h (right): https://chromiumcodereview.appspot.com/831523005/diff/100001/content/browser/web_contents/web_contents_android.h#newcode106 content/browser/web_contents/web_contents_android.h:106: Did you intent to add a empty ...
5 years, 11 months ago (2015-01-21 20:26:39 UTC) #8
Ted C
slgtm https://chromiumcodereview.appspot.com/831523005/diff/100001/chrome/browser/android/content_view_util.cc File chrome/browser/android/content_view_util.cc (right): https://chromiumcodereview.appspot.com/831523005/diff/100001/chrome/browser/android/content_view_util.cc#newcode47 chrome/browser/android/content_view_util.cc:47: reinterpret_cast<content::WebContents*>(web_contents_ptr); indented too much https://chromiumcodereview.appspot.com/831523005/diff/100001/content/browser/web_contents/web_contents_android.cc File content/browser/web_contents/web_contents_android.cc (right): ...
5 years, 11 months ago (2015-01-21 20:45:42 UTC) #9
David Trainor- moved to gerrit
https://chromiumcodereview.appspot.com/831523005/diff/100001/chrome/browser/android/content_view_util.cc File chrome/browser/android/content_view_util.cc (right): https://chromiumcodereview.appspot.com/831523005/diff/100001/chrome/browser/android/content_view_util.cc#newcode47 chrome/browser/android/content_view_util.cc:47: reinterpret_cast<content::WebContents*>(web_contents_ptr); On 2015/01/21 20:45:42, Ted C wrote: > indented ...
5 years, 11 months ago (2015-01-21 23:13:25 UTC) #10
cbentzel
chrome/browser/prerender LGTM
5 years, 11 months ago (2015-01-23 01:06:11 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/831523005/160001
5 years, 11 months ago (2015-01-26 23:13:33 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/38443)
5 years, 11 months ago (2015-01-26 23:22:14 UTC) #15
David Trainor- moved to gerrit
klundberg@: ptal at build/android/findbugs_filter Thanks! :)
5 years, 11 months ago (2015-01-26 23:29:35 UTC) #17
klundberg
LGTM for build/android/findbugs_filter
5 years, 11 months ago (2015-01-27 00:19:38 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/831523005/180001
5 years, 11 months ago (2015-01-27 19:19:32 UTC) #20
commit-bot: I haz the power
Committed patchset #10 (id:180001)
5 years, 11 months ago (2015-01-27 20:16:24 UTC) #21
commit-bot: I haz the power
5 years, 11 months ago (2015-01-27 20:17:30 UTC) #22
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/25ee0c3fad8d124fa66174fdeedf028482015346
Cr-Commit-Position: refs/heads/master@{#313338}

Powered by Google App Engine
This is Rietveld 408576698