| 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 browser that the WebAPK will be bound to. | 12 # The browser that the WebAPK will be bound to. |
| 13 webapk_runtime_host = "com.google.android.apps.chrome" | 13 webapk_runtime_host = "com.google.android.apps.chrome" |
| 14 | 14 |
| 15 # The Url of the Web Manifest file. | 15 # The Url of the Web Manifest file. |
| 16 webapk_web_manifest_url = "https://www.template.com/manifest.json" | 16 webapk_web_manifest_url = "https://www.template.com/manifest.json" |
| 17 | 17 |
| 18 # Attributes from Web Manifest. | 18 # Attributes from Web Manifest. |
| 19 webapk_start_url = "https://www.template.com/home_page" | 19 webapk_start_url = "https://www.template.com/home_page" |
| 20 webapk_name = "Longer Sample WebAPK Name" | 20 webapk_name = "Longer Sample WebAPK Name" |
| 21 webapk_short_name = "Sample WebAPK" | 21 webapk_short_name = "Sample WebAPK" |
| 22 webapk_scope_url = "https://www.template.com" | 22 webapk_scope_url = "https://www.template.com/" |
| 23 webapk_display_mode = "standalone" | 23 webapk_display_mode = "standalone" |
| 24 webapk_orientation = "portrait" | 24 webapk_orientation = "portrait" |
| 25 webapk_theme_color = "2147483648L" # HostBrowserLauncher#MANIFEST_COLOR_INVAL
ID_OR_MISSING | 25 webapk_theme_color = "2147483648L" # HostBrowserLauncher#MANIFEST_COLOR_INVAL
ID_OR_MISSING |
| 26 webapk_background_color = "2147483648L" #HostBrowserLauncher#MANIFEST_COLOR_I
NVALID_OR_MISSING | 26 webapk_background_color = "2147483648L" #HostBrowserLauncher#MANIFEST_COLOR_I
NVALID_OR_MISSING |
| 27 | 27 |
| 28 # The URL of the app icon. Empty if the app icon is generated. | 28 # The URL of the app icon. Empty if the app icon is generated. |
| 29 webapk_icon_url = "http://www.template.com/icon.png" | 29 webapk_icon_url = "http://www.template.com/icon.png" |
| 30 | 30 |
| 31 # Murmur2 hash of the homescreen icon. The hash should be of the icon as it is | 31 # Murmur2 hash of the homescreen icon. The hash should be of the icon as it is |
| 32 # available from the web. The icon bytes should not be transformed (e.g. | 32 # available from the web. The icon bytes should not be transformed (e.g. |
| 33 # decoded / encoded) prior to taking the hash. | 33 # decoded / encoded) prior to taking the hash. |
| 34 webapk_icon_murmur2_hash = "0L" | 34 webapk_icon_murmur2_hash = "0L" |
| 35 | 35 |
| 36 # Host part of |webapk_scope_url|. | 36 # Host part of |webapk_scope_url|. |
| 37 webapk_scope_url_host = "www.template.com" | 37 webapk_scope_url_host = "www.template.com" |
| 38 | 38 |
| 39 # Path part of |webapk_scope_url|. |
| 40 webapk_scope_url_path = "/" |
| 41 |
| 39 # Android version code for the WebAPK. | 42 # Android version code for the WebAPK. |
| 40 webapk_version_code = "1" | 43 webapk_version_code = "1" |
| 41 | 44 |
| 42 # Android version name for the WebAPK. | 45 # Android version name for the WebAPK. |
| 43 webapk_version_name = "1.0" | 46 webapk_version_name = "1.0" |
| 44 } | 47 } |
| 45 | 48 |
| 46 shell_apk_manifest_package = | 49 shell_apk_manifest_package = |
| 47 "org.chromium.webapk.$webapk_manifest_package_origin" | 50 "org.chromium.webapk.$webapk_manifest_package_origin" |
| 48 | 51 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 59 "name=$webapk_name", | 62 "name=$webapk_name", |
| 60 "short_name=$webapk_short_name", | 63 "short_name=$webapk_short_name", |
| 61 "scope_url=$webapk_scope_url", | 64 "scope_url=$webapk_scope_url", |
| 62 "display_mode=$webapk_display_mode", | 65 "display_mode=$webapk_display_mode", |
| 63 "orientation=$webapk_orientation", | 66 "orientation=$webapk_orientation", |
| 64 "theme_color=$webapk_theme_color", | 67 "theme_color=$webapk_theme_color", |
| 65 "background_color=$webapk_background_color", | 68 "background_color=$webapk_background_color", |
| 66 "icon_url=$webapk_icon_url", | 69 "icon_url=$webapk_icon_url", |
| 67 "icon_murmur2_hash=$webapk_icon_murmur2_hash", | 70 "icon_murmur2_hash=$webapk_icon_murmur2_hash", |
| 68 "scope_url_host=$webapk_scope_url_host", | 71 "scope_url_host=$webapk_scope_url_host", |
| 72 "scope_url_path=$webapk_scope_url_path", |
| 69 "web_manifest_url=$webapk_web_manifest_url", | 73 "web_manifest_url=$webapk_web_manifest_url", |
| 70 "version_code=$webapk_version_code", | 74 "version_code=$webapk_version_code", |
| 71 "version_name=$webapk_version_name", | 75 "version_name=$webapk_version_name", |
| 72 ] | 76 ] |
| 73 } | 77 } |
| 74 | 78 |
| 75 android_resources("shell_apk_resources") { | 79 android_resources("shell_apk_resources") { |
| 76 resource_dirs = [ "res" ] | 80 resource_dirs = [ "res" ] |
| 77 custom_package = "org.chromium.webapk.shell_apk" | 81 custom_package = "org.chromium.webapk.shell_apk" |
| 78 } | 82 } |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 junit_binary("webapk_shell_apk_junit_tests") { | 137 junit_binary("webapk_shell_apk_junit_tests") { |
| 134 java_files = [ | 138 java_files = [ |
| 135 "junit/src/org/chromium/webapk/shell_apk/HostBrowserClassLoaderTest.java", | 139 "junit/src/org/chromium/webapk/shell_apk/HostBrowserClassLoaderTest.java", |
| 136 "junit/src/org/chromium/webapk/shell_apk/MainActivityTest.java", | 140 "junit/src/org/chromium/webapk/shell_apk/MainActivityTest.java", |
| 137 ] | 141 ] |
| 138 deps = [ | 142 deps = [ |
| 139 ":webapk_java", | 143 ":webapk_java", |
| 140 "//chrome/android/webapk/libs/common:common_java", | 144 "//chrome/android/webapk/libs/common:common_java", |
| 141 ] | 145 ] |
| 142 } | 146 } |
| OLD | NEW |