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

Issue 10831060: Refactor the Android port to allow access to the chrome layer. (Closed)

Created:
8 years, 4 months ago by Leandro Graciá Gil
Modified:
8 years, 4 months ago
Reviewers:
joth, jam, Jói
CC:
chromium-reviews, joi+watch-content_chromium.org, erikwright (departed), darin-cc_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

Refactor the Android port to allow access to the chrome layer. While in desktop chrome the main WebContentsDelegate is implemented in the chrome layer by the Browser class, the Android port implements it in the content layer in its ContentViewClient class. However, because of the content layering limitations this renders the chrome layer out of reach. This patch splits the WebContentsDelegate implementation in ContentViewClient into a separate class named WebContentsDelegateAndroid in the first chrome browser component "web_contents_delegate_android". Also, this patch introduces stubs for Chrome-specific and WebView-specific extensions of WebContentsDelegateAndroid in order to set the foundations for later patches. BUG=137967 TEST=existing tests Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=152598

Patch Set 1 #

Patch Set 2 : rebase and remove some unused code in web_contents_delegate_android. #

Patch Set 3 : adding web_contents_delegate_android component. #

Total comments: 8

Patch Set 4 : review fixes, new gyps and renames #

Patch Set 5 : gyp fixes #

Total comments: 6

Patch Set 6 : review fixes. #

Total comments: 2

Patch Set 7 : nit fixed. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1141 lines, -768 lines) Patch
M android_webview/DEPS View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
A android_webview/build/install_binary View 1 2 1 chunk +23 lines, -0 lines 0 comments Download
A android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegate.java View 1 2 3 1 chunk +18 lines, -0 lines 0 comments Download
M android_webview/lib/android_webview.gyp View 1 2 3 2 chunks +30 lines, -0 lines 0 comments Download
M android_webview/lib/main/webview_entry_point.cc View 1 2 2 chunks +5 lines, -2 lines 0 comments Download
A android_webview/native/android_webview_jni_registrar.h View 1 2 1 chunk +17 lines, -0 lines 0 comments Download
A android_webview/native/android_webview_jni_registrar.cc View 1 2 3 1 chunk +17 lines, -0 lines 0 comments Download
A android_webview/native/aw_web_contents_delegate.h View 1 2 3 1 chunk +26 lines, -0 lines 0 comments Download
A android_webview/native/aw_web_contents_delegate.cc View 1 2 3 1 chunk +18 lines, -0 lines 0 comments Download
A android_webview/native/webview_native.gyp View 1 2 3 4 5 1 chunk +40 lines, -0 lines 0 comments Download
M base/android/jni_generator/jni_generator.py View 1 2 1 chunk +3 lines, -1 line 0 comments Download
A chrome/android/java/src/org/chromium/chrome/browser/ChromeWebContentsDelegateAndroid.java View 1 2 1 chunk +16 lines, -0 lines 0 comments Download
A chrome/android/java/src/org/chromium/chrome/browser/ContentViewUtil.java View 1 2 1 chunk +25 lines, -0 lines 0 comments Download
A chrome/android/java/src/org/chromium/chrome/browser/component/web_contents_delegate_android/WebContentsDelegateAndroid.java View 1 2 3 1 chunk +110 lines, -0 lines 0 comments Download
M chrome/browser/android/chrome_jni_registrar.cc View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
A chrome/browser/android/chrome_web_contents_delegate_android.h View 1 2 3 1 chunk +37 lines, -0 lines 0 comments Download
A chrome/browser/android/chrome_web_contents_delegate_android.cc View 1 2 1 chunk +37 lines, -0 lines 0 comments Download
A chrome/browser/android/content_view_util.h View 1 2 1 chunk +14 lines, -0 lines 0 comments Download
A chrome/browser/android/content_view_util.cc View 1 2 1 chunk +29 lines, -0 lines 0 comments Download
A chrome/browser/component/DEPS View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
A + chrome/browser/component/OWNERS View 1 2 3 0 chunks +-1 lines, --1 lines 0 comments Download
A chrome/browser/component/components.gyp View 1 2 3 4 5 1 chunk +29 lines, -0 lines 0 comments Download
A chrome/browser/component/web_contents_delegate_android/DEPS View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
A chrome/browser/component/web_contents_delegate_android/component_jni_registrar.h View 1 2 3 1 chunk +19 lines, -0 lines 0 comments Download
A chrome/browser/component/web_contents_delegate_android/component_jni_registrar.cc View 1 2 3 4 5 1 chunk +23 lines, -0 lines 0 comments Download
A chrome/browser/component/web_contents_delegate_android/web_contents_delegate_android.h View 1 2 3 4 5 6 1 chunk +128 lines, -0 lines 0 comments Download
A chrome/browser/component/web_contents_delegate_android/web_contents_delegate_android.cc View 1 2 3 1 chunk +357 lines, -0 lines 0 comments Download
A chrome/browser/component/web_contents_delegate_android/web_contents_delegate_android.gypi View 1 2 3 4 5 1 chunk +34 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 3 chunks +6 lines, -0 lines 0 comments Download
D content/browser/android/content_util.h View 1 chunk +0 lines, -30 lines 0 comments Download
D content/browser/android/content_util.cc View 1 chunk +0 lines, -81 lines 0 comments Download
M content/browser/android/content_view_client.h View 1 2 5 chunks +10 lines, -86 lines 0 comments Download
M content/browser/android/content_view_client.cc View 1 2 8 chunks +37 lines, -328 lines 0 comments Download
M content/browser/android/content_view_core_impl.h View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/android/content_view_core_impl.cc View 1 2 2 chunks +0 lines, -10 lines 0 comments Download
D content/browser/android/ime_utils.h View 1 chunk +0 lines, -31 lines 0 comments Download
D content/browser/android/ime_utils.cc View 1 chunk +0 lines, -31 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 2 chunks +0 lines, -4 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/ContentView.java View 1 2 1 chunk +0 lines, -7 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/ContentViewClient.java View 1 6 chunks +0 lines, -68 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java View 1 2 4 chunks +9 lines, -12 lines 0 comments Download
D content/public/android/java/src/org/chromium/content/browser/FileChooserParams.java View 1 chunk +0 lines, -77 lines 0 comments Download
M content/public/browser/web_contents_delegate.h View 1 1 chunk +6 lines, -0 lines 0 comments Download
M content/public/browser/web_contents_delegate.cc View 1 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 31 (0 generated)
Leandro Graciá Gil
joth: base/android, content/browser/android code and any further general comments you might have, as most of ...
8 years, 4 months ago (2012-07-27 23:24:59 UTC) #1
Leandro Graciá Gil
joth: and also chrome/browser/android. Basically any android-specific code :) On 2012/07/27 23:24:59, Leandro Graciá Gil ...
8 years, 4 months ago (2012-07-27 23:27:33 UTC) #2
jam
some comments before I drill down: WebContentsDelegateAndroid seems too generic for this. Is this basically ...
8 years, 4 months ago (2012-07-27 23:45:23 UTC) #3
Leandro Graciá Gil
On 2012/07/27 23:45:23, John Abd-El-Malek wrote: > some comments before I drill down: > > ...
8 years, 4 months ago (2012-07-28 14:35:50 UTC) #4
joth
On 28 July 2012 07:35, <leandrogracia@chromium.org> wrote: > On 2012/07/27 23:45:23, John Abd-El-Malek wrote: > ...
8 years, 4 months ago (2012-07-31 00:42:04 UTC) #5
jam
On 2012/07/31 00:42:04, joth wrote: > On 28 July 2012 07:35, <mailto:leandrogracia@chromium.org> wrote: > > ...
8 years, 4 months ago (2012-07-31 22:58:20 UTC) #6
Leandro Graciá Gil
Any changes I should do to the current approach before review, then? Thanks for taking ...
8 years, 4 months ago (2012-08-03 00:03:44 UTC) #7
jam
On 2012/08/03 00:03:44, Leandro Graciá Gil wrote: > Any changes I should do to the ...
8 years, 4 months ago (2012-08-06 18:16:58 UTC) #8
joth
+joi per discussion earlier, this is the patch already landed downstream. WebContentsDelegateAndroid is a reusable ...
8 years, 4 months ago (2012-08-07 19:42:20 UTC) #9
Jói
I agree it seems like WebContentsDelegateAndroid should be moved to somewhere you can reuse it ...
8 years, 4 months ago (2012-08-08 15:19:39 UTC) #10
Jói
Looking at WebContentsDelegateAndroid (C++) some more, is there a reason why it shouldn't actually just ...
8 years, 4 months ago (2012-08-08 15:28:26 UTC) #11
Leandro Graciá Gil
There are more incoming chrome dependencies that haven't been upstreamed yet. For example, for the ...
8 years, 4 months ago (2012-08-08 15:33:43 UTC) #12
Leandro Graciá Gil
On 2012/08/08 15:19:39, Jói wrote: > As a first step you could write a DEPS ...
8 years, 4 months ago (2012-08-08 16:31:14 UTC) #13
Leandro Graciá Gil
A few extra chrome layer DEPS in the downstream chrome/browser/android code: - chrome/browser/ui/tab_contents/tab_contents.h - chrome/browser/history/android/sqlite_cursor.h ...
8 years, 4 months ago (2012-08-08 16:36:11 UTC) #14
Jói
For background, Jonathan had suggested that the WebContentsDelegateAndroid didn't have any dependencies on chrome/browser and ...
8 years, 4 months ago (2012-08-08 16:44:51 UTC) #15
Leandro Graciá Gil
Thanks for the clarification. Let's have this reviewed and ready to land. On 2012/08/08 16:44:51, ...
8 years, 4 months ago (2012-08-08 16:58:35 UTC) #16
Leandro Graciá Gil
Ok, we finally have the first browser component here. This patch splits the WebContentsDelegate implementation ...
8 years, 4 months ago (2012-08-20 13:30:58 UTC) #17
Jói
I haven't reviewed the implementation in detail yet, was looking primarily at this from a ...
8 years, 4 months ago (2012-08-20 14:02:39 UTC) #18
Leandro Graciá Gil
https://chromiumcodereview.appspot.com/10831060/diff/6006/android_webview/native/webview_web_contents_delegate_android.h File android_webview/native/webview_web_contents_delegate_android.h (right): https://chromiumcodereview.appspot.com/10831060/diff/6006/android_webview/native/webview_web_contents_delegate_android.h#newcode17 android_webview/native/webview_web_contents_delegate_android.h:17: class WebViewWebContentsDelegateAndroid On 2012/08/20 14:02:39, Jói wrote: > I ...
8 years, 4 months ago (2012-08-20 20:26:17 UTC) #19
Jói
In general, this LGTM with some comments below. I don't have the background needed to ...
8 years, 4 months ago (2012-08-21 12:17:07 UTC) #20
Leandro Graciá Gil
https://chromiumcodereview.appspot.com/10831060/diff/16001/android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegate.java File android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegate.java (right): https://chromiumcodereview.appspot.com/10831060/diff/16001/android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegate.java#newcode14 android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegate.java:14: * These methods belong to WebView but are not ...
8 years, 4 months ago (2012-08-21 16:17:42 UTC) #21
Leandro Graciá Gil
jam, any comments on this? Thanks! On 2012/08/21 16:17:42, Leandro Graciá Gil wrote: > https://chromiumcodereview.appspot.com/10831060/diff/16001/android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegate.java ...
8 years, 4 months ago (2012-08-21 16:39:58 UTC) #22
jam
lgtm http://codereview.chromium.org/10831060/diff/17001/chrome/browser/component/web_contents_delegate_android/web_contents_delegate_android.h File chrome/browser/component/web_contents_delegate_android/web_contents_delegate_android.h (right): http://codereview.chromium.org/10831060/diff/17001/chrome/browser/component/web_contents_delegate_android/web_contents_delegate_android.h#newcode23 chrome/browser/component/web_contents_delegate_android/web_contents_delegate_android.h:23: struct NativeWebKeyboardEvent; nit: class then struct
8 years, 4 months ago (2012-08-21 17:27:13 UTC) #23
Leandro Graciá Gil
https://chromiumcodereview.appspot.com/10831060/diff/17001/chrome/browser/component/web_contents_delegate_android/web_contents_delegate_android.h File chrome/browser/component/web_contents_delegate_android/web_contents_delegate_android.h (right): https://chromiumcodereview.appspot.com/10831060/diff/17001/chrome/browser/component/web_contents_delegate_android/web_contents_delegate_android.h#newcode23 chrome/browser/component/web_contents_delegate_android/web_contents_delegate_android.h:23: struct NativeWebKeyboardEvent; On 2012/08/21 17:27:13, John Abd-El-Malek wrote: > ...
8 years, 4 months ago (2012-08-21 17:35:06 UTC) #24
joth
lgtm
8 years, 4 months ago (2012-08-21 17:43:58 UTC) #25
Leandro Graciá Gil
Thanks for the long review and all the help to get the right approach and ...
8 years, 4 months ago (2012-08-21 17:46:43 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/leandrogracia@chromium.org/10831060/8053
8 years, 4 months ago (2012-08-21 17:49:01 UTC) #27
commit-bot: I haz the power
Presubmit check for 10831060-8053 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 4 months ago (2012-08-21 17:49:21 UTC) #28
Leandro Graciá Gil
These issues are actually on Java import lines (as if they were #includes) and Java ...
8 years, 4 months ago (2012-08-21 17:51:38 UTC) #29
Leandro Graciá Gil
Landed the patch manually. Keeping an eye on the bots. On 2012/08/21 17:51:38, Leandro Graciá ...
8 years, 4 months ago (2012-08-21 18:29:15 UTC) #30
jam
8 years, 4 months ago (2012-08-22 01:09:56 UTC) #31
On 2012/08/21 17:46:43, Leandro Graciá Gil wrote:
> Thanks for the long review and all the help to get the right approach and
create
> the first browser component :)

thanks for bearing through with this :)

Powered by Google App Engine
This is Rietveld 408576698