Commit 624dde9f authored by Nate Fischer's avatar Nate Fischer Committed by Commit Bot

Android: expose cc/base/switches.cc to Java

No change to logic. This exposes cc/base/switches.cc to Java with
java_cpp_strings.

Fixed: 1114378
Test: autoninja -C out/Default system_webview_apk
Change-Id: Ie0ffebbaff78e2ee657b1518d8cab15c79760478
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2343850Reviewed-by: default avatarBo <boliu@chromium.org>
Reviewed-by: default avatarvmpstr <vmpstr@chromium.org>
Commit-Queue: Nate Fischer <ntfschr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#797834}
parent a5d87d5a
...@@ -667,6 +667,7 @@ android_library("common_java") { ...@@ -667,6 +667,7 @@ android_library("common_java") {
] ]
deps = [ deps = [
"//base:base_java", "//base:base_java",
"//cc/base:cc_base_java",
"//components/metrics:metrics_java", "//components/metrics:metrics_java",
"//gpu/config:config_java", "//gpu/config:config_java",
"//third_party/android_deps:androidx_annotation_annotation_java", "//third_party/android_deps:androidx_annotation_annotation_java",
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
package org.chromium.android_webview.common; package org.chromium.android_webview.common;
import org.chromium.base.BaseSwitches; import org.chromium.base.BaseSwitches;
import org.chromium.cc.base.CcSwitches;
import org.chromium.components.metrics.MetricsSwitches; import org.chromium.components.metrics.MetricsSwitches;
import org.chromium.gpu.config.GpuSwitches; import org.chromium.gpu.config.GpuSwitches;
...@@ -36,7 +37,7 @@ public final class ProductionSupportedFlagList { ...@@ -36,7 +37,7 @@ public final class ProductionSupportedFlagList {
Flag.commandLine(AwSwitches.WEBVIEW_VERBOSE_LOGGING, Flag.commandLine(AwSwitches.WEBVIEW_VERBOSE_LOGGING,
"WebView will log additional debugging information to logcat, such as " "WebView will log additional debugging information to logcat, such as "
+ "variations and commandline state."), + "variations and commandline state."),
Flag.commandLine("show-composited-layer-borders", Flag.commandLine(CcSwitches.SHOW_COMPOSITED_LAYER_BORDERS,
"Renders a border around compositor layers to help debug and study layer " "Renders a border around compositor layers to help debug and study layer "
+ "compositing."), + "compositing."),
Flag.commandLine(AwSwitches.FINCH_SEED_EXPIRATION_AGE, Flag.commandLine(AwSwitches.FINCH_SEED_EXPIRATION_AGE,
......
...@@ -4,6 +4,10 @@ ...@@ -4,6 +4,10 @@
import("//cc/cc.gni") import("//cc/cc.gni")
if (is_android) {
import("//build/config/android/rules.gni")
}
cc_component("base") { cc_component("base") {
output_name = "cc_base" output_name = "cc_base"
sources = [ sources = [
...@@ -59,3 +63,18 @@ cc_component("base") { ...@@ -59,3 +63,18 @@ cc_component("base") {
defines = [ "CC_BASE_IMPLEMENTATION=1" ] defines = [ "CC_BASE_IMPLEMENTATION=1" ]
} }
if (is_android) {
java_cpp_strings("java_switches_srcjar") {
# External code should depend on ":cc_base_java" instead.
visibility = [ ":*" ]
sources = [ "switches.cc" ]
template = "android/java/src/org/chromium/cc/base/CcSwitches.java.tmpl"
}
android_library("cc_base_java") {
# Right now, this only includes the Java switches. But if we need more Java
# files, they should be added here as necessary.
srcjar_deps = [ ":java_switches_srcjar" ]
}
}
// Copyright 2020 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.
package org.chromium.cc.base;
/**
* Contains all of the command line switches that are specific to the cc/ layer.
*/
public final class CcSwitches {{
{NATIVE_STRINGS}
// Prevent instantiation.
private CcSwitches() {{}}
}}
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