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" |
(...skipping 10 matching lines...) Expand all Loading... |
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 |
| 32 # available from the web. The icon bytes should not be transformed (e.g. |
| 33 # decoding / encoding) prior to taking the hash. |
| 34 webapk_icon_murmur2_hash = "0L" |
| 35 |
31 # Host part of |webapk_scope_url|. | 36 # Host part of |webapk_scope_url|. |
32 webapk_scope_url_host = "www.template.com" | 37 webapk_scope_url_host = "www.template.com" |
33 } | 38 } |
34 | 39 |
35 shell_apk_manifest_package = | 40 shell_apk_manifest_package = |
36 "org.chromium.webapk.$webapk_manifest_package_origin" | 41 "org.chromium.webapk.$webapk_manifest_package_origin" |
37 | 42 |
38 shell_apk_manifest = "$target_gen_dir/shell_apk_manifest/AndroidManifest.xml" | 43 shell_apk_manifest = "$target_gen_dir/shell_apk_manifest/AndroidManifest.xml" |
39 | 44 |
40 jinja_template("shell_apk_manifest") { | 45 jinja_template("shell_apk_manifest") { |
41 input = "AndroidManifest.xml" | 46 input = "AndroidManifest.xml" |
42 output = shell_apk_manifest | 47 output = shell_apk_manifest |
43 | 48 |
44 variables = [ | 49 variables = [ |
45 "manifest_package=$shell_apk_manifest_package", | 50 "manifest_package=$shell_apk_manifest_package", |
46 "runtime_host=$webapk_runtime_host", | 51 "runtime_host=$webapk_runtime_host", |
47 "start_url=$webapk_start_url", | 52 "start_url=$webapk_start_url", |
48 "name=$webapk_name", | 53 "name=$webapk_name", |
49 "short_name=$webapk_short_name", | 54 "short_name=$webapk_short_name", |
50 "scope_url=$webapk_scope_url", | 55 "scope_url=$webapk_scope_url", |
51 "display_mode=$webapk_display_mode", | 56 "display_mode=$webapk_display_mode", |
52 "orientation=$webapk_orientation", | 57 "orientation=$webapk_orientation", |
53 "theme_color=$webapk_theme_color", | 58 "theme_color=$webapk_theme_color", |
54 "background_color=$webapk_background_color", | 59 "background_color=$webapk_background_color", |
55 "icon_url=$webapk_icon_url", | 60 "icon_url=$webapk_icon_url", |
| 61 "icon_murmur2_hash=$webapk_icon_murmur2_hash", |
56 "scope_url_host=$webapk_scope_url_host", | 62 "scope_url_host=$webapk_scope_url_host", |
57 "web_manifest_url=$webapk_web_manifest_url", | 63 "web_manifest_url=$webapk_web_manifest_url", |
58 ] | 64 ] |
59 } | 65 } |
60 | 66 |
61 android_resources("shell_apk_resources") { | 67 android_resources("shell_apk_resources") { |
62 resource_dirs = [ "res" ] | 68 resource_dirs = [ "res" ] |
63 custom_package = "org.chromium.webapk.shell_apk" | 69 custom_package = "org.chromium.webapk.shell_apk" |
64 } | 70 } |
65 | 71 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 } | 122 } |
117 | 123 |
118 junit_binary("webapk_shell_apk_junit_tests") { | 124 junit_binary("webapk_shell_apk_junit_tests") { |
119 java_files = [ "junit/src/org/chromium/webapk/shell_apk/HostBrowserClassLoader
Test.java" ] | 125 java_files = [ "junit/src/org/chromium/webapk/shell_apk/HostBrowserClassLoader
Test.java" ] |
120 deps = [ | 126 deps = [ |
121 ":webapk_java", | 127 ":webapk_java", |
122 "//base:base_junit_test_support", | 128 "//base:base_junit_test_support", |
123 "//chrome/android/webapk/libs/common:common_java", | 129 "//chrome/android/webapk/libs/common:common_java", |
124 ] | 130 ] |
125 } | 131 } |
OLD | NEW |