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",
21 "html_viewer_resources.rc",
25 copy("copy_html_viewer_resources") {
27 "$target_gen_dir/html_viewer_resources.pak",
30 "$root_out_dir/html_viewer_resources.pak",
34 ":html_viewer_resources_grit",
40 "$root_gen_dir/blink/public/resources/blink_image_resources_100_percent.pak",
41 "$root_gen_dir/blink/public/resources/blink_resources.pak",
42 "$root_gen_dir/components/html_viewer/html_viewer_resources.pak",
43 "$root_gen_dir/ui/resources/ui_resources_100_percent.pak",
44 "$root_gen_dir/ui/strings/app_locale_settings_en-US.pak",
45 "$root_gen_dir/ui/strings/ui_strings_en-US.pak",
47 output = "$root_out_dir/html_viewer.pak"
49 ":copy_html_viewer_resources",
50 "//third_party/WebKit/public:image_resources",
51 "//third_party/WebKit/public:resources",
59 "ax_provider_impl.cc",
61 "blink_basic_type_converters.cc",
62 "blink_basic_type_converters.h",
63 "blink_input_events_type_converters.cc",
64 "blink_input_events_type_converters.h",
65 "blink_platform_impl.cc",
66 "blink_platform_impl.h",
67 "blink_resource_constants.h",
68 "blink_url_request_type_converters.cc",
69 "blink_url_request_type_converters.h",
70 "content_handler_impl.cc",
71 "content_handler_impl.h",
72 "devtools_agent_impl.cc",
73 "devtools_agent_impl.h",
74 "discardable_memory_allocator.cc",
75 "discardable_memory_allocator.h",
76 "document_resource_waiter.cc",
77 "document_resource_waiter.h",
78 "geolocation_client_impl.cc",
79 "geolocation_client_impl.h",
84 "html_document_application_delegate.cc",
85 "html_document_application_delegate.h",
86 "html_document_oopif.cc",
87 "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",
101 "mock_web_blob_registry_impl.cc",
102 "mock_web_blob_registry_impl.h",
103 "test_html_viewer_impl.cc",
104 "test_html_viewer_impl.h",
107 "web_clipboard_impl.cc",
108 "web_clipboard_impl.h",
109 "web_cookie_jar_impl.cc",
110 "web_cookie_jar_impl.h",
113 "web_layer_tree_view_impl.cc",
114 "web_layer_tree_view_impl.h",
115 "web_mime_registry_impl.cc",
116 "web_mime_registry_impl.h",
117 "web_notification_manager_impl.cc",
118 "web_notification_manager_impl.h",
119 "web_socket_handle_impl.cc",
120 "web_socket_handle_impl.h",
121 "web_storage_namespace_impl.cc",
122 "web_storage_namespace_impl.h",
123 "web_theme_engine_impl.cc",
124 "web_theme_engine_impl.h",
125 "web_url_loader_impl.cc",
126 "web_url_loader_impl.h",
129 include_dirs = [ "third_party/WebKit" ]
133 "//base/third_party/dynamic_annotations",
137 "//components/clipboard/public/interfaces",
138 "//components/devtools_service/public/cpp",
139 "//components/devtools_service/public/interfaces",
140 "//components/html_viewer/public/interfaces",
141 "//components/message_port",
142 "//components/mime_util",
143 "//components/resource_provider/public/cpp",
144 "//components/resource_provider/public/interfaces",
145 "//components/scheduler:scheduler",
146 "//components/view_manager/gles2:lib",
147 "//components/view_manager/public/interfaces",
148 "//components/webcrypto",
150 "//mandoline/services/navigation/public/interfaces",
151 "//mandoline/tab/public/interfaces",
155 "//mojo/application/public/cpp",
158 "//mojo/converters/surfaces",
159 "//mojo/platform_handle",
160 "//mojo/services/network/public/cpp",
161 "//mojo/services/network/public/interfaces",
164 "//third_party/mojo_services/src/accessibility/public/interfaces",
165 "//ui/mojo/events:interfaces",
167 "//ui/events:gesture_detection",
169 "//ui/events/gestures/blink",
178 "//components/view_manager/public/cpp",
179 "//third_party/WebKit/public:blink",
180 "//third_party/mojo/src/mojo/public/cpp/bindings",
184 sources += [ "html_viewer_version.rc" ]
188 "//components/clipboard",
189 "//components/view_manager",
190 "//mojo/services/network:network",
194 mojo_native_application("html_viewer") {
196 "html_viewer_main.cc",
201 "//third_party/mojo/src/mojo/public/c/system:for_shared_library",
203 resources = [ "$root_out_dir/html_viewer.pak" ]
205 if (v8_use_external_startup_data) {
207 "$root_build_dir/natives_blob.bin",
208 "$root_build_dir/snapshot_blob.bin",
214 mojo_native_application("layout_test_html_viewer") {
217 "layout_test_content_handler_impl.cc",
218 "layout_test_content_handler_impl.h",
219 "layout_test_html_viewer.cc",
220 "layout_test_html_viewer.h",
221 "layout_test_html_viewer_main.cc",
222 "web_test_delegate_impl.cc",
223 "web_test_delegate_impl.h",
228 "//components/test_runner",
229 "//third_party/WebKit/public:blink",
230 "//third_party/WebKit/public:test_support",
231 "//third_party/mojo/src/mojo/public/c/system:for_shared_library",
234 resources = [ "$root_out_dir/html_viewer.pak" ]
236 if (v8_use_external_startup_data) {
238 "$root_build_dir/natives_blob.bin",
239 "$root_build_dir/snapshot_blob.bin",
246 html_viewer_unittests_assets = "$root_build_dir/html_viewer_unittests_assets"
248 copy_ex("copy_unittest_assets") {
253 "//third_party/icu:icudata",
255 dest = html_viewer_unittests_assets
257 "$root_build_dir/html_viewer.pak",
258 "$root_build_dir/icudtl.dat",
259 "$root_build_dir/natives_blob.bin",
260 "$root_build_dir/snapshot_blob.bin",
264 generate_mojo_shell_assets_list("build_unittest_assets") {
266 ":copy_unittest_assets",
268 dir = html_viewer_unittests_assets
272 test("html_viewer_unittests") {
274 "ax_provider_impl_unittest.cc",
275 "discardable_memory_allocator_unittest.cc",
276 "run_all_unittests.cc",
281 "//base/test:test_support",
282 "//third_party/mojo/src/mojo/edk/system",
287 deps += [ ":build_unittest_assets" ]
288 apk_asset_location = html_viewer_unittests_assets
292 mojo_native_application("apptests") {
293 output_name = "html_viewer_apptests"
297 "ax_provider_apptest.cc",
298 "html_frame_apptest.cc",
303 "//components/html_viewer/public/interfaces",
304 "//components/view_manager/public/cpp/tests:test_support",
306 "//mandoline/tab/public/interfaces",
307 "//mojo/application/public/cpp:test_support",
308 "//net:test_support",
310 "//third_party/mojo_services/src/accessibility/public/interfaces",
311 "//third_party/mojo/src/mojo/public/c/system:for_shared_library",
316 "//components/view_manager",