• Piotr Bialecki's avatar
    Reland "Reland "Move away from using DFM to distribute AR-related code"" · e6f97cc5
    Piotr Bialecki authored
    This is a reland of 3e21b750
    
    Additional fix needed for a reland:
    This change prevents the inclusion of ARCore-related entries to the
    manifest when enable_arcore is false (for example for x86 builds).
    
    Changes:
    - include_arcore_manifest should be equal to enable_arcore on targets
      that have ARCore support (monochrome, trichrome, but *not*
      chrome_modern, chrome)
    - trichrome.gni entry should not be needed since the variables for both
      monochrome and trichrome are set in
      monochrome_public_apk_or_module_tmpl
    
    Validated with chrome APK, chrome_modern bundle, monochrome bundle and
    trichrome_chrome bundle, both for arm and x86.
    
    This change *must* land at the same time as https://crrev.com/i/2428538,
    otherwise the push to Play Store will fail.
    
    Original change's description:
    > Reland "Move away from using DFM to distribute AR-related code"
    >
    > This is a reland of cd842897
    >
    > Original CL caused Chrome Canary to be rejected from Play Store.
    > Play Store validates whether ARCore SDK's manifest entries are present
    > only for applications that contain entry about ARCore being either
    > required or optional.
    >
    > Additional changes needed for reland:
    > - ArCoreShimImpl.java should not be included in java_sources - it will
    >   be brought in by ar_java target on supported configurations since
    >   it depends on ARCore SDK which is included only for specific targets
    > - relaxed the change in arcore_consent_prompt.cc - the original change
    >   would cause builds that are not supporting ARCore (by design) to
    >   crash
    >
    > Original change's description:
    > > Move away from using DFM to distribute AR-related code
    > >
    > > This change will make Chrome for Android stop using DFM to ship the
    > > ARCore SDK. This is done to enable us to provide AR experiences for
    > > apps using WebView. The changes are introduced in a way to enable us to
    > > switch back to using AR DFM if need be.
    > >
    > > Changes summary:
    > > - chrome_java target (defined in chrome/android/BUILD.gn) now also
    > >   compiles ArCoreShimImpl.java (see java_sources.gni) - this means that
    > >   java parts from ARCore SDK have to be added to its deps
    > > - libarcore_sdk_c.so needs to be listed in loadable modules - this is
    > >   done in monochrome_public_common_apk_or_module_tmpl (only if target
    > >   is a base module when ARCore is enabled)
    > > - AndroidManifest.xml no longer needs to contain the min_apk_version
    > >   and InstallActivity entries explicitly - they will be brought in
    > >   auto-magically by the build system and were needed only because
    > >   manifest merging did not work for DFMs
    > > - ArCoreInstallUtils (java) should never report that we can request
    > >   installation of AR DFM
    > > - ArCoreConsentPrompt (native) should never think it needs to request
    > >   installation of AR DFM
    > > - Added a DCHECK and graceful handling of null jstring for java_path
    > >   (path to ARCore SDK .so) - it can be null if loadable_modules do not
    > >   contain correct entry - with the DCHECK, debug builds will still
    > >   crash but the release builds should just report that the WebXR
    > >   specified session configuration (session mode == "immersive-ar") is
    > >   not supported
    > >
    > > Binary-Size: Tracked in crbug/1040289
    > > Bug: 1031623, 1040289
    > > Change-Id: Ia2f305d1685f1c7207cc187d253f59a6331c36fc
    > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1988834
    > > Commit-Queue: Andrew Grieve <agrieve@chromium.org>
    > > Reviewed-by: Andrew Grieve <agrieve@chromium.org>
    > > Reviewed-by: Alexander Cooper <alcooper@chromium.org>
    > > Auto-Submit: Piotr Bialecki <bialpio@chromium.org>
    > > Cr-Commit-Position: refs/heads/master@{#729818}
    >
    > Binary-Size: Tracked in crbug/1040289
    > Bug: 1031623, 1040289
    > Change-Id: I87eac0bc3748973e22190c6dba1187e822f83082
    > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1995769
    > Reviewed-by: Ted Choc <tedchoc@chromium.org>
    > Reviewed-by: Alexander Cooper <alcooper@chromium.org>
    > Commit-Queue: Piotr Bialecki <bialpio@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#731011}
    
    Binary-Size: Tracked in crbug/1040289
    Bug: 1031623, 1040289
    Change-Id: I90d7f6554026bf41c248a8d06f38963534efee28
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2003765Reviewed-by: default avatarAlexander Cooper <alcooper@chromium.org>
    Reviewed-by: default avatarTed Choc <tedchoc@chromium.org>
    Commit-Queue: Piotr Bialecki <bialpio@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#733413}
    e6f97cc5
BUILD.gn 128 KB