Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import("//build/config/android/rules.gni") | 5 import("//build/config/android/rules.gni") |
| 6 | 6 |
| 7 declare_args() { | 7 declare_args() { |
| 8 # The origin URL of the WebAPK. Used to generate a unique package name for | 8 # The origin URL of the WebAPK. Used to generate a unique package name for |
| 9 # WebAPK. Example: "foo.com" | 9 # WebAPK. Example: "foo.com" |
| 10 webapk_manifest_package_origin = "template" | 10 webapk_manifest_package_origin = "template" |
| 11 | 11 |
| 12 # The URL that the WebAPK should navigate to when it is launched. | |
| 13 webapk_start_url = "https://www.template.com/home_page" | |
| 14 | |
| 15 # The browser that the WebAPK will be bound to. | 12 # The browser that the WebAPK will be bound to. |
| 16 webapk_runtime_host = "com.google.android.apps.chrome" | 13 webapk_runtime_host = "com.google.android.apps.chrome" |
| 17 | 14 |
| 18 # The scope of the urls that the WebAPK can navigate to. | 15 # Attributes from Web Manifest. |
| 16 webapk_start_url = "https://www.template.com/home_page" | |
| 17 webapk_name = "Longer Sample WebAPK Name" | |
| 18 webapk_short_name = "Sample WebAPK" | |
| 19 webapk_scope_url = "https://www.template.com" | 19 webapk_scope_url = "https://www.template.com" |
| 20 webapk_display_mode = "standalone" | |
| 21 webapk_orientation = "landscape" | |
|
dominickn
2016/06/28 05:26:56
Nit: perhaps use "portrait" instead (more common
pkotwicz
2016/06/28 17:56:22
Ok changed to portrait.
The defaults are for test
| |
| 22 webapk_theme_color = "4288230399L" #0xFF9933FF | |
| 23 webapk_background_color = "4291624959L" #0xFFCCFFFF | |
| 20 | 24 |
| 21 # Host part of |webapk_scope|. | 25 # The URL of the app icon. Empty if the app icon is generated. |
| 26 webapk_icon_url = "http://www.template.com/icon.png" | |
| 27 | |
| 28 # Host part of |webapk_scope_url|. | |
| 22 webapk_scope_url_host = "www.template.com" | 29 webapk_scope_url_host = "www.template.com" |
| 23 } | 30 } |
| 24 | 31 |
| 25 shell_apk_manifest_package = | 32 shell_apk_manifest_package = |
| 26 "org.chromium.webapk.$webapk_manifest_package_origin" | 33 "org.chromium.webapk.$webapk_manifest_package_origin" |
| 27 | 34 |
| 28 shell_apk_manifest = "$target_gen_dir/shell_apk_manifest/AndroidManifest.xml" | 35 shell_apk_manifest = "$target_gen_dir/shell_apk_manifest/AndroidManifest.xml" |
| 29 | 36 |
| 30 jinja_template("shell_apk_manifest") { | 37 jinja_template("shell_apk_manifest") { |
| 31 input = "AndroidManifest.xml" | 38 input = "AndroidManifest.xml" |
| 32 output = shell_apk_manifest | 39 output = shell_apk_manifest |
| 33 | 40 |
| 34 variables = [ | 41 variables = [ |
| 35 "manifest_package=$shell_apk_manifest_package", | 42 "manifest_package=$shell_apk_manifest_package", |
| 36 "host_url=$webapk_start_url", | |
| 37 "runtime_host=$webapk_runtime_host", | 43 "runtime_host=$webapk_runtime_host", |
| 44 "start_url=$webapk_start_url", | |
| 45 "name=$webapk_name", | |
| 46 "short_name=$webapk_short_name", | |
| 38 "scope_url=$webapk_scope_url", | 47 "scope_url=$webapk_scope_url", |
| 48 "display_mode=$webapk_display_mode", | |
| 49 "orientation=$webapk_orientation", | |
| 50 "theme_color=$webapk_theme_color", | |
| 51 "background_color=$webapk_background_color", | |
| 52 "icon_url=$webapk_icon_url", | |
| 39 "scope_url_host=$webapk_scope_url_host", | 53 "scope_url_host=$webapk_scope_url_host", |
| 40 ] | 54 ] |
| 41 } | 55 } |
| 42 | 56 |
| 43 android_resources("shell_apk_resources") { | 57 android_resources("shell_apk_resources") { |
| 44 resource_dirs = [ "res" ] | 58 resource_dirs = [ "res" ] |
| 45 custom_package = "org.chromium.webapk.shell_apk" | 59 custom_package = "org.chromium.webapk.shell_apk" |
| 46 } | 60 } |
| 47 | 61 |
| 48 android_library("dex_loader_java") { | 62 android_library("dex_loader_java") { |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 78 [ "javatests/src/org/chromium/webapk/shell_apk/DexLoaderTest.java" ] | 92 [ "javatests/src/org/chromium/webapk/shell_apk/DexLoaderTest.java" ] |
| 79 deps = [ | 93 deps = [ |
| 80 ":dex_loader_java", | 94 ":dex_loader_java", |
| 81 "//base:base_java", | 95 "//base:base_java", |
| 82 "//base:base_java_test_support", | 96 "//base:base_java_test_support", |
| 83 "//chrome/android/webapk/libs/common:common_java", | 97 "//chrome/android/webapk/libs/common:common_java", |
| 84 "//content/public/test/android:content_java_test_support", | 98 "//content/public/test/android:content_java_test_support", |
| 85 ] | 99 ] |
| 86 srcjar_deps = [ "javatests/dex_optimizer:dex_optimizer_service_aidl" ] | 100 srcjar_deps = [ "javatests/dex_optimizer:dex_optimizer_service_aidl" ] |
| 87 } | 101 } |
| OLD | NEW |