Change the permission check for Pepper socket API to support both the public and...
[chromium-blink-merge.git] / content / content_common.gypi
blob7db8edac74dcbc530a8336ecceb100b346ddfbaf
1 # Copyright (c) 2012 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.
6   'dependencies': [
7     '../base/base.gyp:base',
8     '../components/tracing.gyp:tracing',
9     '../media/media.gyp:media',
10     '../net/net.gyp:net',
11     '../skia/skia.gyp:skia',
12     '../third_party/icu/icu.gyp:icuuc',
13     '../ui/ui.gyp:shell_dialogs',
14     '../ui/ui.gyp:ui',
15     '../url/url.gyp:url_lib',
16     '../webkit/common/user_agent/webkit_user_agent.gyp:user_agent',
17   ],
18   'include_dirs': [
19     '..',
20   ],
21   'export_dependent_settings': [
22     '../base/base.gyp:base',
23   ],
24   'sources': [
25     'public/common/bindings_policy.h',
26     'public/common/child_process_host.h',
27     'public/common/child_process_host_delegate.cc',
28     'public/common/child_process_host_delegate.h',
29     'public/common/child_process_sandbox_support_linux.h',
30     'public/common/content_constants.cc',
31     'public/common/content_constants.h',
32     'public/common/content_descriptors.h',
33     'public/common/content_ipc_logging.h',
34     'public/common/content_paths.h',
35     'public/common/content_restriction.h',
36     'public/common/content_switches.cc',
37     'public/common/content_switches.h',
38     'public/common/context_menu_params.cc',
39     'public/common/context_menu_params.h',
40     'public/common/context_menu_source_type.h',
41     'public/common/console_message_level.h',
42     'public/common/favicon_url.cc',
43     'public/common/favicon_url.h',
44     'public/common/file_chooser_params.cc',
45     'public/common/file_chooser_params.h',
46     'public/common/frame_navigate_params.cc',
47     'public/common/frame_navigate_params.h',
48     'public/common/geoposition.cc',
49     'public/common/geoposition.h',
50     'public/common/gpu_memory_stats.cc',
51     'public/common/gpu_memory_stats.h',
52     'public/common/injection_test_mac.h',
53     'public/common/injection_test_win.h',
54     'public/common/javascript_message_type.h',
55     'public/common/main_function_params.h',
56     'public/common/media_stream_request.cc',
57     'public/common/media_stream_request.h',
58     'public/common/page_state.cc',
59     'public/common/page_state_ios.cc',
60     'public/common/page_state_webkit.cc',
61     'public/common/page_state.h',
62     'public/common/page_transition_types.cc',
63     'public/common/page_transition_types.h',
64     'public/common/page_transition_types_list.h',
65     'public/common/page_type.h',
66     'public/common/page_zoom.h',
67     'public/common/password_form.cc',
68     'public/common/password_form.h',
69     'public/common/pepper_plugin_info.cc',
70     'public/common/pepper_plugin_info.h',
71     'public/common/process_type.h',
72     'public/common/referrer.h',
73     'public/common/renderer_preferences.cc',
74     'public/common/renderer_preferences.h',
75     'public/common/resource_dispatcher_delegate.h',
76     'public/common/resource_response.h',
77     'public/common/result_codes.h',
78     'public/common/result_codes_list.h',
79     'public/common/sandbox_init.h',
80     'public/common/sandbox_linux.h',
81     'public/common/sandbox_type_mac.h',
82     'public/common/sandboxed_process_launcher_delegate.h',
83     'public/common/security_style.h',
84     'public/common/show_desktop_notification_params.cc',
85     'public/common/show_desktop_notification_params.h',
86     'public/common/speech_recognition_error.h',
87     'public/common/speech_recognition_grammar.h',
88     'public/common/speech_recognition_result.h',
89     'public/common/speech_recognition_result.cc',
90     'public/common/ssl_status.cc',
91     'public/common/ssl_status.h',
92     'public/common/stop_find_action.h',
93     'public/common/three_d_api_types.h',
94     'public/common/top_controls_state.h',
95     'public/common/top_controls_state_list.h',
96     'public/common/url_constants.cc',
97     'public/common/url_constants.h',
98     'public/common/url_fetcher.h',
99     'public/common/url_utils.cc',
100     'public/common/url_utils.h',
101     'public/common/zygote_fork_delegate_linux.h',
102     'common/accessibility_messages.h',
103     'common/accessibility_notification.h',
104     'common/accessibility_node_data.cc',
105     'common/accessibility_node_data.h',
106     'common/all_messages.h',
107     'common/android/address_parser.cc',
108     'common/android/address_parser.h',
109     'common/android/address_parser_internal.cc',
110     'common/android/address_parser_internal.h',
111     'common/android/command_line.cc',
112     'common/android/command_line.h',
113     'common/android/common_jni_registrar.cc',
114     'common/android/common_jni_registrar.h',
115     'common/android/device_telephony_info.cc',
116     'common/android/device_telephony_info.h',
117     'common/android/hash_set.cc',
118     'common/android/hash_set.h',
119     'common/android/surface_texture_peer.cc',
120     'common/android/surface_texture_peer.h',
121     'common/android/trace_event_binding.cc',
122     'common/android/trace_event_binding.h',
123     'common/appcache/appcache_backend_proxy.cc',
124     'common/appcache/appcache_backend_proxy.h',
125     'common/appcache/appcache_dispatcher.cc',
126     'common/appcache/appcache_dispatcher.h',
127     'common/appcache_messages.h',
128     'common/browser_plugin/browser_plugin_constants.cc',
129     'common/browser_plugin/browser_plugin_constants.h',
130     'common/browser_plugin/browser_plugin_message_enums.h',
131     'common/browser_plugin/browser_plugin_messages.h',
132     'common/browser_rendering_stats.cc',
133     'common/browser_rendering_stats.h',
134     'common/cc_messages.cc',
135     'common/cc_messages.h',
136     'common/child_process_host_impl.cc',
137     'common/child_process_host_impl.h',
138     'common/child_process_messages.h',
139     'common/child_process_sandbox_support_impl_linux.cc',
140     'common/child_process_sandbox_support_impl_linux.h',
141     'common/child_process_sandbox_support_impl_shm_linux.cc',
142     'common/clipboard_messages.cc',
143     'common/clipboard_messages.h',
144     'common/content_constants_internal.cc',
145     'common/content_constants_internal.h',
146     'common/content_export.h',
147     'common/content_ipc_logging.cc',
148     'common/content_message_generator.cc',
149     'common/content_message_generator.h',
150     'common/content_param_traits.cc',
151     'common/content_param_traits.h',
152     'common/content_param_traits_macros.h',
153     'common/content_paths.cc',
154     'common/database_messages.h',
155     'common/db_message_filter.cc',
156     'common/db_message_filter.h',
157     'common/desktop_notification_messages.h',
158     'common/device_motion_messages.h',
159     'common/device_orientation_messages.h',
160     'common/devtools_messages.h',
161     'common/dom_storage_messages.h',
162     'common/drag_event_source_info.h',
163     'common/drag_messages.h',
164     'common/drag_traits.h',
165     'common/edit_command.h',
166     'common/file_utilities_messages.h',
167     'common/fileapi/file_system_messages.h',
168     'common/fileapi/webblob_messages.h',
169     'common/find_match_rect_android.cc',
170     'common/find_match_rect_android.h',
171     'common/font_cache_dispatcher_win.cc',
172     'common/font_cache_dispatcher_win.h',
173     'common/font_config_ipc_linux.cc',
174     'common/font_config_ipc_linux.h',
175     'common/font_list.cc',
176     'common/font_list.h',
177     'common/font_list_android.cc',
178     'common/font_list_mac.mm',
179     'common/font_list_pango.cc',
180     'common/font_list_win.cc',
181     'common/gamepad_hardware_buffer.h',
182     'common/gamepad_messages.h',
183     'common/gamepad_seqlock.cc',
184     'common/gamepad_seqlock.h',
185     'common/gamepad_user_gesture.cc',
186     'common/gamepad_user_gesture.h',
187     'common/geolocation_messages.h',
188     'common/gpu/client/command_buffer_proxy_impl.cc',
189     'common/gpu/client/command_buffer_proxy_impl.h',
190     'common/gpu/client/context_provider_command_buffer.cc',
191     'common/gpu/client/context_provider_command_buffer.h',
192     'common/gpu/client/gl_helper.cc',
193     'common/gpu/client/gl_helper.h',
194     'common/gpu/client/gl_helper_scaling.cc',
195     'common/gpu/client/gl_helper_scaling.h',
196     'common/gpu/client/gpu_channel_host.cc',
197     'common/gpu/client/gpu_channel_host.h',
198     'common/gpu/client/gpu_video_decode_accelerator_host.cc',
199     'common/gpu/client/gpu_video_decode_accelerator_host.h',
200     'common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc',
201     'common/gpu/client/webgraphicscontext3d_command_buffer_impl.h',
202     'common/gpu/gpu_channel.cc',
203     'common/gpu/gpu_channel.h',
204     'common/gpu/gpu_channel_manager.cc',
205     'common/gpu/gpu_channel_manager.h',
206     'common/gpu/gpu_command_buffer_stub.cc',
207     'common/gpu/gpu_command_buffer_stub.h',
208     'common/gpu/gpu_config.h',
209     'common/gpu/gpu_memory_allocation.h',
210     'common/gpu/gpu_memory_manager.cc',
211     'common/gpu/gpu_memory_manager.h',
212     'common/gpu/gpu_memory_manager_client.cc',
213     'common/gpu/gpu_memory_manager_client.h',
214     'common/gpu/gpu_memory_tracking.cc',
215     'common/gpu/gpu_memory_tracking.h',
216     'common/gpu/gpu_memory_uma_stats.h',
217     'common/gpu/gpu_messages.h',
218     'common/gpu/gpu_process_launch_causes.h',
219     'common/gpu/gpu_rendering_stats.cc',
220     'common/gpu/gpu_rendering_stats.h',
221     'common/gpu/gpu_surface_lookup.h',
222     'common/gpu/gpu_surface_lookup.cc',
223     'common/gpu/stream_texture_manager_android.cc',
224     'common/gpu/stream_texture_manager_android.h',
225     'common/gpu/gpu_watchdog.h',
226     'common/gpu/image_transport_surface.h',
227     'common/gpu/image_transport_surface.cc',
228     'common/gpu/image_transport_surface_android.cc',
229     'common/gpu/image_transport_surface_linux.cc',
230     'common/gpu/image_transport_surface_mac.cc',
231     'common/gpu/image_transport_surface_win.cc',
232     'common/gpu/media/h264_bit_reader.cc',
233     'common/gpu/media/h264_bit_reader.h',
234     'common/gpu/media/h264_parser.cc',
235     'common/gpu/media/h264_parser.h',
236     'common/gpu/media/gpu_video_decode_accelerator.cc',
237     'common/gpu/media/gpu_video_decode_accelerator.h',
238     'common/gpu/sync_point_manager.h',
239     'common/gpu/sync_point_manager.cc',
240     'common/gpu/texture_image_transport_surface.h',
241     'common/gpu/texture_image_transport_surface.cc',
242     'common/handle_enumerator_win.cc',
243     'common/handle_enumerator_win.h',
244     'common/image_messages.h',
245     'common/indexed_db/indexed_db_key.cc',
246     'common/indexed_db/indexed_db_key.h',
247     'common/indexed_db/indexed_db_key_path.cc',
248     'common/indexed_db/indexed_db_key_path.h',
249     'common/indexed_db/indexed_db_key_range.cc',
250     'common/indexed_db/indexed_db_key_range.h',
251     'common/indexed_db/indexed_db_messages.h',
252     'common/indexed_db/indexed_db_param_traits.cc',
253     'common/indexed_db/indexed_db_param_traits.h',
254     'common/input_messages.h',
255     'common/inter_process_time_ticks_converter.cc',
256     'common/inter_process_time_ticks_converter.h',
257     'common/java_bridge_messages.h',
258     'common/mac/attributed_string_coder.h',
259     'common/mac/attributed_string_coder.mm',
260     'common/mac/font_descriptor.h',
261     'common/mac/font_descriptor.mm',
262     'common/mac/font_loader.h',
263     'common/mac/font_loader.mm',
264     'common/media/audio_messages.h',
265     'common/media/media_param_traits.cc',
266     'common/media/media_param_traits.h',
267     'common/media/media_player_messages_android.h',
268     'common/media/media_stream_messages.h',
269     'common/media/media_stream_options.cc',
270     'common/media/media_stream_options.h',
271     'common/media/video_capture.h',
272     'common/media/video_capture_messages.h',
273     'common/memory_benchmark_messages.h',
274     'common/message_router.cc',
275     'common/message_router.h',
276     'common/mime_registry_messages.h',
277     'common/navigation_gesture.h',
278     'common/net/url_fetcher.cc',
279     'common/net/url_request_user_data.cc',
280     'common/net/url_request_user_data.h',
281     'common/p2p_messages.h',
282     'common/p2p_sockets.h',
283     'common/page_zoom.cc',
284     'common/pepper_messages.h',
285     'common/pepper_plugin_registry.cc',
286     'common/pepper_plugin_registry.h',
287     'common/pepper_renderer_instance_data.cc',
288     'common/pepper_renderer_instance_data.h',
289     'common/plugin_carbon_interpose_constants_mac.cc',
290     'common/plugin_carbon_interpose_constants_mac.h',
291     'common/plugin_process_messages.h',
292     'common/process_type.cc',
293     'common/quota_messages.h',
294     'common/resource_messages.cc',
295     'common/resource_messages.h',
296     'common/sandbox_init_mac.cc',
297     'common/sandbox_init_mac.h',
298     'common/sandbox_init_win.cc',
299     'common/sandbox_mac.h',
300     'common/sandbox_mac.mm',
301     'common/sandbox_linux.h',
302     'common/sandbox_linux.cc',
303     'common/sandbox_seccomp_bpf_linux.cc',
304     'common/sandbox_seccomp_bpf_linux.h',
305     'common/sandbox_util.cc',
306     'common/sandbox_util.h',
307     'common/sandbox_win.cc',
308     'common/sandbox_win.h',
309     'common/savable_url_schemes.cc',
310     'common/savable_url_schemes.h',
311     'common/set_process_title.cc',
312     'common/set_process_title.h',
313     'common/set_process_title_linux.cc',
314     'common/set_process_title_linux.h',
315     'common/socket_stream.h',
316     'common/socket_stream_handle_data.cc',
317     'common/socket_stream_handle_data.h',
318     'common/socket_stream_messages.h',
319     'common/speech_recognition_messages.h',
320     'common/ssl_status_serialization.cc',
321     'common/ssl_status_serialization.h',
322     'common/swapped_out_messages.cc',
323     'common/swapped_out_messages.h',
324     'common/text_input_client_messages.h',
325     'common/url_schemes.cc',
326     'common/url_schemes.h',
327     'common/utility_messages.h',
328     'common/view_messages.h',
329     'common/view_message_enums.h',
330     'common/websocket.h',
331     'common/websocket_messages.h',
332     'common/worker_messages.h',
333     'common/zygote_commands_linux.h',
334     'port/common/input_event_ack_state.h',
335     'public/common/common_param_traits.cc',
336     'public/common/common_param_traits.h',
337     'public/common/common_param_traits_macros.h',
338     'public/common/content_client.cc',
339     'public/common/content_client.h',
340     'public/common/window_container_type.cc',
341     'public/common/window_container_type.h',
342   ],
343   'conditions': [
344     ['OS=="ios"', {
345       'sources/': [
346         # iOS only needs a small portion of content; exclude all the
347         # implementation, and re-include what is used.
348         ['exclude', '\\.(cc|mm)$'],
349         ['include', '_ios\\.(cc|mm)$'],
350         ['include', '^public/common/content_client\\.cc$'],
351         ['include', '^public/common/content_constants\\.cc$'],
352         ['include', '^public/common/content_switches\\.cc$'],
353         ['include', '^public/common/frame_navigate_params\\.cc$'],
354         ['include', '^public/common/media_stream_request\\.cc$'],
355         ['include', '^public/common/page_state\\.cc$'],
356         ['include', '^public/common/page_transition_types\\.cc$'],
357         ['include', '^public/common/password_form\\.cc$'],
358         ['include', '^public/common/speech_recognition_result\\.cc$'],
359         ['include', '^public/common/ssl_status\\.cc$'],
360         ['include', '^public/common/url_constants\\.cc$'],
361         ['include', '^common/content_paths\\.cc$'],
362         ['include', '^common/media/media_stream_options\\.cc$'],
363         ['include', '^common/net/url_fetcher\\.cc$'],
364         ['include', '^common/net/url_request_user_data\\.cc$'],
365         ['include', '^common/savable_url_schemes\\.cc$'],
366         ['include', '^common/url_schemes\\.cc$'],
367       ],
368     }, {  # OS!="ios"
369       'dependencies': [
370         '../cc/cc.gyp:cc',
371         '../gpu/gpu.gyp:gles2_c_lib',
372         '../gpu/gpu.gyp:gles2_implementation',
373         '../gpu/gpu.gyp:gpu_ipc',
374         '../ipc/ipc.gyp:ipc',
375         '../media/media.gyp:shared_memory_support',
376         '../third_party/WebKit/public/blink.gyp:blink',
377         '../ui/gl/gl.gyp:gl',
378         '../webkit/base/webkit_base.gyp:webkit_base',
379         '../webkit/storage_browser.gyp:webkit_storage_browser',
380         '../webkit/storage_common.gyp:webkit_storage_common',
381         '../webkit/support/webkit_support.gyp:glue',
382       ],
383     }],
384     ['OS=="android"',{
385       'link_settings': {
386         'libraries': [
387           '-landroid',  # ANativeWindow
388         ],
389       },
390      'dependencies': [
391         'content.gyp:content_jni_headers',
392         'content.gyp:common_aidl',
393       ],
394     }],
395     ['toolkit_uses_gtk == 1', {
396       'dependencies': [
397         '../build/linux/system.gyp:gtk',
398       ],
399     }],
400     ['use_pango == 1', {
401       'dependencies': [
402         '../build/linux/system.gyp:pangocairo',
403       ],
404     }, {  # use_pango == 0
405       'sources!': [
406         'common/font_list_pango.cc',
407       ],
408     }],
409     ['use_x11 == 1', {
410       'include_dirs': [
411         '<(DEPTH)/third_party/khronos',
412       ],
413       'link_settings': {
414         'libraries': [
415           '-lXcomposite',
416         ],
417       },
418     }],
419     ['use_x11 == 1 and (target_arch != "arm" or chromeos == 0)', {
420       'sources': [
421         'common/gpu/x_util.cc',
422         'common/gpu/x_util.h',
423       ],
424     }],
425     ['enable_plugins==1', {
426       'dependencies': [
427         '../ppapi/ppapi_internal.gyp:ppapi_shared',
428       ],
429     }, {  # enable_plugins == 0
430       'sources!': [
431         'common/pepper_plugin_registry.cc',
432         'common/pepper_plugin_registry.h',
433       ],
434     }],
435     ['enable_gpu==1', {
436       'dependencies': [
437         '../gpu/gpu.gyp:command_buffer_service',
438       ],
439     }],
440     ['OS=="android"', {
441       'dependencies': [
442         '../media/media.gyp:media',
443       ],
444       'sources': [
445         'common/gpu/media/android_video_decode_accelerator.cc',
446         'common/gpu/media/android_video_decode_accelerator.h',
447       ],
448     }],
449     ['target_arch=="arm" and chromeos == 1 and use_x11 == 1', {
450       'dependencies': [
451         '../media/media.gyp:media',
452       ],
453       'sources': [
454         'common/gpu/media/exynos_video_decode_accelerator.cc',
455         'common/gpu/media/exynos_video_decode_accelerator.h',
456         'common/gpu/media/gles2_texture_to_egl_image_translator.cc',
457         'common/gpu/media/gles2_texture_to_egl_image_translator.h',
458         'common/gpu/media/omx_video_decode_accelerator.cc',
459         'common/gpu/media/omx_video_decode_accelerator.h',
460       ],
461       'include_dirs': [
462         '<(DEPTH)/third_party/khronos',
463         '<(DEPTH)/third_party/openmax/il',
464       ],
465       'link_settings': {
466         'libraries': [
467           '-lEGL',
468           '-lGLESv2',
469         ],
470       },
471     }],
472     ['target_arch != "arm" and chromeos == 1 and use_x11 == 1', {
473       'sources': [
474         'common/gpu/media/h264_dpb.cc',
475         'common/gpu/media/h264_dpb.h',
476         'common/gpu/media/va_surface.h',
477         'common/gpu/media/vaapi_h264_decoder.cc',
478         'common/gpu/media/vaapi_h264_decoder.h',
479         'common/gpu/media/vaapi_video_decode_accelerator.cc',
480         'common/gpu/media/vaapi_video_decode_accelerator.h',
481         'common/gpu/media/vaapi_wrapper.cc',
482         'common/gpu/media/vaapi_wrapper.h',
483       ],
484       'include_dirs': [
485         '<(DEPTH)/third_party/libva',
486       ],
487     }],
488     ['OS=="win"', {
489       'dependencies': [
490         '../media/media.gyp:media',
491         '../ui/gl/gl.gyp:gl',
492       ],
493       'link_settings': {
494         'libraries': [
495            '-ld3d9.lib',
496            '-ldxva2.lib',
497            '-lstrmiids.lib',
498            '-lmf.lib',
499            '-lmfplat.lib',
500            '-lmfuuid.lib',
501         ],
502         'msvs_settings': {
503           'VCLinkerTool': {
504             'DelayLoadDLLs': [
505               'd3d9.dll',
506               'dxva2.dll',
507               'mf.dll',
508               'mfplat.dll',
509             ],
510           },
511         },
512       },
513       'sources': [
514         'common/gpu/media/dxva_video_decode_accelerator.cc',
515         'common/gpu/media/dxva_video_decode_accelerator.h',
516       ],
517       'include_dirs': [
518         '<(DEPTH)/third_party/khronos',
519       ],
520     }],
521     ['OS=="win" and directxsdk_exists=="True"', {
522       'actions': [
523       {
524         'action_name': 'extract_xinput',
525         'variables': {
526           'input': 'APR2007_xinput_x86.cab',
527           'output': 'xinput1_3.dll',
528         },
529         'inputs': [
530           '../third_party/directxsdk/files/Redist/<(input)',
531         ],
532         'outputs': [
533           '<(PRODUCT_DIR)/<(output)',
534         ],
535         'action': [
536           'python',
537         '../build/extract_from_cab.py',
538         '..\\third_party\\directxsdk\\files\\Redist\\<(input)',
539         '<(output)',
540         '<(PRODUCT_DIR)',
541         ],
542         'msvs_cygwin_shell': 1,
543       },
544      ]
545     }],
546   ],