Elim cr-checkbox
[chromium-blink-merge.git] / ppapi / proxy / BUILD.gn
blobe3bd8c5439c67896ac061385c527a600a1b610f9
1 # 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.
5 config("proxy_implementation") {
6   defines = [ "PPAPI_PROXY_IMPLEMENTATION" ]
9 component("proxy") {
10   output_name = "ppapi_proxy"
12   sources = [
13     # Take some standalone files from the C++ wrapper allowing us to more
14     # easily make async callbacks in the proxy. We can't depend on the
15     # full C++ wrappers at this layer since the C++ wrappers expect
16     # symbols defining the globals for "being a plugin" which we are not.
17     # These callback files are standalone.
18     "../cpp/completion_callback.h",
19     "../utility/completion_callback_factory.h",
20     "audio_buffer_resource.cc",
21     "audio_buffer_resource.h",
22     "audio_encoder_resource.cc",
23     "audio_encoder_resource.h",
24     "broker_resource.cc",
25     "broker_resource.h",
26     "camera_capabilities_resource.cc",
27     "camera_capabilities_resource.h",
28     "camera_device_resource.cc",
29     "camera_device_resource.h",
30     "compositor_layer_resource.cc",
31     "compositor_layer_resource.h",
32     "compositor_resource.cc",
33     "compositor_resource.h",
34     "connection.h",
35     "dispatcher.cc",
36     "dispatcher.h",
37     "enter_proxy.h",
38     "error_conversion.cc",
39     "error_conversion.h",
40     "file_chooser_resource.cc",
41     "file_chooser_resource.h",
42     "file_io_resource.cc",
43     "file_io_resource.h",
44     "file_ref_resource.cc",
45     "file_ref_resource.h",
46     "file_system_resource.cc",
47     "file_system_resource.h",
48     "gamepad_resource.cc",
49     "gamepad_resource.h",
50     "graphics_2d_resource.cc",
51     "graphics_2d_resource.h",
52     "host_resolver_private_resource.cc",
53     "host_resolver_private_resource.h",
54     "host_resolver_resource.cc",
55     "host_resolver_resource.h",
56     "host_resolver_resource_base.cc",
57     "host_resolver_resource_base.h",
58     "interface_list.cc",
59     "interface_list.h",
60     "interface_proxy.cc",
61     "interface_proxy.h",
62     "isolated_file_system_private_resource.cc",
63     "isolated_file_system_private_resource.h",
64     "locking_resource_releaser.h",
65     "media_stream_audio_track_resource.cc",
66     "media_stream_audio_track_resource.h",
67     "media_stream_track_resource_base.cc",
68     "media_stream_track_resource_base.h",
69     "media_stream_video_track_resource.cc",
70     "media_stream_video_track_resource.h",
71     "message_handler.cc",
72     "message_handler.h",
73     "net_address_resource.cc",
74     "net_address_resource.h",
75     "network_list_resource.cc",
76     "network_list_resource.h",
77     "network_monitor_resource.cc",
78     "network_monitor_resource.h",
79     "network_proxy_resource.cc",
80     "network_proxy_resource.h",
81     "output_protection_resource.cc",
82     "output_protection_resource.h",
83     "plugin_array_buffer_var.cc",
84     "plugin_array_buffer_var.h",
85     "plugin_dispatcher.cc",
86     "plugin_dispatcher.h",
87     "plugin_globals.cc",
88     "plugin_globals.h",
89     "plugin_message_filter.cc",
90     "plugin_message_filter.h",
91     "plugin_resource.cc",
92     "plugin_resource.h",
93     "plugin_resource_tracker.cc",
94     "plugin_resource_tracker.h",
95     "plugin_resource_var.cc",
96     "plugin_resource_var.h",
97     "plugin_var_serialization_rules.cc",
98     "plugin_var_serialization_rules.h",
99     "plugin_var_tracker.cc",
100     "plugin_var_tracker.h",
101     "ppapi_command_buffer_proxy.cc",
102     "ppapi_command_buffer_proxy.h",
103     "ppapi_message_utils.h",
104     "ppapi_messages.h",
105     "ppb_audio_proxy.cc",
106     "ppb_audio_proxy.h",
107     "ppb_core_proxy.cc",
108     "ppb_core_proxy.h",
109     "ppb_graphics_3d_proxy.cc",
110     "ppb_graphics_3d_proxy.h",
111     "ppb_image_data_proxy.cc",
112     "ppb_image_data_proxy.h",
113     "ppb_instance_proxy.cc",
114     "ppb_instance_proxy.h",
115     "ppb_message_loop_proxy.cc",
116     "ppb_message_loop_proxy.h",
117     "ppb_testing_proxy.cc",
118     "ppb_testing_proxy.h",
119     "ppb_x509_certificate_private_proxy.cc",
120     "ppb_x509_certificate_private_proxy.h",
121     "ppp_class_proxy.cc",
122     "ppp_class_proxy.h",
123     "ppp_find_proxy.cc",
124     "ppp_find_proxy.h",
125     "ppp_graphics_3d_proxy.cc",
126     "ppp_graphics_3d_proxy.h",
127     "ppp_input_event_proxy.cc",
128     "ppp_input_event_proxy.h",
129     "ppp_instance_proxy.cc",
130     "ppp_instance_proxy.h",
131     "ppp_messaging_proxy.cc",
132     "ppp_messaging_proxy.h",
133     "ppp_mouse_lock_proxy.cc",
134     "ppp_mouse_lock_proxy.h",
135     "ppp_pdf_proxy.cc",
136     "ppp_pdf_proxy.h",
137     "ppp_printing_proxy.cc",
138     "ppp_printing_proxy.h",
139     "ppp_text_input_proxy.cc",
140     "ppp_text_input_proxy.h",
141     "printing_resource.cc",
142     "printing_resource.h",
143     "proxy_array_output.cc",
144     "proxy_array_output.h",
145     "proxy_channel.cc",
146     "proxy_channel.h",
147     "proxy_completion_callback_factory.h",
148     "proxy_module.cc",
149     "proxy_module.h",
150     "proxy_object_var.cc",
151     "proxy_object_var.h",
152     "resource_creation_proxy.cc",
153     "resource_creation_proxy.h",
154     "resource_reply_thread_registrar.cc",
155     "resource_reply_thread_registrar.h",
156     "tcp_server_socket_private_resource.cc",
157     "tcp_server_socket_private_resource.h",
158     "tcp_socket_private_resource.cc",
159     "tcp_socket_private_resource.h",
160     "tcp_socket_resource.cc",
161     "tcp_socket_resource.h",
162     "tcp_socket_resource_base.cc",
163     "tcp_socket_resource_base.h",
164     "truetype_font_resource.cc",
165     "truetype_font_resource.h",
166     "truetype_font_singleton_resource.cc",
167     "truetype_font_singleton_resource.h",
168     "udp_socket_filter.cc",
169     "udp_socket_filter.h",
170     "udp_socket_private_resource.cc",
171     "udp_socket_private_resource.h",
172     "udp_socket_resource.cc",
173     "udp_socket_resource.h",
174     "udp_socket_resource_base.cc",
175     "udp_socket_resource_base.h",
176     "uma_private_resource.cc",
177     "uma_private_resource.h",
178     "url_loader_resource.cc",
179     "url_loader_resource.h",
180     "url_request_info_resource.cc",
181     "url_request_info_resource.h",
182     "url_response_info_resource.cc",
183     "url_response_info_resource.h",
184     "var_serialization_rules.h",
185     "video_decoder_resource.cc",
186     "video_decoder_resource.h",
187     "video_destination_resource.cc",
188     "video_destination_resource.h",
189     "video_encoder_resource.cc",
190     "video_encoder_resource.h",
191     "video_frame_resource.cc",
192     "video_frame_resource.h",
193     "video_source_resource.cc",
194     "video_source_resource.h",
195     "websocket_resource.cc",
196     "websocket_resource.h",
197   ]
199   if (is_nacl) {
200     sources += [
201       "../nacl_irt/irt_interfaces.cc",
202       "../nacl_irt/irt_interfaces.h",
203       "../nacl_irt/irt_pnacl_translator_compile.cc",
204       "../nacl_irt/irt_pnacl_translator_link.cc",
205       "../nacl_irt/irt_ppapi.cc",
206       "../nacl_irt/irt_ppapi.h",
207       "../nacl_irt/irt_start.cc",
208       "../nacl_irt/manifest_service.cc",
209       "../nacl_irt/manifest_service.h",
210       "../nacl_irt/plugin_main.cc",
211       "../nacl_irt/plugin_main.h",
212       "../nacl_irt/plugin_startup.cc",
213       "../nacl_irt/plugin_startup.h",
214       "../nacl_irt/ppapi_dispatcher.cc",
215       "../nacl_irt/ppapi_dispatcher.h",
216     ]
217   } else {
218     sources += [
219       "audio_input_resource.cc",
220       "audio_input_resource.h",
221       "broker_dispatcher.cc",
222       "broker_dispatcher.h",
223       "browser_font_singleton_resource.cc",
224       "browser_font_singleton_resource.h",
225       "device_enumeration_resource_helper.cc",
226       "device_enumeration_resource_helper.h",
227       "flash_clipboard_resource.cc",
228       "flash_clipboard_resource.h",
229       "flash_drm_resource.cc",
230       "flash_drm_resource.h",
231       "flash_file_resource.cc",
232       "flash_file_resource.h",
233       "flash_font_file_resource.cc",
234       "flash_font_file_resource.h",
235       "flash_fullscreen_resource.cc",
236       "flash_fullscreen_resource.h",
237       "flash_menu_resource.cc",
238       "flash_menu_resource.h",
239       "flash_resource.cc",
240       "flash_resource.h",
241       "host_dispatcher.cc",
242       "host_dispatcher.h",
243       "host_var_serialization_rules.cc",
244       "host_var_serialization_rules.h",
245       "pdf_resource.cc",
246       "pdf_resource.h",
247       "platform_verification_private_resource.cc",
248       "platform_verification_private_resource.h",
249       "ppb_broker_proxy.cc",
250       "ppb_broker_proxy.h",
251       "ppb_buffer_proxy.cc",
252       "ppb_buffer_proxy.h",
253       "ppb_flash_message_loop_proxy.cc",
254       "ppb_flash_message_loop_proxy.h",
255       "ppb_var_deprecated_proxy.cc",
256       "ppb_var_deprecated_proxy.h",
257       "ppb_video_decoder_proxy.cc",
258       "ppb_video_decoder_proxy.h",
259       "ppp_content_decryptor_private_proxy.cc",
260       "ppp_content_decryptor_private_proxy.h",
261       "ppp_instance_private_proxy.cc",
262       "ppp_instance_private_proxy.h",
263       "ppp_video_decoder_proxy.cc",
264       "ppp_video_decoder_proxy.h",
265       "video_capture_resource.cc",
266       "video_capture_resource.h",
267     ]
268   }
270   configs += [
271     ":proxy_implementation",
272     "//build/config:precompiled_headers",
273   ]
275   deps = [
276     "//base",
277     "//gpu/command_buffer/client:gles2_implementation",
278     "//gpu/ipc",
279     "//ipc",
280     "//media:shared_memory_support",
281     "//ppapi/c",
282     "//ppapi/proxy:ipc_sources",
283     "//ppapi/shared_impl",
284     "//third_party/icu",
285   ]
287   if (!is_nacl) {
288     deps += [
289       "//base/third_party/dynamic_annotations",
290       "//gin",
291       "//skia",
292       "//ui/events:events_base",
293       "//ui/surface",
294     ]
295   }
298 group("ipc") {
299   if (is_component_build) {
300     public_deps = [
301       "//ppapi/proxy",
302     ]
303   } else {
304     public_deps = [
305       ":ipc_sources",
306     ]
307   }
310 source_set("ipc_sources") {
311   sources = [
312     "nacl_message_scanner.cc",
313     "nacl_message_scanner.h",
314     "ppapi_messages.cc",
315     "ppapi_messages.h",
316     "ppapi_param_traits.cc",
317     "ppapi_param_traits.h",
318     "raw_var_data.cc",
319     "raw_var_data.h",
320     "resource_message_params.cc",
321     "resource_message_params.h",
322     "serialized_flash_menu.cc",
323     "serialized_flash_menu.h",
324     "serialized_handle.cc",
325     "serialized_handle.h",
326     "serialized_structs.cc",
327     "serialized_structs.h",
328     "serialized_var.cc",
329     "serialized_var.h",
330     "var_serialization_rules.h",
331   ]
332   if (is_nacl) {
333     sources -= [ "serialized_flash_menu.cc" ]
334   }
336   configs += [ ":proxy_implementation" ]
338   deps = [
339     "//base",
340     "//gpu/ipc",
341     "//ipc",
342     "//ppapi/c",
343     "//ppapi/shared_impl",
344   ]
345   if (!is_nacl) {
346     deps += [ "//skia" ]
347   }
350 source_set("test_support") {
351   testonly = true
353   sources = [
354     "ppapi_proxy_test.cc",
355     "ppapi_proxy_test.h",
356     "resource_message_test_sink.cc",
357     "resource_message_test_sink.h",
358   ]
360   deps = [
361     "//base/test:test_support",
362     "//ipc",
363     "//ipc:test_support",
364     "//ppapi/proxy",
365     "//ppapi/shared_impl",
366     "//testing/gmock",
367     "//testing/gtest",
368   ]