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

Issue 481803004: Removing ContentViewCore dependencies from few functions which acts as direct wrapper to WebContents (Closed)

Created:
6 years, 4 months ago by AKVT
Modified:
6 years, 2 months ago
CC:
chromium-reviews, David Trainor- moved to gerrit, plundblad+watch_chromium.org, aboxhall+watch_chromium.org, avayvod+watch_chromium.org, jam, yuzo+watch_chromium.org, darin-cc_chromium.org, dmazzoni+watch_chromium.org, dtseng+watch_chromium.org, android-webview-reviews_chromium.org, jochen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Removing ContentViewCore dependencies from few functions which acts as direct wrapper to WebContents It's a follow up patch to https://codereview.chromium.org/414423002/. We already restructured WebContents functionalities from ContentViewCore. In this patch we are removing unwanted ContentViewCore methods, so that ContentViewCore stake holders can directly call these methods. BUG=398263 Committed: https://crrev.com/7f5d0b808652fe088a46631948d3deea164fd677 Cr-Commit-Position: refs/heads/master@{#294746}

Patch Set 1 #

Total comments: 13

Patch Set 2 : Removed reduntanr getWebContents() calls. #

Total comments: 2

Patch Set 3 : Fixed the nit. #

Total comments: 9

Patch Set 4 : Rebased the patchset after landing dependent patches. #

Patch Set 5 : Removed NavigationController functions from ContentViewCore #

Patch Set 6 : Removed few nits. #

Total comments: 8

Patch Set 7 : Fixed review comments and line breaks. #

Patch Set 8 : Fixed AndroidWebView crash and UnitTest crashes. #

Patch Set 9 : Fixed nits. #

Total comments: 18

Patch Set 10 : Fixed review comments and rebased the patch. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+233 lines, -389 lines) Patch
M android_webview/java/src/org/chromium/android_webview/AwContents.java View 1 2 3 4 5 6 7 8 9 15 chunks +38 lines, -21 lines 0 comments Download
M android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java View 1 2 3 4 5 6 1 chunk +4 lines, -2 lines 0 comments Download
M android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientOnFormResubmissionTest.java View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java View 1 2 3 4 5 6 7 8 9 3 chunks +4 lines, -4 lines 0 comments Download
M android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -2 lines 0 comments Download
M android_webview/javatests/src/org/chromium/android_webview/test/ClearHistoryTest.java View 1 2 3 4 5 6 7 8 9 2 chunks +8 lines, -9 lines 0 comments Download
M android_webview/javatests/src/org/chromium/android_webview/test/LoadDataWithBaseUrlTest.java View 1 2 3 4 5 6 7 8 9 6 chunks +7 lines, -7 lines 0 comments Download
M android_webview/javatests/src/org/chromium/android_webview/test/LoadUrlTest.java View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M android_webview/javatests/src/org/chromium/android_webview/test/NavigationHistoryTest.java View 1 2 3 4 5 6 7 8 9 4 chunks +6 lines, -6 lines 0 comments Download
M android_webview/javatests/src/org/chromium/android_webview/test/SaveRestoreStateTest.java View 1 2 3 4 5 6 7 8 9 4 chunks +5 lines, -5 lines 0 comments Download
M android_webview/javatests/src/org/chromium/android_webview/test/WebKitHitTestTest.java View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M android_webview/test/shell/src/org/chromium/android_webview/shell/AwShellActivity.java View 1 2 3 4 7 chunks +13 lines, -7 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/Tab.java View 1 2 3 4 5 6 11 chunks +31 lines, -22 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/banners/AppBannerManager.java View 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerFeedbackReporter.java View 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/test/ModalDialogTest.java View 1 2 3 4 5 6 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellTab.java View 1 2 3 2 chunks +8 lines, -6 lines 0 comments Download
M chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellToolbar.java View 1 2 3 3 chunks +4 lines, -4 lines 0 comments Download
M chrome/android/shell/javatests/src/org/chromium/chrome/shell/ChromeShellTestBase.java View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M chrome/android/shell/javatests/src/org/chromium/chrome/shell/ChromeShellUrlTest.java View 1 2 3 4 5 6 1 chunk +4 lines, -3 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java View 1 2 3 4 5 6 7 8 9 7 chunks +1 line, -222 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java View 1 2 chunks +8 lines, -3 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanAccessibilityInjector.java View 1 chunk +1 line, -1 line 0 comments Download
M content/public/android/javatests/src/org/chromium/content/browser/ContentDetectionTestBase.java View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M content/public/android/javatests/src/org/chromium/content/browser/GestureDetectorResetTest.java View 1 2 3 4 5 6 1 chunk +3 lines, -2 lines 0 comments Download
M content/public/android/javatests/src/org/chromium/content/browser/JavaBridgeBasicsTest.java View 1 2 3 4 8 chunks +8 lines, -8 lines 0 comments Download
M content/public/android/javatests/src/org/chromium/content/browser/JavaBridgeTestBase.java View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M content/public/android/javatests/src/org/chromium/content/browser/NavigationTest.java View 1 2 3 4 5 6 3 chunks +10 lines, -6 lines 0 comments Download
M content/public/android/javatests/src/org/chromium/content/browser/WebContentsObserverAndroidTest.java View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M content/public/android/javatests/src/org/chromium/content/browser/input/SelectPopupTest.java View 1 2 3 4 2 chunks +4 lines, -1 line 0 comments Download
M content/public/test/android/javatests/src/org/chromium/content/browser/test/util/HistoryUtils.java View 1 2 3 9 chunks +17 lines, -17 lines 0 comments Download
M content/shell/android/java/src/org/chromium/content_shell/Shell.java View 1 2 3 4 7 chunks +17 lines, -10 lines 0 comments Download
M content/shell/android/javatests/src/org/chromium/content_shell_apk/ContentShellShellManagementTest.java View 1 2 3 4 5 6 2 chunks +4 lines, -2 lines 0 comments Download
M content/shell/android/javatests/src/org/chromium/content_shell_apk/ContentShellTestBase.java View 1 2 3 4 5 6 3 chunks +4 lines, -3 lines 0 comments Download
M content/shell/android/javatests/src/org/chromium/content_shell_apk/ContentShellUrlTest.java View 1 chunk +1 line, -1 line 0 comments Download
M content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ContentShellActivity.java View 1 2 3 4 5 6 2 chunks +4 lines, -3 lines 0 comments Download

Messages

Total messages: 33 (4 generated)
AKVT
@Yaron, boliu and avi PTAL this change.
6 years, 4 months ago (2014-08-18 14:34:50 UTC) #1
Avi (use Gerrit)
On 2014/08/18 14:34:50, AKV wrote: > @Yaron, boliu and avi PTAL this change. I don't ...
6 years, 4 months ago (2014-08-18 14:52:51 UTC) #2
boliu
https://codereview.chromium.org/481803004/diff/1/android_webview/java/src/org/chromium/android_webview/AwContents.java File android_webview/java/src/org/chromium/android_webview/AwContents.java (right): https://codereview.chromium.org/481803004/diff/1/android_webview/java/src/org/chromium/android_webview/AwContents.java#newcode1072 android_webview/java/src/org/chromium/android_webview/AwContents.java:1072: params.getUrl().equals(mContentViewCore.getWebContents().getUrl()) && Add a mWebContents member in AwContents so ...
6 years, 4 months ago (2014-08-18 15:38:15 UTC) #3
AKVT
Thanks boliu. I am fixing the comments. PTAL my inline comments about ex.printStacktrace() and share ...
6 years, 4 months ago (2014-08-18 17:03:03 UTC) #4
boliu
https://codereview.chromium.org/481803004/diff/1/content/public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java File content/public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java (right): https://codereview.chromium.org/481803004/diff/1/content/public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java#newcode322 content/public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java:322: ex.printStackTrace(); On 2014/08/18 17:03:03, AKV wrote: > On 2014/08/18 ...
6 years, 4 months ago (2014-08-18 17:08:47 UTC) #5
AKVT
@boliu and Yaron PTAL
6 years, 4 months ago (2014-08-18 17:21:11 UTC) #6
boliu
android_webview lgtm https://codereview.chromium.org/481803004/diff/20001/android_webview/java/src/org/chromium/android_webview/AwContents.java File android_webview/java/src/org/chromium/android_webview/AwContents.java (right): https://codereview.chromium.org/481803004/diff/20001/android_webview/java/src/org/chromium/android_webview/AwContents.java#newcode779 android_webview/java/src/org/chromium/android_webview/AwContents.java:779: mWebContentsObserver = new AwWebContentsObserver(mWebContents, nit: this can ...
6 years, 4 months ago (2014-08-18 17:37:27 UTC) #7
AKVT
Thanks boliu. @Yaron and Avi PTAL. https://codereview.chromium.org/481803004/diff/20001/android_webview/java/src/org/chromium/android_webview/AwContents.java File android_webview/java/src/org/chromium/android_webview/AwContents.java (right): https://codereview.chromium.org/481803004/diff/20001/android_webview/java/src/org/chromium/android_webview/AwContents.java#newcode779 android_webview/java/src/org/chromium/android_webview/AwContents.java:779: mWebContentsObserver = new ...
6 years, 4 months ago (2014-08-18 18:22:03 UTC) #8
Avi (use Gerrit)
You have LGTM from me once you have all the Android experts happy.
6 years, 4 months ago (2014-08-18 19:17:38 UTC) #9
Yaron
https://codereview.chromium.org/481803004/diff/40001/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellTab.java File chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellTab.java (right): https://codereview.chromium.org/481803004/diff/40001/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellTab.java#newcode65 chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellTab.java:65: ContentViewCore contentViewCore = getContentViewCore(); We should remove the CVC ...
6 years, 4 months ago (2014-08-18 23:16:24 UTC) #10
AKVT
On 2014/08/18 23:16:24, Yaron wrote: > https://codereview.chromium.org/481803004/diff/40001/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellTab.java > File chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellTab.java > (right): > > https://codereview.chromium.org/481803004/diff/40001/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellTab.java#newcode65 ...
6 years, 4 months ago (2014-08-19 14:25:47 UTC) #11
AKVT
@Yaron, boliu, Avi, tedchoc PTAL. https://codereview.chromium.org/481803004/diff/40001/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellTab.java File chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellTab.java (right): https://codereview.chromium.org/481803004/diff/40001/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellTab.java#newcode65 chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellTab.java:65: ContentViewCore contentViewCore = getContentViewCore(); ...
6 years, 3 months ago (2014-09-11 17:19:43 UTC) #13
AKVT
PTAL PS6.
6 years, 3 months ago (2014-09-11 17:54:12 UTC) #14
Avi (use Gerrit)
On 2014/09/11 17:54:12, AKV wrote: > PTAL PS6. I am not a Java person, and ...
6 years, 3 months ago (2014-09-11 18:06:45 UTC) #15
AKVT
On 2014/09/11 18:06:45, Avi wrote: > On 2014/09/11 17:54:12, AKV wrote: > > PTAL PS6. ...
6 years, 3 months ago (2014-09-11 18:22:18 UTC) #16
Ted C
A few style nits. I need to write up a downstream change to clean up ...
6 years, 3 months ago (2014-09-12 00:40:37 UTC) #17
AKVT
@Ted PTAL. I corrected line breaks. https://codereview.chromium.org/481803004/diff/100001/chrome/android/java/src/org/chromium/chrome/browser/Tab.java File chrome/android/java/src/org/chromium/chrome/browser/Tab.java (right): https://codereview.chromium.org/481803004/diff/100001/chrome/android/java/src/org/chromium/chrome/browser/Tab.java#newcode403 chrome/android/java/src/org/chromium/chrome/browser/Tab.java:403: if (getWebContents() != ...
6 years, 3 months ago (2014-09-12 14:37:11 UTC) #18
Ted C
lgtm
6 years, 3 months ago (2014-09-12 16:06:19 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/481803004/120001
6 years, 3 months ago (2014-09-12 16:08:52 UTC) #21
boliu
On 2014/09/12 16:08:52, I haz the power (commit-bot) wrote: > CQ is trying da patch. ...
6 years, 3 months ago (2014-09-12 16:10:43 UTC) #23
boliu
On 2014/09/12 16:10:43, boliu wrote: > On 2014/09/12 16:08:52, I haz the power (commit-bot) wrote: ...
6 years, 3 months ago (2014-09-12 17:13:47 UTC) #24
AKVT
@boliu, PTAL, I fixed the crashes.
6 years, 3 months ago (2014-09-12 19:50:44 UTC) #25
boliu
lgtm after a bunch of clean ups https://codereview.chromium.org/481803004/diff/160001/android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java File android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java (right): https://codereview.chromium.org/481803004/diff/160001/android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java#newcode138 android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java:138: public void ...
6 years, 3 months ago (2014-09-13 00:38:54 UTC) #26
AKVT
https://codereview.chromium.org/481803004/diff/160001/android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java File android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java (right): https://codereview.chromium.org/481803004/diff/160001/android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java#newcode138 android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java:138: public void showRepostFormWarningDialog(final ContentViewCore contentViewCore) { On 2014/09/13 00:38:53, ...
6 years, 3 months ago (2014-09-13 11:30:50 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/481803004/180001
6 years, 3 months ago (2014-09-13 12:46:23 UTC) #29
commit-bot: I haz the power
Committed patchset #10 (id:180001) as 3cd082f82afd6a4d30c35f26f65d49d682b2bb16
6 years, 3 months ago (2014-09-13 13:28:17 UTC) #30
commit-bot: I haz the power
Patchset 10 (id:??) landed as https://crrev.com/7f5d0b808652fe088a46631948d3deea164fd677 Cr-Commit-Position: refs/heads/master@{#294746}
6 years, 3 months ago (2014-09-13 13:32:25 UTC) #31
AKVT
@Yaron/Ted Please respond to my inline queries https://codereview.chromium.org/481803004/diff/40001/content/public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java File content/public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java (right): https://codereview.chromium.org/481803004/diff/40001/content/public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java#newcode308 content/public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java:308: if (mContentViewCore.getWebContents().getUrl() ...
6 years, 2 months ago (2014-10-13 12:25:05 UTC) #32
Yaron
6 years, 2 months ago (2014-10-15 20:26:25 UTC) #33
Message was sent while issue was closed.
On 2014/10/13 12:25:05, AKV wrote:
> @Yaron/Ted Please respond to my inline queries
> 
>
https://codereview.chromium.org/481803004/diff/40001/content/public/android/j...
> File
>
content/public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java
> (right):
> 
>
https://codereview.chromium.org/481803004/diff/40001/content/public/android/j...
>
content/public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java:308:
> if (mContentViewCore.getWebContents().getUrl() == null) {
> On 2014/09/11 17:19:43, AKV wrote:
> > On 2014/08/18 23:16:24, Yaron wrote:
> > > So this is probably a few steps down the road (i.e. a few blocking issues
in
> > the
> > > way) but I'm curious whether we'd be able to have some of these classes
only
> > > depend on WebContents and lower layers. What would be preventing us from
> doing
> > > that? It seems like we need the Context and the ContainerView, the latter
is
> > > supposed to be available from webcontents based on web_contents.h
> > > (GetNativeView). 
> > 
> > @Yaron, Can we do this with a follow up patch ? as it needs more changes
> 
> @Yaron, I would like to take a follow up to this CL.
> Please help me to address following issues.
> 
> How we can place addJavascriptInterface() ? Can we move the native part
> including java_bridge_dispatcher_host_ to WebContents ?
> 

Is it purely WebContents-based? I'm not familiar with it.
> 
> ContentSettings can we manage inside WebContents instead of CVC ?

Ya, ContentSettings looks like it doesn't need to depend on CVC. Remember we
also talked about removing the NavigationClient interface and replacing it with
NavigationController

Powered by Google App Engine
This is Rietveld 408576698