Move DidStartLoading, DidStopLoading, DidChangeLoadProgress IPCs to RFHI.
[chromium-blink-merge.git] / content / shell / android / BUILD.gn
blob096ac679656b76d956e4027b2413e5e3c476a944
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//build/config/android/config.gni")
6 import("//build/config/android/rules.gni")
7 import("//build/module_args/v8.gni")
8 import("//third_party/icu/config.gni")
10 generate_jni("content_shell_jni_headers") {
11   jni_package = "content/shell"
12   sources = [
13     "browsertests_apk/src/org/chromium/content_browsertests_apk/ContentBrowserTestsActivity.java",
14     "java/src/org/chromium/content_shell/Shell.java",
15     "java/src/org/chromium/content_shell/ShellLayoutTestUtils.java",
16     "java/src/org/chromium/content_shell/ShellManager.java",
17     "java/src/org/chromium/content_shell/ShellMojoTestUtils.java",
18   ]
21 shared_library("libcontent_shell_content_view") {
22   testonly = true
23   deps = [
24     ":content_shell_jni_headers",
25     "//content/shell:content_shell_lib",
26     "//content/shell:pak",
27     "//components/crash/browser",
28     "//skia",
29     "//media/base/android",
30   ]
31   sources = [
32     "shell_library_loader.cc",
33   ]
36 android_resources("content_shell_java_resources") {
37   testonly = true
38   resource_dirs = [ "java/res" ]
39   custom_package = "org.chromium.content_shell"
42 android_library("content_shell_java") {
43   testonly = true
44   deps = [
45     "//base:base_java",
46     "//content/public/android:content_java",
47     "//media/base/android:media_java",
48     "//net/android:net_java",
49     "//third_party/mojo/src/mojo/public/java:system",
50     "//ui/android:ui_java",
51     ":content_shell_java_resources",
52   ]
53   DEPRECATED_java_in_dir = "java/src"
56 content_shell_manifest =
57     "$target_gen_dir/content_shell_manifest/AndroidManifest.xml"
59 jinja_template("content_shell_manifest") {
60   testonly = true
61   input = "shell_apk/AndroidManifest.xml.jinja2"
62   output = content_shell_manifest
65 android_resources("content_shell_apk_resources") {
66   testonly = true
67   resource_dirs = [ "shell_apk/res" ]
68   deps = [
69     ":content_shell_java_resources",
70   ]
71   android_manifest = content_shell_manifest
74 android_library("content_shell_apk_java") {
75   testonly = true
76   deps = [
77     ":content_shell_apk_resources",
78     ":content_shell_java",
79     "//base:base_java",
80     "//content/public/android:content_java",
81     "//media/base/android:media_java",
82     "//net/android:net_java",
83     "//ui/android:ui_java",
84   ]
85   DEPRECATED_java_in_dir = "shell_apk/src"
88 content_shell_assets_dir = "$root_build_dir/content_shell/assets"
89 copy_ex("copy_content_shell_assets") {
90   clear_dir = true
91   dest = content_shell_assets_dir
92   sources = [
93     "$root_out_dir/content_shell.pak",
94   ]
96   if (icu_use_data_file) {
97     sources += [ "$root_build_dir/icudtl.dat" ]
98   }
99   if (v8_use_external_startup_data) {
100     sources += [
101       "$root_build_dir/natives_blob.bin",
102       "$root_build_dir/snapshot_blob.bin",
103     ]
104   }
107 android_apk("content_shell_apk") {
108   use_chromium_linker = true
109   testonly = true
110   datadeps = [
111     # "//tools/android/forwarder",
112   ]
113   deps = [
114     ":content_shell_apk_resources",
115     ":content_shell_java",
116     ":content_shell_apk_java",
117     ":libcontent_shell_content_view",
118     ":copy_content_shell_assets",
119     "//base:base_java",
120     "//content/public/android:content_java",
121     "//media/base/android:media_java",
122     "//net/android:net_java",
124     #"//third_party/mesa:osmesa_in_lib_dir",
125     "//ui/android:ui_java",
126   ]
127   apk_name = "ContentShell"
128   android_manifest = content_shell_manifest
129   native_libs = [ "libcontent_shell_content_view.so" ]
130   asset_location = content_shell_assets_dir
132   # TODO(GYP)
133   #'extra_native_libs': ['<(SHARED_LIB_DIR)/libosmesa.so'],
136 android_library("content_shell_test_java") {
137   testonly = true
138   deps = [
139     ":content_shell_java",
140     ":content_shell_apk_java",
141     "//base:base_java",
142     "//base:base_java_test_support",
143     "//content/public/test/android:content_java_test_support",
144     "//content/shell/android:content_shell_java",
145     "//content/public/android:content_java",
146   ]
147   DEPRECATED_java_in_dir = "javatests/src"
150 android_apk("content_shell_test_apk") {
151   testonly = true
152   deps = [
153     "//content/public/android:content_javatests",
154     "//base:base_javatests",
155     "//net/android:net_javatests",
156   ]
157   datadeps = [
158     ":content_shell_apk",
159   ]
160   apk_name = "ContentShellTest"
161   android_manifest = "javatests/AndroidManifest.xml"
164 if (current_cpu != "x64" && current_cpu != "arm64") {
165   chromium_linker_test_manifest =
166       "$target_gen_dir/linker_test_apk/AndroidManifest.xml"
168   jinja_template("chromium_linker_test_manifest") {
169     testonly = true
170     input = "linker_test_apk/AndroidManifest.xml.jinja2"
171     output = chromium_linker_test_manifest
172   }
174   android_resources("linker_resources") {
175     resource_dirs = [ "linker_test_apk/res" ]
176     android_manifest = chromium_linker_test_manifest
177   }
179   # GYP: //content/content_tests.gypi:chromium_linker_test_apk
180   android_apk("chromium_linker_test_apk") {
181     testonly = true
182     deps = [
183       ":content_shell_java",
184       ":copy_content_shell_assets",
185       ":linker_resources",
186       ":linker_test",
187       "//base:base_java",
188       "//content/public/android:content_java",
189       "//ui/android:ui_java",
190     ]
191     android_manifest = chromium_linker_test_manifest
192     asset_location = content_shell_assets_dir
193     apk_name = "ChromiumLinkerTest"
194     DEPRECATED_java_in_dir = "linker_test_apk/src"
195     native_libs = [ "liblinker_test.so" ]
196     use_chromium_linker = true
197     enable_chromium_linker_tests = true
198   }
200   # GYP: //content/content_tests.gypi:chromium_android_linker_test
201   shared_library("linker_test") {
202     testonly = true
203     sources = [
204       "linker_test_apk/chromium_linker_test_android.cc",
205       "linker_test_apk/chromium_linker_test_linker_tests.cc",
206     ]
208     deps = [
209       ":linker_test_jni_headers",
210       "//content/shell:content_shell_lib",
212       # Required to include "content/public/browser/android/compositor.h"
213       # in chromium_linker_test_android.cc :-(
214       "//skia",
215     ]
216   }
218   # GYP: //content/content_tests.gypi:chromium_android_linker_test_jni_headers
219   generate_jni("linker_test_jni_headers") {
220     testonly = true
221     jni_package = "content/shell"
222     sources = [
223       "linker_test_apk/src/org/chromium/chromium_linker_test_apk/LinkerTests.java",
224     ]
225   }