blob: 342c8af6f70e61380cd34228d95e35b47c6c6053 [file] [log] [blame]
brettwf7eb6ca2015-02-14 01:37:311# Copyright 2015 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.
4
phosek636bceb32015-10-27 03:36:485import("//build/config/nacl/config.gni")
David Dorwinfb7128132022-04-26 01:36:516import("//ppapi/buildflags/buildflags.gni")
7
K. Moonf17e2162022-07-18 20:59:428assert(enable_ppapi)
phosek636bceb32015-10-27 03:36:489
brettwf7eb6ca2015-02-14 01:37:3110config("proxy_implementation") {
11 defines = [ "PPAPI_PROXY_IMPLEMENTATION" ]
12}
13
Dirk Pranke9c0fc3b2020-08-06 16:01:3014component("proxy") {
brettwf7eb6ca2015-02-14 01:37:3115 output_name = "ppapi_proxy"
16
17 sources = [
18 # Take some standalone files from the C++ wrapper allowing us to more
19 # easily make async callbacks in the proxy. We can't depend on the
20 # full C++ wrappers at this layer since the C++ wrappers expect
21 # symbols defining the globals for "being a plugin" which we are not.
cfredric4757cd92021-07-12 21:23:1722 #
23 # These callback files are supposed to be standalone, but are not; see
24 # http://crbug.com/1228394.
brettwf7eb6ca2015-02-14 01:37:3125 "../cpp/completion_callback.h",
cfredric4757cd92021-07-12 21:23:1726 "../cpp/logging.h",
brettwf7eb6ca2015-02-14 01:37:3127 "../utility/completion_callback_factory.h",
28 "audio_buffer_resource.cc",
29 "audio_buffer_resource.h",
jchuang586e3db2015-02-25 05:17:5630 "camera_capabilities_resource.cc",
31 "camera_capabilities_resource.h",
32 "camera_device_resource.cc",
33 "camera_device_resource.h",
brettwf7eb6ca2015-02-14 01:37:3134 "dispatcher.cc",
brettwf7eb6ca2015-02-14 01:37:3135 "enter_proxy.h",
36 "error_conversion.cc",
37 "error_conversion.h",
38 "file_chooser_resource.cc",
39 "file_chooser_resource.h",
40 "file_io_resource.cc",
41 "file_io_resource.h",
brettwf7eb6ca2015-02-14 01:37:3142 "file_ref_resource.cc",
43 "file_ref_resource.h",
44 "file_system_resource.cc",
45 "file_system_resource.h",
46 "gamepad_resource.cc",
47 "gamepad_resource.h",
48 "graphics_2d_resource.cc",
49 "graphics_2d_resource.h",
50 "host_resolver_private_resource.cc",
brettwf7eb6ca2015-02-14 01:37:3151 "host_resolver_resource.cc",
52 "host_resolver_resource.h",
53 "host_resolver_resource_base.cc",
brettwf7eb6ca2015-02-14 01:37:3154 "interface_list.cc",
brettwf7eb6ca2015-02-14 01:37:3155 "interface_proxy.cc",
brettwf7eb6ca2015-02-14 01:37:3156 "isolated_file_system_private_resource.cc",
57 "isolated_file_system_private_resource.h",
58 "locking_resource_releaser.h",
59 "media_stream_audio_track_resource.cc",
60 "media_stream_audio_track_resource.h",
61 "media_stream_track_resource_base.cc",
62 "media_stream_track_resource_base.h",
63 "media_stream_video_track_resource.cc",
64 "media_stream_video_track_resource.h",
65 "message_handler.cc",
brettwf7eb6ca2015-02-14 01:37:3166 "net_address_resource.cc",
67 "net_address_resource.h",
68 "network_list_resource.cc",
brettwf7eb6ca2015-02-14 01:37:3169 "network_monitor_resource.cc",
70 "network_monitor_resource.h",
71 "network_proxy_resource.cc",
72 "network_proxy_resource.h",
brettwf7eb6ca2015-02-14 01:37:3173 "plugin_array_buffer_var.cc",
74 "plugin_array_buffer_var.h",
75 "plugin_dispatcher.cc",
brettwf7eb6ca2015-02-14 01:37:3176 "plugin_globals.cc",
77 "plugin_globals.h",
78 "plugin_message_filter.cc",
79 "plugin_message_filter.h",
80 "plugin_resource.cc",
brettwf7eb6ca2015-02-14 01:37:3181 "plugin_resource_tracker.cc",
82 "plugin_resource_tracker.h",
83 "plugin_resource_var.cc",
84 "plugin_resource_var.h",
85 "plugin_var_serialization_rules.cc",
86 "plugin_var_serialization_rules.h",
87 "plugin_var_tracker.cc",
brettwf7eb6ca2015-02-14 01:37:3188 "ppapi_command_buffer_proxy.cc",
89 "ppapi_command_buffer_proxy.h",
brettwf7eb6ca2015-02-14 01:37:3190 "ppb_audio_proxy.cc",
91 "ppb_audio_proxy.h",
92 "ppb_core_proxy.cc",
93 "ppb_core_proxy.h",
94 "ppb_graphics_3d_proxy.cc",
95 "ppb_graphics_3d_proxy.h",
96 "ppb_image_data_proxy.cc",
97 "ppb_image_data_proxy.h",
98 "ppb_instance_proxy.cc",
99 "ppb_instance_proxy.h",
100 "ppb_message_loop_proxy.cc",
101 "ppb_message_loop_proxy.h",
102 "ppb_testing_proxy.cc",
103 "ppb_testing_proxy.h",
brettwf7eb6ca2015-02-14 01:37:31104 "ppp_class_proxy.cc",
105 "ppp_class_proxy.h",
brettwf7eb6ca2015-02-14 01:37:31106 "ppp_graphics_3d_proxy.cc",
107 "ppp_graphics_3d_proxy.h",
108 "ppp_input_event_proxy.cc",
109 "ppp_input_event_proxy.h",
110 "ppp_instance_proxy.cc",
111 "ppp_instance_proxy.h",
112 "ppp_messaging_proxy.cc",
113 "ppp_messaging_proxy.h",
114 "ppp_mouse_lock_proxy.cc",
115 "ppp_mouse_lock_proxy.h",
brettwf7eb6ca2015-02-14 01:37:31116 "ppp_printing_proxy.cc",
117 "ppp_printing_proxy.h",
118 "ppp_text_input_proxy.cc",
119 "ppp_text_input_proxy.h",
120 "printing_resource.cc",
121 "printing_resource.h",
122 "proxy_array_output.cc",
123 "proxy_array_output.h",
124 "proxy_channel.cc",
brettwf7eb6ca2015-02-14 01:37:31125 "proxy_completion_callback_factory.h",
brettwf7eb6ca2015-02-14 01:37:31126 "proxy_object_var.cc",
127 "proxy_object_var.h",
128 "resource_creation_proxy.cc",
129 "resource_creation_proxy.h",
130 "resource_reply_thread_registrar.cc",
brettwf7eb6ca2015-02-14 01:37:31131 "tcp_server_socket_private_resource.cc",
132 "tcp_server_socket_private_resource.h",
133 "tcp_socket_private_resource.cc",
134 "tcp_socket_private_resource.h",
135 "tcp_socket_resource.cc",
136 "tcp_socket_resource.h",
137 "tcp_socket_resource_base.cc",
138 "tcp_socket_resource_base.h",
dmichaelb11ca7b2015-04-02 16:59:40139 "udp_socket_filter.cc",
140 "udp_socket_filter.h",
brettwf7eb6ca2015-02-14 01:37:31141 "udp_socket_private_resource.cc",
142 "udp_socket_private_resource.h",
143 "udp_socket_resource.cc",
144 "udp_socket_resource.h",
145 "udp_socket_resource_base.cc",
146 "udp_socket_resource_base.h",
147 "uma_private_resource.cc",
148 "uma_private_resource.h",
149 "url_loader_resource.cc",
150 "url_loader_resource.h",
151 "url_request_info_resource.cc",
152 "url_request_info_resource.h",
153 "url_response_info_resource.cc",
154 "url_response_info_resource.h",
dpranke6065cf72015-02-26 03:30:58155 "video_decoder_resource.cc",
156 "video_decoder_resource.h",
dpranke6065cf72015-02-26 03:30:58157 "video_encoder_resource.cc",
158 "video_encoder_resource.h",
brettwf7eb6ca2015-02-14 01:37:31159 "video_frame_resource.cc",
160 "video_frame_resource.h",
adrian.belgun0873bcb2016-06-08 10:00:55161 "vpn_provider_resource.cc",
162 "vpn_provider_resource.h",
brettwf7eb6ca2015-02-14 01:37:31163 "websocket_resource.cc",
164 "websocket_resource.h",
165 ]
166
167 if (is_nacl) {
Mark Seaborn0040a612022-04-08 17:42:50168 # Consistency check: Check that is_nacl_irt is set to true for this
169 # code that is built for the NaCl IRT. Previously, there was a bug
170 # where is_nacl_irt was not always set to true for builds of the NaCl
171 # IRT.
172 assert(is_nacl_irt)
173
brettwf7eb6ca2015-02-14 01:37:31174 sources += [
mseaborn770b3282015-07-21 16:37:57175 "../nacl_irt/irt_interfaces.cc",
176 "../nacl_irt/irt_interfaces.h",
mseabornd735c8b92015-07-22 02:55:07177 "../nacl_irt/irt_pnacl_translator_compile.cc",
178 "../nacl_irt/irt_pnacl_translator_link.cc",
brettwf7eb6ca2015-02-14 01:37:31179 "../nacl_irt/irt_ppapi.cc",
180 "../nacl_irt/irt_ppapi.h",
181 "../nacl_irt/irt_start.cc",
182 "../nacl_irt/manifest_service.cc",
183 "../nacl_irt/manifest_service.h",
brettwf7eb6ca2015-02-14 01:37:31184 "../nacl_irt/plugin_startup.cc",
185 "../nacl_irt/plugin_startup.h",
186 "../nacl_irt/ppapi_dispatcher.cc",
187 "../nacl_irt/ppapi_dispatcher.h",
188 ]
189 } else {
190 sources += [
191 "audio_input_resource.cc",
192 "audio_input_resource.h",
xzhang3a2a4702017-04-07 16:34:30193 "audio_output_resource.cc",
194 "audio_output_resource.h",
brettwf7eb6ca2015-02-14 01:37:31195 "browser_font_singleton_resource.cc",
196 "browser_font_singleton_resource.h",
197 "device_enumeration_resource_helper.cc",
198 "device_enumeration_resource_helper.h",
brettwf7eb6ca2015-02-14 01:37:31199 "host_dispatcher.cc",
200 "host_dispatcher.h",
201 "host_var_serialization_rules.cc",
202 "host_var_serialization_rules.h",
brettwf7eb6ca2015-02-14 01:37:31203 "ppb_buffer_proxy.cc",
bradnelson961324d2015-03-24 21:03:02204 "ppb_var_deprecated_proxy.cc",
205 "ppb_var_deprecated_proxy.h",
brettwf7eb6ca2015-02-14 01:37:31206 "ppb_video_decoder_proxy.cc",
207 "ppb_video_decoder_proxy.h",
John Abd-El-Malek38963ea42021-04-07 21:11:33208 "ppb_x509_certificate_private_proxy.cc",
209 "ppb_x509_certificate_private_proxy.h",
brettwf7eb6ca2015-02-14 01:37:31210 "ppp_instance_private_proxy.cc",
211 "ppp_instance_private_proxy.h",
212 "ppp_video_decoder_proxy.cc",
213 "ppp_video_decoder_proxy.h",
brettwf7eb6ca2015-02-14 01:37:31214 "video_capture_resource.cc",
215 "video_capture_resource.h",
brettwf7eb6ca2015-02-14 01:37:31216 ]
217 }
218
brettwbc8b2a22015-07-28 18:24:42219 configs += [
220 ":proxy_implementation",
221 "//build/config:precompiled_headers",
222 ]
brettwf7eb6ca2015-02-14 01:37:31223
brettwc17eb982015-11-27 22:52:49224 public_deps = [
rockot38e46dd2017-03-24 16:55:13225 "//ipc",
brettwc17eb982015-11-27 22:52:49226 "//ppapi/proxy:ipc_sources",
227 ]
228
brettwf7eb6ca2015-02-14 01:37:31229 deps = [
scottmg3cab0ba2017-01-25 18:34:16230 ":common",
brettwf7eb6ca2015-02-14 01:37:31231 "//base",
Matt Reynolds7550995f2018-05-23 03:12:55232 "//device/base/synchronization",
233 "//device/gamepad/public/cpp:shared_with_blink",
Andrew Shulaevc8f936e2021-06-25 15:48:15234 "//gpu/command_buffer/client:client",
235 "//gpu/command_buffer/client:gles2_cmd_helper",
piman864ffa62016-06-27 21:00:01236 "//gpu/command_buffer/client:gles2_implementation",
Antoine Labourfeab2392017-12-21 20:28:39237 "//gpu/command_buffer/common",
piman864ffa62016-06-27 21:00:01238 "//gpu/ipc/common:command_buffer_traits",
brettwf7eb6ca2015-02-14 01:37:31239 "//media:shared_memory_support",
Ken Rockotf03d97c952018-07-04 22:08:10240 "//mojo/core/embedder",
brettwf7eb6ca2015-02-14 01:37:31241 "//ppapi/c",
brettwf7eb6ca2015-02-14 01:37:31242 "//ppapi/shared_impl",
Nico Weber7c271e92021-11-30 04:21:09243 "//third_party/icu",
pimanb36392c22016-07-13 02:11:36244 "//ui/gfx/geometry",
245 "//ui/gfx/ipc/geometry",
brettwf7eb6ca2015-02-14 01:37:31246 ]
247
miletusceb25012015-07-29 00:24:22248 if (!is_nacl) {
dpranke6065cf72015-02-26 03:30:58249 deps += [
250 "//base/third_party/dynamic_annotations",
251 "//gin",
252 "//skia",
253 "//ui/events:events_base",
254 "//ui/surface",
255 ]
256 }
brettwf7eb6ca2015-02-14 01:37:31257}
258
scottmg3cab0ba2017-01-25 18:34:16259source_set("common") {
260 sources = [
scottmg3cab0ba2017-01-25 18:34:16261 "tcp_socket_resource_constants.h",
scottmg3cab0ba2017-01-25 18:34:16262 "udp_socket_resource_constants.h",
263 ]
Andrew Shulaevc8f936e2021-06-25 15:48:15264
265 deps = [ "//base:base" ]
scottmg3cab0ba2017-01-25 18:34:16266}
267
brettw542f7532015-04-06 22:35:45268group("ipc") {
269 if (is_component_build) {
Nico Weber2c451b532020-01-13 19:15:58270 public_deps = [ "//ppapi/proxy" ]
brettw542f7532015-04-06 22:35:45271 } else {
Nico Weber2c451b532020-01-13 19:15:58272 public_deps = [ ":ipc_sources" ]
brettw542f7532015-04-06 22:35:45273 }
274}
275
276source_set("ipc_sources") {
brettwf7eb6ca2015-02-14 01:37:31277 sources = [
Ari Chivukula1da866b2021-08-11 22:39:06278 "connection.h",
279 "dispatcher.h",
280 "host_resolver_private_resource.h",
281 "host_resolver_resource_base.h",
282 "interface_list.h",
283 "interface_proxy.h",
284 "message_handler.h",
brettwf7eb6ca2015-02-14 01:37:31285 "nacl_message_scanner.cc",
286 "nacl_message_scanner.h",
Ari Chivukula1da866b2021-08-11 22:39:06287 "network_list_resource.h",
288 "plugin_dispatcher.h",
289 "plugin_resource.h",
290 "plugin_var_tracker.h",
scottmg3cab0ba2017-01-25 18:34:16291 "ppapi_message_utils.h",
brettwf7eb6ca2015-02-14 01:37:31292 "ppapi_messages.cc",
293 "ppapi_messages.h",
294 "ppapi_param_traits.cc",
295 "ppapi_param_traits.h",
Ari Chivukula1da866b2021-08-11 22:39:06296 "ppb_buffer_proxy.h",
297 "proxy_channel.h",
brettwf7eb6ca2015-02-14 01:37:31298 "raw_var_data.cc",
299 "raw_var_data.h",
300 "resource_message_params.cc",
301 "resource_message_params.h",
Ari Chivukula1da866b2021-08-11 22:39:06302 "resource_reply_thread_registrar.h",
brettwf7eb6ca2015-02-14 01:37:31303 "serialized_handle.cc",
304 "serialized_handle.h",
305 "serialized_structs.cc",
306 "serialized_structs.h",
307 "serialized_var.cc",
308 "serialized_var.h",
309 "var_serialization_rules.h",
310 ]
brettwf7eb6ca2015-02-14 01:37:31311
312 configs += [ ":proxy_implementation" ]
313
314 deps = [
315 "//base",
fsamuel19acfae2016-03-22 05:38:24316 "//gpu/ipc/common:command_buffer_traits",
brettwf7eb6ca2015-02-14 01:37:31317 "//ppapi/c",
318 "//ppapi/shared_impl",
brettwf7eb6ca2015-02-14 01:37:31319 ]
rockot38e46dd2017-03-24 16:55:13320
Nico Weber2c451b532020-01-13 19:15:58321 public_deps = [ "//ipc" ]
rockot38e46dd2017-03-24 16:55:13322
dpranke6065cf72015-02-26 03:30:58323 if (!is_nacl) {
miletus45effdc42015-08-05 00:29:18324 deps += [ "//skia" ]
dpranke6065cf72015-02-26 03:30:58325 }
brettwf7eb6ca2015-02-14 01:37:31326}
327
Dirk Pranke9c0fc3b2020-08-06 16:01:30328static_library("test_support") {
brettwf7eb6ca2015-02-14 01:37:31329 testonly = true
330
331 sources = [
332 "ppapi_proxy_test.cc",
333 "ppapi_proxy_test.h",
334 "resource_message_test_sink.cc",
335 "resource_message_test_sink.h",
336 ]
337
Nico Weber2c451b532020-01-13 19:15:58338 public_deps = [ ":proxy" ]
brettwf7eb6ca2015-02-14 01:37:31339 deps = [
340 "//base/test:test_support",
341 "//ipc",
342 "//ipc:test_support",
343 "//ppapi/proxy",
344 "//ppapi/shared_impl",
Andrew Shulaevc8f936e2021-06-25 15:48:15345 "//ppapi/shared_impl:test_support",
brettwf7eb6ca2015-02-14 01:37:31346 "//testing/gmock",
347 "//testing/gtest",
348 ]
349}