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

Unified Diff: chrome/android/webapk/shell_apk/BUILD.gn

Issue 2956193002: [Android] Enable WebAPK to have multiple intent filters (Closed)
Patch Set: Merge branch 'master' into rewriting Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/android/webapk/shell_apk/BUILD.gn
diff --git a/chrome/android/webapk/shell_apk/BUILD.gn b/chrome/android/webapk/shell_apk/BUILD.gn
index 30520451e6ef8fb66577323f05c47e833425a751..966fe00c05fcbdece97d391b25c41ba63875375f 100644
--- a/chrome/android/webapk/shell_apk/BUILD.gn
+++ b/chrome/android/webapk/shell_apk/BUILD.gn
@@ -6,46 +6,6 @@ import("//build/config/android/rules.gni")
import("manifest_processor.gni")
import("shell_apk_version.gni")
-declare_args() {
- # The browser that the WebAPK will be bound to.
- webapk_runtime_host = "com.google.android.apps.chrome"
-
- # The application name of the browser that the WebAPK will be bound to.
- webapk_runtime_host_application_name = "Chromium"
-
- # The Url of the Web Manifest file.
- webapk_web_manifest_url = "https://pwa.rocks/pwa.webmanifest"
-
- # Murmur2 hash of the homescreen icon. The hash should be of the icon as it is
- # available from the web. The icon bytes should not be transformed (e.g.
- # decoded / encoded) prior to taking the hash.
- webapk_icon_murmur2_hash = "0"
-
- # Attributes from Web Manifest.
- webapk_start_url = "https://pwa.rocks/"
- webapk_scope_url = "https://pwa.rocks/"
- webapk_display_mode = "standalone"
- webapk_orientation = "portrait"
- webapk_theme_color = "2147483648L" # HostBrowserLauncher#MANIFEST_COLOR_INVALID_OR_MISSING
- webapk_background_color = "2147483648L" #HostBrowserLauncher#MANIFEST_COLOR_INVALID_OR_MISSING
- webapk_icon_urls_and_icon_murmur2_hashes = "http://www.pwa.rocks/icon1.png $webapk_icon_murmur2_hash http://www.pwa.rocks/icon2.png $webapk_icon_murmur2_hash"
-
- # Scheme part of |webapk_scope_url|.
- webapk_scope_url_scheme = "https"
-
- # Host part of |webapk_scope_url|.
- webapk_scope_url_host = "pwa.rocks"
-
- # Path part of |webapk_scope_url|.
- webapk_scope_url_path = "/"
-
- # Android version code for the WebAPK.
- webapk_version_code = "1"
-
- # Android version name for the WebAPK.
- webapk_version_name = "1.0"
-}
-
shell_apk_manifest = "$target_gen_dir/shell_apk_manifest/AndroidManifest.xml"
unbound_shell_apk_manifest =
"$target_gen_dir/unbound_shell_apk_manifest/AndroidManifest.xml"
@@ -54,78 +14,27 @@ shell_apk_manifest_javatests =
manifest_processor_template("shell_apk_manifest") {
input = "AndroidManifest.xml"
+ config_file = "bound_manifest_config.json"
output = shell_apk_manifest
- variables = [
- "shell_apk_version=$template_shell_apk_version",
- "manifest_package=org.chromium.webapk",
- "runtime_host=$webapk_runtime_host",
- "runtime_host_application_name=$webapk_runtime_host_application_name",
- "start_url=$webapk_start_url",
- "scope_url=$webapk_scope_url",
- "display_mode=$webapk_display_mode",
- "orientation=$webapk_orientation",
- "theme_color=$webapk_theme_color",
- "background_color=$webapk_background_color",
- "icon_urls_and_icon_murmur2_hashes=$webapk_icon_urls_and_icon_murmur2_hashes",
- "scope_url_scheme=$webapk_scope_url_scheme",
- "scope_url_host=$webapk_scope_url_host",
- "scope_url_path=$webapk_scope_url_path",
- "web_manifest_url=$webapk_web_manifest_url",
- "version_code=$webapk_version_code",
- "version_name=$webapk_version_name",
- ]
+ extra_variables = [ "shell_apk_version=$template_shell_apk_version" ]
}
manifest_processor_template("unbound_shell_apk_manifest") {
input = "AndroidManifest.xml"
+ config_file = "unbound_manifest_config.json"
output = unbound_shell_apk_manifest
- variables = [
- "shell_apk_version=$template_shell_apk_version",
- "manifest_package=org.chromium.arbitrarypackage",
-
- # Intentionally omitted: "runtime_host=org.chromium.chrome",
- "include_label=true",
- "start_url=$webapk_start_url",
- "scope_url=$webapk_scope_url",
- "display_mode=$webapk_display_mode",
- "orientation=$webapk_orientation",
- "theme_color=$webapk_theme_color",
- "background_color=$webapk_background_color",
- "icon_urls_and_icon_murmur2_hashes=$webapk_icon_urls_and_icon_murmur2_hashes",
- "scope_url_scheme=$webapk_scope_url_scheme",
- "scope_url_host=$webapk_scope_url_host",
- "scope_url_path=$webapk_scope_url_path",
- "web_manifest_url=$webapk_web_manifest_url",
- "version_code=$webapk_version_code",
- "version_name=$webapk_version_name",
- ]
+ extra_variables = [ "shell_apk_version=$template_shell_apk_version" ]
}
# Manifest for instrumentation tests. Cannot be customized via GN args.
manifest_processor_template("shell_apk_manifest_javatests") {
input = "AndroidManifest.xml"
+ config_file = "javatest_manifest_config.json"
output = shell_apk_manifest_javatests
- variables = [
- "shell_apk_version=$template_shell_apk_version",
- "manifest_package=org.chromium.webapk.test",
- "runtime_host=org.chromium.chrome",
- "start_url=https://pwa.rocks",
- "scope_url=https://pwa.rocks",
- "display_mode=standalone",
- "orientation=portrait",
- "theme_color=2147483648L", # HostBrowserLauncher#MANIFEST_COLOR_INVALID_OR_MISSING
- "background_color=2147483648L", # HostBrowserLauncher#MANIFEST_COLOR_INVALID_OR_MISSING
- "icon_urls_and_icon_murmur2_hashes=",
- "scope_url_scheme=https",
- "scope_url_host=pwa.rocks",
- "scope_url_path=/",
- "web_manifest_url=https://pwa.rocks/pwa.webmanifest",
- "version_code=1",
- "version_name=1.0",
- ]
+ extra_variables = [ "shell_apk_version=$template_shell_apk_version" ]
}
android_resources("shell_apk_resources") {
@@ -279,6 +188,7 @@ android_library("shell_apk_javatests") {
junit_binary("webapk_shell_apk_junit_tests") {
java_files = [
"junit/src/org/chromium/webapk/shell_apk/HostBrowserClassLoaderTest.java",
+ "junit/src/org/chromium/webapk/shell_apk/MainActivityTest.java",
"junit/src/org/chromium/webapk/shell_apk/WebApkUtilsTest.java",
]
deps = [
« no previous file with comments | « chrome/android/webapk/shell_apk/AndroidManifest.xml ('k') | chrome/android/webapk/shell_apk/bound_manifest_config.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698