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/mojo_application_package.gni")
7 import("//testing/test.gni")
8 import("//third_party/mojo/src/mojo/public/mojo.gni")
9 import("//third_party/mojo/src/mojo/public/mojo_application.gni")
10 import("//tools/grit/grit_rule.gni")
11 import("//tools/grit/repack.gni")
14 repack("unified_blink_resources") {
16 "$root_gen_dir/blink/public/resources/blink_image_resources_100_percent.pak",
17 "$root_gen_dir/blink/public/resources/blink_resources.pak",
19 output = "$target_gen_dir/unified_blink_resources.pak"
21 "//third_party/WebKit/public:image_resources",
22 "//third_party/WebKit/public:resources",
26 action("generate_blink_resource_map") {
27 script = "//components/html_viewer/generate_blink_resource_map.py"
30 rebase_path("$target_gen_dir/unified_blink_resources.pak"),
32 rebase_path("$target_gen_dir/blink_resource_map.h"),
34 rebase_path("$target_gen_dir/blink_resource_map.cc"),
37 "$target_gen_dir/blink_resource_map.cc",
38 "$target_gen_dir/blink_resource_map.h",
41 ":unified_blink_resources",
44 "//third_party/WebKit/public:image_resources",
45 "//third_party/WebKit/public:resources",
49 grit("html_viewer_resources_grit") {
50 source = "html_viewer_resources.grd"
52 "grit/html_viewer_resources.h",
53 "html_viewer_resources.pak",
54 "html_viewer_resources.rc",
59 "$target_gen_dir/blink_resource_map.cc",
60 "$target_gen_dir/blink_resource_map.h",
61 "ax_provider_impl.cc",
63 "blink_basic_type_converters.cc",
64 "blink_basic_type_converters.h",
65 "blink_input_events_type_converters.cc",
66 "blink_input_events_type_converters.h",
67 "blink_platform_impl.cc",
68 "blink_platform_impl.h",
69 "blink_resource_constants.h",
70 "blink_url_request_type_converters.cc",
71 "blink_url_request_type_converters.h",
72 "discardable_memory_allocator.cc",
73 "discardable_memory_allocator.h",
76 "mock_web_blob_registry_impl.cc",
77 "mock_web_blob_registry_impl.h",
82 "web_clipboard_impl.cc",
83 "web_clipboard_impl.h",
84 "web_cookie_jar_impl.cc",
85 "web_cookie_jar_impl.h",
86 "web_layer_tree_view_impl.cc",
87 "web_layer_tree_view_impl.h",
88 "web_media_player_factory.cc",
89 "web_media_player_factory.h",
90 "web_media_player_factory.h",
91 "web_message_port_channel_impl.cc",
92 "web_message_port_channel_impl.h",
93 "web_mime_registry_impl.cc",
94 "web_mime_registry_impl.h",
95 "web_notification_manager_impl.cc",
96 "web_notification_manager_impl.h",
97 "web_socket_handle_impl.cc",
98 "web_socket_handle_impl.h",
99 "web_storage_namespace_impl.cc",
100 "web_storage_namespace_impl.h",
101 "web_theme_engine_impl.cc",
102 "web_theme_engine_impl.h",
103 "web_url_loader_impl.cc",
104 "web_url_loader_impl.h",
107 include_dirs = [ "third_party/WebKit" ]
111 "//base/third_party/dynamic_annotations",
115 "//components/clipboard/public/interfaces",
116 "//components/gpu/public/interfaces",
117 "//components/mime_util",
118 "//components/resource_provider/public/cpp",
119 "//components/resource_provider/public/interfaces",
120 "//components/scheduler:scheduler",
121 "//components/surfaces/public/interfaces",
122 "//components/webcrypto",
124 "//mandoline/services/navigation/public/interfaces",
128 "//mojo/application/public/cpp",
130 "//mojo/converters/surfaces",
131 "//mojo/services/network/public/cpp",
132 "//mojo/services/network/public/interfaces",
135 "//third_party/mojo/src/mojo/public/c/system:for_shared_library",
136 "//third_party/mojo_services/src/accessibility/public/interfaces",
137 "//ui/mojo/events:interfaces",
139 "//ui/events:gesture_detection",
141 "//ui/events/gestures/blink",
146 # TODO(sky): we shouldn't be using ui_test_pak.
147 "//ui/resources:ui_test_pak",
152 "//components/view_manager/public/cpp",
153 "//third_party/WebKit/public:blink",
154 "//third_party/mojo/src/mojo/public/cpp/bindings",
155 ":generate_blink_resource_map",
159 sources += [ "html_viewer_version.rc" ]
163 "//components/clipboard",
164 "//components/surfaces",
165 "//components/view_manager",
169 mojo_application_package("html_viewer") {
173 "ui_setup_android.cc",
174 "ui_setup_android.h",
177 ":html_viewer_resources_grit",
180 "//mojo/platform_handle",
181 "//third_party/icu:icudata",
182 "//ui/resources:ui_test_pak",
184 data_deps = [ "//mojo/services/network:network" ]
186 "$root_out_dir/icudtl.dat",
187 "$root_out_dir/ui_test.pak",
188 "$target_gen_dir/html_viewer_resources.pak",
191 if (v8_use_external_startup_data) {
193 "$root_build_dir/natives_blob.bin",
194 "$root_build_dir/snapshot_blob.bin",
200 output_name = "html_viewer_unittests"
202 "ax_provider_impl_unittest.cc",
203 "discardable_memory_allocator_unittest.cc",
207 "//base/test:run_all_unittests",
211 mojo_native_application("apptests") {
212 output_name = "html_viewer_apptests"
216 "ax_provider_apptest.cc",
221 "//mojo/application/public/cpp:test_support",
222 "//net:test_support",
224 "//third_party/mojo_services/src/accessibility/public/interfaces",
227 data_deps = [ ":html_viewer" ]