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 repack("unified_blink_resources") {
14 "$root_gen_dir/blink/public/resources/blink_image_resources_100_percent.pak",
15 "$root_gen_dir/blink/public/resources/blink_resources.pak",
17 output = "$target_gen_dir/unified_blink_resources.pak"
19 "//third_party/WebKit/public:image_resources",
20 "//third_party/WebKit/public:resources",
24 action("generate_blink_resource_map") {
25 script = "//components/html_viewer/generate_blink_resource_map.py"
28 rebase_path("$target_gen_dir/unified_blink_resources.pak"),
30 rebase_path("$target_gen_dir/blink_resource_map.h"),
32 rebase_path("$target_gen_dir/blink_resource_map.cc"),
35 "$target_gen_dir/blink_resource_map.cc",
36 "$target_gen_dir/blink_resource_map.h",
39 ":unified_blink_resources",
42 "//third_party/WebKit/public:image_resources",
43 "//third_party/WebKit/public:resources",
47 grit("html_viewer_resources_grit") {
48 source = "html_viewer_resources.grd"
50 "grit/html_viewer_resources.h",
51 "html_viewer_resources.pak",
52 "html_viewer_resources.rc",
57 "$target_gen_dir/blink_resource_map.cc",
58 "$target_gen_dir/blink_resource_map.h",
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 "devtools_agent_impl.cc",
71 "devtools_agent_impl.h",
72 "discardable_memory_allocator.cc",
73 "discardable_memory_allocator.h",
74 "document_resource_waiter.cc",
75 "document_resource_waiter.h",
78 "frame_tree_manager.cc",
79 "frame_tree_manager.h",
80 "frame_tree_manager_delegate.h",
85 "html_document_oopif.cc",
86 "html_document_oopif.h",
89 "mock_web_blob_registry_impl.cc",
90 "mock_web_blob_registry_impl.h",
91 "test_html_viewer_impl.cc",
92 "test_html_viewer_impl.h",
95 "web_clipboard_impl.cc",
96 "web_clipboard_impl.h",
97 "web_cookie_jar_impl.cc",
98 "web_cookie_jar_impl.h",
99 "web_layer_tree_view_impl.cc",
100 "web_layer_tree_view_impl.h",
101 "web_mime_registry_impl.cc",
102 "web_mime_registry_impl.h",
103 "web_notification_manager_impl.cc",
104 "web_notification_manager_impl.h",
105 "web_socket_handle_impl.cc",
106 "web_socket_handle_impl.h",
107 "web_storage_namespace_impl.cc",
108 "web_storage_namespace_impl.h",
109 "web_theme_engine_impl.cc",
110 "web_theme_engine_impl.h",
111 "web_url_loader_impl.cc",
112 "web_url_loader_impl.h",
115 include_dirs = [ "third_party/WebKit" ]
119 "//base/third_party/dynamic_annotations",
123 "//components/clipboard/public/interfaces",
124 "//components/devtools_service/public/cpp",
125 "//components/devtools_service/public/interfaces",
126 "//components/html_viewer/public/interfaces",
127 "//components/message_port",
128 "//components/mime_util",
129 "//components/resource_provider/public/cpp",
130 "//components/resource_provider/public/interfaces",
131 "//components/scheduler:scheduler",
132 "//components/view_manager/gles2:lib",
133 "//components/view_manager/public/interfaces",
134 "//components/webcrypto",
136 "//mandoline/services/navigation/public/interfaces",
137 "//mandoline/tab/public/interfaces",
141 "//mojo/application/public/cpp",
143 "//mojo/converters/surfaces",
144 "//mojo/services/network/public/cpp",
145 "//mojo/services/network/public/interfaces",
148 "//third_party/mojo_services/src/accessibility/public/interfaces",
149 "//ui/mojo/events:interfaces",
151 "//ui/events:gesture_detection",
153 "//ui/events/gestures/blink",
159 # TODO(sky): we shouldn't be using ui_test_pak.
160 "//ui/resources:ui_test_pak",
165 "//components/view_manager/public/cpp",
166 "//third_party/WebKit/public:blink",
167 "//third_party/mojo/src/mojo/public/cpp/bindings",
168 ":generate_blink_resource_map",
172 sources += [ "html_viewer_version.rc" ]
176 "//components/clipboard",
177 "//components/view_manager",
181 mojo_native_application("html_viewer") {
183 "content_handler_impl.cc",
184 "content_handler_impl.h",
185 "html_document_application_delegate.cc",
186 "html_document_application_delegate.h",
189 "html_viewer_main.cc",
190 "html_viewer_switches.cc",
191 "html_viewer_switches.h",
194 ":html_viewer_resources_grit",
197 "//mojo/platform_handle",
198 "//third_party/icu:icudata",
199 "//third_party/mojo/src/mojo/public/c/system:for_shared_library",
200 "//ui/resources:ui_test_pak",
202 data_deps = [ "//mojo/services/network:network" ]
204 "$root_out_dir/icudtl.dat",
205 "$root_out_dir/ui_test.pak",
206 "$target_gen_dir/html_viewer_resources.pak",
209 if (v8_use_external_startup_data) {
211 "$root_build_dir/natives_blob.bin",
212 "$root_build_dir/snapshot_blob.bin",
218 test("html_viewer_unittests") {
220 "ax_provider_impl_unittest.cc",
221 "discardable_memory_allocator_unittest.cc",
222 "run_all_unittests.cc",
226 "//base/test:test_support",
227 "//third_party/mojo/src/mojo/edk/system",
231 mojo_native_application("apptests") {
232 output_name = "html_viewer_apptests"
236 "ax_provider_apptest.cc",
237 "html_frame_apptest.cc",
242 "//components/html_viewer/public/interfaces",
243 "//components/view_manager/public/cpp/tests:test_support",
245 "//mandoline/tab/public/interfaces",
246 "//mojo/application/public/cpp:test_support",
247 "//net:test_support",
249 "//third_party/mojo_services/src/accessibility/public/interfaces",
250 "//third_party/mojo/src/mojo/public/c/system:for_shared_library",
255 "//components/view_manager",