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/module_args/v8.gni")
6 import("//mojo/public/mojo_application.gni")
7 import("//testing/test.gni")
8 import("//tools/grit/grit_rule.gni")
9 import("//tools/grit/repack.gni")
12 import("//build/config/android/internal_rules.gni")
13 import("//mojo/generate_mojo_shell_assets_list.gni")
16 grit("html_viewer_resources_grit") {
17 source = "html_viewer_resources.grd"
19 "grit/html_viewer_resources.h",
20 "html_viewer_resources.pak",
24 copy("copy_html_viewer_resources") {
26 "$target_gen_dir/html_viewer_resources.pak",
29 "$root_out_dir/html_viewer_resources.pak",
33 ":html_viewer_resources_grit",
39 "$root_gen_dir/blink/public/resources/blink_image_resources_100_percent.pak",
40 "$root_gen_dir/blink/public/resources/blink_resources.pak",
41 "$root_gen_dir/components/html_viewer/html_viewer_resources.pak",
42 "$root_gen_dir/ui/resources/ui_resources_100_percent.pak",
43 "$root_gen_dir/ui/strings/app_locale_settings_en-US.pak",
44 "$root_gen_dir/ui/strings/ui_strings_en-US.pak",
46 output = "$root_out_dir/html_viewer.pak"
48 ":copy_html_viewer_resources",
49 "//third_party/WebKit/public:image_resources",
50 "//third_party/WebKit/public:resources",
58 "ax_provider_impl.cc",
60 "blink_basic_type_converters.cc",
61 "blink_basic_type_converters.h",
62 "blink_input_events_type_converters.cc",
63 "blink_input_events_type_converters.h",
64 "blink_platform_impl.cc",
65 "blink_platform_impl.h",
66 "blink_resource_constants.h",
67 "blink_text_input_type_converters.cc",
68 "blink_text_input_type_converters.h",
69 "blink_url_request_type_converters.cc",
70 "blink_url_request_type_converters.h",
71 "content_handler_impl.cc",
72 "content_handler_impl.h",
73 "devtools_agent_impl.cc",
74 "devtools_agent_impl.h",
75 "discardable_memory_allocator.cc",
76 "discardable_memory_allocator.h",
77 "document_resource_waiter.cc",
78 "document_resource_waiter.h",
79 "geolocation_client_impl.cc",
80 "geolocation_client_impl.h",
83 "html_document_application_delegate.cc",
84 "html_document_application_delegate.h",
85 "html_document_oopif.cc",
86 "html_document_oopif.h",
90 "html_frame_delegate.h",
91 "html_frame_properties.cc",
92 "html_frame_properties.h",
93 "html_frame_tree_manager.cc",
94 "html_frame_tree_manager.h",
97 "html_viewer_switches.cc",
98 "html_viewer_switches.h",
103 "mock_web_blob_registry_impl.cc",
104 "mock_web_blob_registry_impl.h",
105 "replicated_frame_state.cc",
106 "replicated_frame_state.h",
107 "stats_collection_controller.cc",
108 "stats_collection_controller.h",
109 "test_html_viewer_impl.cc",
110 "test_html_viewer_impl.h",
113 "web_clipboard_impl.cc",
114 "web_clipboard_impl.h",
115 "web_cookie_jar_impl.cc",
116 "web_cookie_jar_impl.h",
119 "web_layer_tree_view_impl.cc",
120 "web_layer_tree_view_impl.h",
121 "web_mime_registry_impl.cc",
122 "web_mime_registry_impl.h",
123 "web_notification_manager_impl.cc",
124 "web_notification_manager_impl.h",
125 "web_socket_handle_impl.cc",
126 "web_socket_handle_impl.h",
127 "web_storage_namespace_impl.cc",
128 "web_storage_namespace_impl.h",
129 "web_theme_engine_impl.cc",
130 "web_theme_engine_impl.h",
131 "web_url_loader_impl.cc",
132 "web_url_loader_impl.h",
135 include_dirs = [ "third_party/WebKit" ]
140 "//base/third_party/dynamic_annotations",
144 "//components/clipboard/public/interfaces",
145 "//components/devtools_service/public/interfaces",
146 "//components/html_viewer/public/interfaces",
147 "//components/message_port",
148 "//components/mime_util",
149 "//components/resource_provider/public/cpp",
150 "//components/resource_provider/public/interfaces",
151 "//components/scheduler:scheduler",
152 "//components/startup_metric_utils",
153 "//components/view_manager/gles2:lib",
154 "//components/view_manager/public/interfaces",
155 "//components/webcrypto",
157 "//mandoline/tab/public/interfaces",
161 "//mojo/application/public/cpp",
162 "//mojo/application/public/interfaces",
165 "//mojo/converters/surfaces",
166 "//mojo/message_pump",
167 "//mojo/platform_handle",
168 "//mojo/services/network/public/cpp",
169 "//mojo/services/network/public/interfaces",
170 "//mojo/services/tracing/public/cpp",
171 "//mojo/services/tracing/public/interfaces",
174 "//third_party/mojo_services/src/accessibility/public/interfaces",
175 "//third_party/WebKit/public:image_resources",
176 "//third_party/WebKit/public:resources",
178 "//ui/mojo/events:interfaces",
180 "//ui/events:gesture_detection",
182 "//ui/events/gestures/blink",
185 "//ui/mojo/geometry:interfaces_cpp_sources",
186 "//ui/mojo/ime:interfaces_cpp_sources",
193 "//components/view_manager/public/cpp",
194 "//third_party/WebKit/public:blink",
195 "//third_party/mojo/src/mojo/public/cpp/bindings",
199 sources += [ "html_viewer_version.rc" ]
202 if (is_linux && !is_android) {
203 deps += [ "//components/font_service/public/cpp" ]
207 "//components/clipboard",
208 "//components/view_manager",
209 "//mojo/services/network:network",
210 "//mojo/services/tracing",
214 mojo_native_application("html_viewer") {
216 "html_viewer_main.cc",
221 "//mojo/application/public/cpp:sources",
222 "//third_party/mojo/src/mojo/public/c/system:for_shared_library",
224 resources = [ "$root_out_dir/html_viewer.pak" ]
226 if (v8_use_external_startup_data) {
228 "$root_build_dir/natives_blob.bin",
229 "$root_build_dir/snapshot_blob.bin",
235 mojo_native_application("layout_test_html_viewer") {
238 "layout_test_content_handler_impl.cc",
239 "layout_test_content_handler_impl.h",
240 "layout_test_html_viewer.cc",
241 "layout_test_html_viewer.h",
242 "layout_test_html_viewer_main.cc",
243 "web_test_delegate_impl.cc",
244 "web_test_delegate_impl.h",
250 "//components/test_runner",
251 "//mojo/application/public/cpp:sources",
252 "//third_party/WebKit/public:blink",
253 "//third_party/WebKit/public:test_support",
254 "//third_party/mojo/src/mojo/public/c/system:for_shared_library",
258 resources = [ "$root_out_dir/html_viewer.pak" ]
260 if (v8_use_external_startup_data) {
262 "$root_build_dir/natives_blob.bin",
263 "$root_build_dir/snapshot_blob.bin",
270 html_viewer_unittests_assets = "$root_build_dir/html_viewer_unittests_assets"
272 copy_ex("copy_unittest_assets") {
277 "//third_party/icu:icudata",
279 dest = html_viewer_unittests_assets
281 "$root_build_dir/html_viewer.pak",
282 "$root_build_dir/icudtl.dat",
283 "$root_build_dir/natives_blob.bin",
284 "$root_build_dir/snapshot_blob.bin",
288 generate_mojo_shell_assets_list("build_unittest_assets") {
290 ":copy_unittest_assets",
292 dir = html_viewer_unittests_assets
296 test("html_viewer_unittests") {
298 "ax_provider_impl_unittest.cc",
299 "discardable_memory_allocator_unittest.cc",
300 "run_all_unittests.cc",
305 "//base/test:test_support",
306 "//components/scheduler",
308 "//testing/gtest:gtest",
309 "//third_party/mojo/src/mojo/edk/system",
315 deps += [ ":build_unittest_assets" ]
316 apk_asset_location = html_viewer_unittests_assets
320 mojo_native_application("apptests") {
321 output_name = "html_viewer_apptests"
325 "ax_provider_apptest.cc",
326 "html_frame_apptest.cc",
331 "//components/html_viewer/public/interfaces",
332 "//components/scheduler",
333 "//components/view_manager/public/cpp",
334 "//components/view_manager/public/cpp/tests:test_support",
335 "//mandoline/tab:lib",
336 "//mandoline/tab:test_support",
337 "//mandoline/tab/public/interfaces",
338 "//mojo/application/public/cpp:sources",
339 "//mojo/application/public/cpp:test_support",
340 "//net:test_support",
342 "//third_party/mojo_services/src/accessibility/public/interfaces",
343 "//third_party/mojo/src/mojo/public/c/system:for_shared_library",
348 "//components/view_manager",
351 if (is_linux && !is_android) {
352 data_deps += [ "//components/font_service" ]