naiveproxy/ppapi/proxy/BUILD.gn
2018-01-28 13:32:06 -05:00

398 lines
11 KiB
Plaintext

# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/nacl/config.gni")
config("proxy_implementation") {
defines = [ "PPAPI_PROXY_IMPLEMENTATION" ]
}
component("proxy") {
output_name = "ppapi_proxy"
sources = [
# Take some standalone files from the C++ wrapper allowing us to more
# easily make async callbacks in the proxy. We can't depend on the
# full C++ wrappers at this layer since the C++ wrappers expect
# symbols defining the globals for "being a plugin" which we are not.
# These callback files are standalone.
"../cpp/completion_callback.h",
"../utility/completion_callback_factory.h",
"audio_buffer_resource.cc",
"audio_buffer_resource.h",
"audio_encoder_resource.cc",
"audio_encoder_resource.h",
"broker_resource.cc",
"broker_resource.h",
"camera_capabilities_resource.cc",
"camera_capabilities_resource.h",
"camera_device_resource.cc",
"camera_device_resource.h",
"compositor_layer_resource.cc",
"compositor_layer_resource.h",
"compositor_resource.cc",
"compositor_resource.h",
"connection.h",
"dispatcher.cc",
"dispatcher.h",
"enter_proxy.h",
"error_conversion.cc",
"error_conversion.h",
"file_chooser_resource.cc",
"file_chooser_resource.h",
"file_io_resource.cc",
"file_io_resource.h",
"file_ref_resource.cc",
"file_ref_resource.h",
"file_system_resource.cc",
"file_system_resource.h",
"gamepad_resource.cc",
"gamepad_resource.h",
"graphics_2d_resource.cc",
"graphics_2d_resource.h",
"host_resolver_private_resource.cc",
"host_resolver_private_resource.h",
"host_resolver_resource.cc",
"host_resolver_resource.h",
"host_resolver_resource_base.cc",
"host_resolver_resource_base.h",
"interface_list.cc",
"interface_list.h",
"interface_proxy.cc",
"interface_proxy.h",
"isolated_file_system_private_resource.cc",
"isolated_file_system_private_resource.h",
"locking_resource_releaser.h",
"media_stream_audio_track_resource.cc",
"media_stream_audio_track_resource.h",
"media_stream_track_resource_base.cc",
"media_stream_track_resource_base.h",
"media_stream_video_track_resource.cc",
"media_stream_video_track_resource.h",
"message_handler.cc",
"message_handler.h",
"net_address_resource.cc",
"net_address_resource.h",
"network_list_resource.cc",
"network_list_resource.h",
"network_monitor_resource.cc",
"network_monitor_resource.h",
"network_proxy_resource.cc",
"network_proxy_resource.h",
"output_protection_resource.cc",
"output_protection_resource.h",
"plugin_array_buffer_var.cc",
"plugin_array_buffer_var.h",
"plugin_dispatcher.cc",
"plugin_dispatcher.h",
"plugin_globals.cc",
"plugin_globals.h",
"plugin_message_filter.cc",
"plugin_message_filter.h",
"plugin_resource.cc",
"plugin_resource.h",
"plugin_resource_tracker.cc",
"plugin_resource_tracker.h",
"plugin_resource_var.cc",
"plugin_resource_var.h",
"plugin_var_serialization_rules.cc",
"plugin_var_serialization_rules.h",
"plugin_var_tracker.cc",
"plugin_var_tracker.h",
"ppapi_command_buffer_proxy.cc",
"ppapi_command_buffer_proxy.h",
"ppapi_messages.h",
"ppb_audio_proxy.cc",
"ppb_audio_proxy.h",
"ppb_core_proxy.cc",
"ppb_core_proxy.h",
"ppb_graphics_3d_proxy.cc",
"ppb_graphics_3d_proxy.h",
"ppb_image_data_proxy.cc",
"ppb_image_data_proxy.h",
"ppb_instance_proxy.cc",
"ppb_instance_proxy.h",
"ppb_message_loop_proxy.cc",
"ppb_message_loop_proxy.h",
"ppb_testing_proxy.cc",
"ppb_testing_proxy.h",
"ppb_x509_certificate_private_proxy.cc",
"ppb_x509_certificate_private_proxy.h",
"ppp_class_proxy.cc",
"ppp_class_proxy.h",
"ppp_find_proxy.cc",
"ppp_find_proxy.h",
"ppp_graphics_3d_proxy.cc",
"ppp_graphics_3d_proxy.h",
"ppp_input_event_proxy.cc",
"ppp_input_event_proxy.h",
"ppp_instance_proxy.cc",
"ppp_instance_proxy.h",
"ppp_messaging_proxy.cc",
"ppp_messaging_proxy.h",
"ppp_mouse_lock_proxy.cc",
"ppp_mouse_lock_proxy.h",
"ppp_pdf_proxy.cc",
"ppp_pdf_proxy.h",
"ppp_printing_proxy.cc",
"ppp_printing_proxy.h",
"ppp_text_input_proxy.cc",
"ppp_text_input_proxy.h",
"printing_resource.cc",
"printing_resource.h",
"proxy_array_output.cc",
"proxy_array_output.h",
"proxy_channel.cc",
"proxy_channel.h",
"proxy_completion_callback_factory.h",
"proxy_module.cc",
"proxy_module.h",
"proxy_object_var.cc",
"proxy_object_var.h",
"resource_creation_proxy.cc",
"resource_creation_proxy.h",
"resource_reply_thread_registrar.cc",
"resource_reply_thread_registrar.h",
"tcp_server_socket_private_resource.cc",
"tcp_server_socket_private_resource.h",
"tcp_socket_private_resource.cc",
"tcp_socket_private_resource.h",
"tcp_socket_resource.cc",
"tcp_socket_resource.h",
"tcp_socket_resource_base.cc",
"tcp_socket_resource_base.h",
"truetype_font_resource.cc",
"truetype_font_resource.h",
"truetype_font_singleton_resource.cc",
"truetype_font_singleton_resource.h",
"udp_socket_filter.cc",
"udp_socket_filter.h",
"udp_socket_private_resource.cc",
"udp_socket_private_resource.h",
"udp_socket_resource.cc",
"udp_socket_resource.h",
"udp_socket_resource_base.cc",
"udp_socket_resource_base.h",
"uma_private_resource.cc",
"uma_private_resource.h",
"url_loader_resource.cc",
"url_loader_resource.h",
"url_request_info_resource.cc",
"url_request_info_resource.h",
"url_response_info_resource.cc",
"url_response_info_resource.h",
"var_serialization_rules.h",
"video_decoder_resource.cc",
"video_decoder_resource.h",
"video_destination_resource.cc",
"video_destination_resource.h",
"video_encoder_resource.cc",
"video_encoder_resource.h",
"video_frame_resource.cc",
"video_frame_resource.h",
"video_source_resource.cc",
"video_source_resource.h",
"vpn_provider_resource.cc",
"vpn_provider_resource.h",
"websocket_resource.cc",
"websocket_resource.h",
]
if (is_nacl) {
sources += [
"../nacl_irt/irt_interfaces.cc",
"../nacl_irt/irt_interfaces.h",
"../nacl_irt/irt_pnacl_translator_compile.cc",
"../nacl_irt/irt_pnacl_translator_link.cc",
"../nacl_irt/irt_ppapi.cc",
"../nacl_irt/irt_ppapi.h",
"../nacl_irt/irt_start.cc",
"../nacl_irt/manifest_service.cc",
"../nacl_irt/manifest_service.h",
"../nacl_irt/plugin_startup.cc",
"../nacl_irt/plugin_startup.h",
"../nacl_irt/ppapi_dispatcher.cc",
"../nacl_irt/ppapi_dispatcher.h",
]
} else {
sources += [
"audio_input_resource.cc",
"audio_input_resource.h",
"audio_output_resource.cc",
"audio_output_resource.h",
"broker_dispatcher.cc",
"broker_dispatcher.h",
"browser_font_singleton_resource.cc",
"browser_font_singleton_resource.h",
"device_enumeration_resource_helper.cc",
"device_enumeration_resource_helper.h",
"flash_clipboard_resource.cc",
"flash_clipboard_resource.h",
"flash_drm_resource.cc",
"flash_drm_resource.h",
"flash_file_resource.cc",
"flash_file_resource.h",
"flash_font_file_resource.cc",
"flash_font_file_resource.h",
"flash_fullscreen_resource.cc",
"flash_fullscreen_resource.h",
"flash_menu_resource.cc",
"flash_menu_resource.h",
"flash_resource.cc",
"flash_resource.h",
"host_dispatcher.cc",
"host_dispatcher.h",
"host_var_serialization_rules.cc",
"host_var_serialization_rules.h",
"pdf_resource.cc",
"pdf_resource.h",
"platform_verification_private_resource.cc",
"platform_verification_private_resource.h",
"ppb_broker_proxy.cc",
"ppb_broker_proxy.h",
"ppb_buffer_proxy.cc",
"ppb_buffer_proxy.h",
"ppb_flash_message_loop_proxy.cc",
"ppb_flash_message_loop_proxy.h",
"ppb_var_deprecated_proxy.cc",
"ppb_var_deprecated_proxy.h",
"ppb_video_decoder_proxy.cc",
"ppb_video_decoder_proxy.h",
"ppp_content_decryptor_private_proxy.cc",
"ppp_content_decryptor_private_proxy.h",
"ppp_instance_private_proxy.cc",
"ppp_instance_private_proxy.h",
"ppp_video_decoder_proxy.cc",
"ppp_video_decoder_proxy.h",
"video_capture_resource.cc",
"video_capture_resource.h",
]
}
configs += [
":proxy_implementation",
"//build/config:precompiled_headers",
]
public_deps = [
"//ipc",
"//ppapi/proxy:ipc_sources",
]
deps = [
":common",
"//base",
"//gpu/command_buffer/client:gles2_implementation",
"//gpu/ipc/common:command_buffer_traits",
"//media:shared_memory_support",
"//mojo/edk/system",
"//ppapi/c",
"//ppapi/shared_impl",
"//ui/gfx/geometry",
"//ui/gfx/ipc/geometry",
]
if (!is_nacl) {
deps += [
"//base/third_party/dynamic_annotations",
"//gin",
"//skia",
"//ui/events:events_base",
"//ui/surface",
]
}
if (!is_nacl_nonsfi) {
deps += [ "//third_party/icu" ]
}
}
source_set("common") {
sources = [
"tcp_socket_resource_constants.h",
"udp_socket_resource_constants.h",
]
}
group("ipc") {
if (is_component_build) {
public_deps = [
"//ppapi/proxy",
]
} else {
public_deps = [
":ipc_sources",
]
}
}
source_set("ipc_sources") {
sources = [
"nacl_message_scanner.cc",
"nacl_message_scanner.h",
"ppapi_message_utils.h",
"ppapi_messages.cc",
"ppapi_messages.h",
"ppapi_param_traits.cc",
"ppapi_param_traits.h",
"raw_var_data.cc",
"raw_var_data.h",
"resource_message_params.cc",
"resource_message_params.h",
"serialized_flash_menu.cc",
"serialized_flash_menu.h",
"serialized_handle.cc",
"serialized_handle.h",
"serialized_structs.cc",
"serialized_structs.h",
"serialized_var.cc",
"serialized_var.h",
"var_serialization_rules.h",
]
if (is_nacl) {
sources -= [ "serialized_flash_menu.cc" ]
}
configs += [ ":proxy_implementation" ]
deps = [
"//base",
"//gpu/ipc/common:command_buffer_traits",
"//ppapi/c",
"//ppapi/shared_impl",
]
public_deps = [
"//ipc",
]
if (!is_nacl) {
deps += [ "//skia" ]
}
}
static_library("test_support") {
testonly = true
sources = [
"ppapi_proxy_test.cc",
"ppapi_proxy_test.h",
"resource_message_test_sink.cc",
"resource_message_test_sink.h",
]
public_deps = [
":proxy",
]
deps = [
"//base/test:test_support",
"//ipc",
"//ipc:test_support",
"//ppapi/proxy",
"//ppapi/shared_impl",
"//testing/gmock",
"//testing/gtest",
]
}