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

Issue 2634563002: android_webview: support building a stub WebView. (Closed)

Created:
3 years, 11 months ago by Torne
Modified:
3 years, 9 months ago
Reviewers:
michaelbai, jbudorick
CC:
chromium-reviews, mikecase+watch_chromium.org, jbudorick+watch_chromium.org, android-webview-reviews_chromium.org, agrieve+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

android_webview: support building a stub WebView. Allwo building a WebView APK which doesn't contain any code or assets, and no resources other than the icon. This APK has a special manifest tag which will direct the system to provide the missing files from another "donor" package at runtime that has compatible code (this will be Monochrome). To enable this to work, a new APK variable is defined called "generate_buildconfig_java" so that the BuildConfig.java file can be omitted from this APK (leaving the generated classes.dex containing nothing but the AAPT-generated R class for the single icon resource). The runtime doesn't like having multiple APKs in the classpath which define the same classes, so we need to omit this BuildConfig to avoid clashing with Monochrome's. BUG=664456

Patch Set 1 #

Total comments: 4

Patch Set 2 : add comment #

Total comments: 6

Patch Set 3 : rebase #

Patch Set 4 : new approach - no java code #

Patch Set 5 : add comment describing new option #

Total comments: 8

Patch Set 6 : Update comments, remove commented build target for now #

Patch Set 7 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+45 lines, -32 lines) Patch
M android_webview/apk/java/AndroidManifest.xml View 1 2 3 4 5 6 1 chunk +37 lines, -31 lines 0 comments Download
M build/config/android/rules.gni View 1 2 3 4 5 3 chunks +8 lines, -1 line 0 comments Download

Messages

Total messages: 34 (11 generated)
Torne
Not planning to land this just yet as I'm still working on the Android side ...
3 years, 11 months ago (2017-01-13 14:04:38 UTC) #2
jbudorick
I'm generally ok with this. https://codereview.chromium.org/2634563002/diff/1/build/config/android/rules.gni File build/config/android/rules.gni (left): https://codereview.chromium.org/2634563002/diff/1/build/config/android/rules.gni#oldcode1708 build/config/android/rules.gni:1708: "$target_gen_dir/$target_name.ordered_libararies.json" :O https://codereview.chromium.org/2634563002/diff/1/build/config/android/rules.gni File ...
3 years, 11 months ago (2017-01-13 20:45:48 UTC) #3
Torne
https://codereview.chromium.org/2634563002/diff/1/build/config/android/rules.gni File build/config/android/rules.gni (left): https://codereview.chromium.org/2634563002/diff/1/build/config/android/rules.gni#oldcode1708 build/config/android/rules.gni:1708: "$target_gen_dir/$target_name.ordered_libararies.json" On 2017/01/13 20:45:48, jbudorick wrote: > :O Yeah, ...
3 years, 11 months ago (2017-01-16 12:49:02 UTC) #4
Torne
Ah, one more problem: the locale list in BuildConfig in the stub ends up empty ...
3 years, 11 months ago (2017-01-16 17:58:11 UTC) #5
michaelbai
https://codereview.chromium.org/2634563002/diff/20001/android_webview/apk/java/AndroidManifest.xml File android_webview/apk/java/AndroidManifest.xml (right): https://codereview.chromium.org/2634563002/diff/20001/android_webview/apk/java/AndroidManifest.xml#newcode51 android_webview/apk/java/AndroidManifest.xml:51: android:value="{{ donor_package }}" /> Do you want to have ...
3 years, 11 months ago (2017-01-18 22:59:21 UTC) #6
Torne
https://codereview.chromium.org/2634563002/diff/20001/android_webview/apk/java/AndroidManifest.xml File android_webview/apk/java/AndroidManifest.xml (right): https://codereview.chromium.org/2634563002/diff/20001/android_webview/apk/java/AndroidManifest.xml#newcode51 android_webview/apk/java/AndroidManifest.xml:51: android:value="{{ donor_package }}" /> On 2017/01/18 22:59:21, michaelbai wrote: ...
3 years, 11 months ago (2017-01-19 14:23:12 UTC) #7
Torne
OK, this is going to have to be handled pretty differently. The system doesn't actually ...
3 years, 10 months ago (2017-02-15 15:54:16 UTC) #8
Torne
Updated. This new approach omits all the java code from the stub APK, and therefore ...
3 years, 10 months ago (2017-02-23 16:58:43 UTC) #10
Torne
This currently doesn't include the license activity, which we will need before we actually ship ...
3 years, 10 months ago (2017-02-23 16:59:55 UTC) #11
Torne
John, Michael, will you be able to take a look at this today? I'd like ...
3 years, 9 months ago (2017-02-28 14:57:05 UTC) #12
jbudorick
On 2017/02/28 14:57:05, Torne wrote: > John, Michael, will you be able to take a ...
3 years, 9 months ago (2017-02-28 15:38:53 UTC) #13
Torne
No problem. Also: Michael, I reformatted the manifest xml to make it indented consistently, which ...
3 years, 9 months ago (2017-02-28 15:50:19 UTC) #14
jbudorick
Looks pretty reasonable. https://codereview.chromium.org/2634563002/diff/80001/android_webview/BUILD.gn File android_webview/BUILD.gn (right): https://codereview.chromium.org/2634563002/diff/80001/android_webview/BUILD.gn#newcode31 android_webview/BUILD.gn:31: # TODO(torne): uncomment this once Android ...
3 years, 9 months ago (2017-02-28 16:36:28 UTC) #15
jbudorick
On 2017/02/28 16:36:28, jbudorick wrote: > Looks pretty reasonable. er, actually, lgtm w/ nits > ...
3 years, 9 months ago (2017-02-28 16:36:54 UTC) #16
michaelbai
LGTM, with a question https://codereview.chromium.org/2634563002/diff/80001/android_webview/BUILD.gn File android_webview/BUILD.gn (right): https://codereview.chromium.org/2634563002/diff/80001/android_webview/BUILD.gn#newcode31 android_webview/BUILD.gn:31: # TODO(torne): uncomment this once ...
3 years, 9 months ago (2017-02-28 18:58:40 UTC) #17
Torne
https://codereview.chromium.org/2634563002/diff/80001/android_webview/BUILD.gn File android_webview/BUILD.gn (right): https://codereview.chromium.org/2634563002/diff/80001/android_webview/BUILD.gn#newcode31 android_webview/BUILD.gn:31: # TODO(torne): uncomment this once Android is updated to ...
3 years, 9 months ago (2017-03-01 10:56:29 UTC) #18
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/2634563002/100001
3 years, 9 months ago (2017-03-01 10:58:57 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: ios-device-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device-xcode-clang/builds/47817) mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, ...
3 years, 9 months ago (2017-03-01 11:00:58 UTC) #23
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/2634563002/120001
3 years, 9 months ago (2017-03-01 11:06:33 UTC) #26
commit-bot: I haz the power
Prior attempt to commit was detected, but we were not able to check whether the ...
3 years, 9 months ago (2017-03-01 12:06:02 UTC) #29
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/2634563002/120001
3 years, 9 months ago (2017-03-01 12:36:51 UTC) #31
Torne
Hm, not sure what happened there, but the change did get committed...
3 years, 9 months ago (2017-03-01 12:43:55 UTC) #33
michaelbai
3 years, 9 months ago (2017-03-01 17:15:35 UTC) #34
Message was sent while issue was closed.
https://codereview.chromium.org/2634563002/diff/80001/android_webview/BUILD.gn
File android_webview/BUILD.gn (right):

https://codereview.chromium.org/2634563002/diff/80001/android_webview/BUILD.g...
android_webview/BUILD.gn:31: # TODO(torne): uncomment this once Android is
updated to support loading this
On 2017/03/01 10:56:29, Torne wrote:
> On 2017/02/28 18:58:39, michaelbai wrote:
> > On 2017/02/28 16:36:27, jbudorick wrote:
> > > I think I'd prefer this be omitted until Android is updated w/ such
support.
> > > Until then, there's nothing to prevent this from bitrotting.
> > 
> > Agreed, since there is internal target, once Android is updated, you will
> > upstream internal target to here, and these commented code might already out
> of
> > date.
> 
> No, we won't upstream the internal target - it has a different name and
> definition since it's the google-branded version. But, it's simple enough to
> redefine it when it's useful, so I'll remove it.

Thanks, I actually thought about the same thing, 'to have public version of
internal target'

Powered by Google App Engine
This is Rietveld 408576698