Commit 362070db authored by Robbie McElrath's avatar Robbie McElrath Committed by Commit Bot

Don't include JNI headers in chrome android when they're not used.

This CL removes dependencies on JNI headers when they're not used and
the Java implementation isn't included. This makes chrome_public_apk
work with crrev.com/c/1743088.

Bug: 836335
Change-Id: Iec02f4fec9cf93183949547960e191e675e62ebf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1746641
Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Reviewed-by: default avatarChangwan Ryu <changwan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#694921}
parent c626a327
......@@ -392,6 +392,7 @@ source_set("webview_entry_point") {
shared_library("libwebviewchromium") {
deps = [
":webview_entry_point",
"//components/about_ui:about_ui_android",
]
configs -= [ "//build/config/android:hide_all_but_jni_onload" ]
configs += [ "//build/config/android:hide_all_but_jni" ]
......
......@@ -542,13 +542,17 @@ java_group("chrome_all_java") {
group("jni_headers") {
public_deps = [
":chrome_jni_headers",
"//chrome/android/features/autofill_assistant:jni_headers",
"//chrome/android/features/keyboard_accessory:jni_headers",
"//chrome/android/features/media_router:jni_headers",
"//chrome/android/public/profiles:jni_headers",
"//chrome/lib/image_fetcher/public/android:jni_headers",
"//chrome/lib/util/public/android:jni_headers",
]
if (disable_autofill_assistant_dfm) {
public_deps +=
[ "//chrome/android/features/autofill_assistant:jni_headers" ]
}
}
android_library("bundle_canary_java") {
......@@ -1452,6 +1456,7 @@ template("libmonochrome_apk_or_bundle_tmpl") {
]
deps = [
"//android_webview:common",
"//components/about_ui:about_ui_android",
"//components/crash/android:crashpad_main",
]
......@@ -2459,7 +2464,6 @@ generate_jni("chrome_jni_headers") {
"java/src/org/chromium/chrome/browser/complex_tasks/endpoint_fetcher/EndpointFetcher.java",
"java/src/org/chromium/chrome/browser/complex_tasks/endpoint_fetcher/EndpointResponse.java",
"java/src/org/chromium/chrome/browser/component_updater/UpdateScheduler.java",
"java/src/org/chromium/chrome/browser/component_updater/VrAssetsComponentInstaller.java",
"java/src/org/chromium/chrome/browser/compositor/CompositorView.java",
"java/src/org/chromium/chrome/browser/compositor/LayerTitleCache.java",
"java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelContent.java",
......@@ -2726,4 +2730,8 @@ generate_jni("chrome_jni_headers") {
"feed/core/java/src/org/chromium/chrome/browser/feed/FeedSchedulerBridge.java",
]
}
if (enable_vr) {
sources += [ "java/src/org/chromium/chrome/browser/component_updater/VrAssetsComponentInstaller.java" ]
}
}
......@@ -13,8 +13,17 @@ static_library("about_ui") {
"//ui/base",
"//ui/resources",
]
}
if (is_android) {
deps += [ "//components/about_ui/android:about_ui_jni_headers" ]
if (is_android) {
static_library("about_ui_android") {
sources = [
"credit_utils_android.cc",
]
deps = [
":about_ui",
"//base",
"//components/about_ui/android:about_ui_jni_headers",
]
}
}
......@@ -10,11 +10,6 @@
#include "components/grit/components_resources.h"
#include "ui/base/resource/resource_bundle.h"
#if defined(OS_ANDROID)
#include "base/files/file.h"
#include "components/about_ui/android/about_ui_jni_headers/CreditUtils_jni.h"
#endif
namespace about_ui {
std::string GetCredits(bool include_scripts) {
......@@ -30,12 +25,4 @@ std::string GetCredits(bool include_scripts) {
return response;
}
#if defined(OS_ANDROID)
static void JNI_CreditUtils_WriteCreditsHtml(JNIEnv* env, jint fd) {
std::string html_content = GetCredits(false);
base::File out_file(fd);
out_file.WriteAtCurrentPos(html_content.c_str(), html_content.size());
}
#endif
} // namespace about_ui
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/about_ui/credit_utils.h"
#include "base/files/file.h"
#include "components/about_ui/android/about_ui_jni_headers/CreditUtils_jni.h"
namespace about_ui {
static void JNI_CreditUtils_WriteCreditsHtml(JNIEnv* env, jint fd) {
std::string html_content = GetCredits(false);
base::File out_file(fd);
out_file.WriteAtCurrentPos(html_content.c_str(), html_content.size());
}
} // namespace about_ui
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment