diff options
Diffstat (limited to 'chromium/ppapi')
94 files changed, 1144 insertions, 4633 deletions
diff --git a/chromium/ppapi/BUILD.gn b/chromium/ppapi/BUILD.gn index a338feda5d0..323dd021014 100644 --- a/chromium/ppapi/BUILD.gn +++ b/chromium/ppapi/BUILD.gn @@ -3,13 +3,149 @@ # found in the LICENSE file. import("//build/config/features.gni") +import("//build/config/features.gni") +import("//build/config/nacl/config.gni") +import("//build/config/nacl/rules.gni") +import("//testing/test.gni") +if (is_mac) { + import("//build/config/mac/rules.gni") +} assert(!is_android || enable_plugins, "//ppapi should not be referenced when is_android && !enable_plugins") -if (is_mac) { - import("//build/config/mac/rules.gni") -} +# Test files shared between several targets below. +# +# TODO(brettw) it seems like it should be possible to factor this in a source +# set that is shared in such a way that these only need to be referenced once. +test_common_source_files = [ + "lib/gl/gles2/gl2ext_ppapi.c", + "lib/gl/gles2/gl2ext_ppapi.h", + "lib/gl/gles2/gles2.c", + "tests/all_c_includes.h", + "tests/all_cpp_includes.h", + "tests/arch_dependent_sizes_32.h", + "tests/arch_dependent_sizes_64.h", + "tests/pp_thread.h", + "tests/test_audio.cc", + "tests/test_audio.h", + "tests/test_audio_config.cc", + "tests/test_audio_config.h", + "tests/test_audio_encoder.cc", + "tests/test_audio_encoder.h", + "tests/test_case.cc", + "tests/test_case.h", + "tests/test_compositor.cc", + "tests/test_compositor.h", + "tests/test_console.cc", + "tests/test_console.h", + "tests/test_core.cc", + "tests/test_core.h", + "tests/test_cursor_control.cc", + "tests/test_cursor_control.h", + "tests/test_empty.cc", + "tests/test_empty.h", + "tests/test_file_io.cc", + "tests/test_file_io.h", + "tests/test_file_ref.cc", + "tests/test_file_ref.h", + "tests/test_file_system.cc", + "tests/test_file_system.h", + "tests/test_fullscreen.cc", + "tests/test_fullscreen.h", + "tests/test_graphics_2d.cc", + "tests/test_graphics_2d.h", + "tests/test_graphics_3d.cc", + "tests/test_graphics_3d.h", + "tests/test_host_resolver.cc", + "tests/test_host_resolver.h", + "tests/test_host_resolver_private.cc", + "tests/test_host_resolver_private.h", + "tests/test_host_resolver_private_disallowed.cc", + "tests/test_host_resolver_private_disallowed.h", + "tests/test_image_data.cc", + "tests/test_image_data.h", + "tests/test_ime_input_event.cc", + "tests/test_ime_input_event.h", + "tests/test_input_event.cc", + "tests/test_input_event.h", + "tests/test_media_stream_audio_track.cc", + "tests/test_media_stream_audio_track.h", + "tests/test_media_stream_video_track.cc", + "tests/test_media_stream_video_track.h", + "tests/test_memory.cc", + "tests/test_memory.h", + "tests/test_message_handler.cc", + "tests/test_message_handler.h", + "tests/test_message_loop.cc", + "tests/test_message_loop.h", + "tests/test_mouse_cursor.cc", + "tests/test_mouse_cursor.h", + "tests/test_mouse_lock.cc", + "tests/test_mouse_lock.h", + "tests/test_net_address.cc", + "tests/test_net_address.h", + "tests/test_net_address_private_untrusted.cc", + "tests/test_net_address_private_untrusted.h", + "tests/test_network_monitor.cc", + "tests/test_network_monitor.h", + "tests/test_network_proxy.cc", + "tests/test_network_proxy.h", + "tests/test_output_protection_private.cc", + "tests/test_output_protection_private.h", + "tests/test_paint_aggregator.cc", + "tests/test_paint_aggregator.h", + "tests/test_post_message.cc", + "tests/test_post_message.h", + "tests/test_printing.cc", + "tests/test_printing.h", + "tests/test_tcp_server_socket_private.cc", + "tests/test_tcp_server_socket_private.h", + "tests/test_tcp_socket.cc", + "tests/test_tcp_socket.h", + "tests/test_tcp_socket_private.cc", + "tests/test_tcp_socket_private.h", + "tests/test_test_internals.cc", + "tests/test_test_internals.h", + "tests/test_trace_event.cc", + "tests/test_trace_event.h", + "tests/test_truetype_font.cc", + "tests/test_truetype_font.h", + "tests/test_udp_socket.cc", + "tests/test_udp_socket.h", + "tests/test_udp_socket_private.cc", + "tests/test_udp_socket_private.h", + "tests/test_uma.cc", + "tests/test_uma.h", + "tests/test_url_loader.cc", + "tests/test_url_loader.h", + "tests/test_url_request.cc", + "tests/test_url_request.h", + "tests/test_utils.cc", + "tests/test_var.cc", + "tests/test_var.h", + "tests/test_var_resource.cc", + "tests/test_var_resource.h", + "tests/test_video_decoder.cc", + "tests/test_video_decoder.h", + "tests/test_video_destination.cc", + "tests/test_video_destination.h", + "tests/test_video_encoder.cc", + "tests/test_video_encoder.h", + "tests/test_video_source.cc", + "tests/test_video_source.h", + "tests/test_view.cc", + "tests/test_view.h", + "tests/test_websocket.cc", + "tests/test_websocket.h", + "tests/testing_instance.cc", + "tests/testing_instance.h", + + # Compile-time tests + "tests/test_c_includes.c", + "tests/test_cpp_includes.cc", + "tests/test_struct_sizes.c", +] copy("copy_test_files") { visibility = [ ":*" ] @@ -35,15 +171,57 @@ copy("copy_test_files2") { ] } -import("//build/config/features.gni") -import("//build/config/nacl/config.gni") -import("//build/config/nacl/rules.gni") -import("//ppapi/ppapi_sources.gni") -import("//testing/test.gni") - source_set("ppapi_tests_sources") { - sources = ppapi_sources.test_common_source_files + - ppapi_sources.test_trusted_source_files + sources = test_common_source_files + sources += [ + "tests/test_broker.cc", + "tests/test_broker.h", + "tests/test_browser_font.cc", + "tests/test_browser_font.h", + "tests/test_buffer.cc", + "tests/test_buffer.h", + "tests/test_char_set.cc", + "tests/test_char_set.h", + "tests/test_crypto.cc", + "tests/test_crypto.h", + "tests/test_file_chooser.cc", + "tests/test_file_chooser.h", + "tests/test_flash.cc", + "tests/test_flash.h", + "tests/test_flash_clipboard.cc", + "tests/test_flash_clipboard.h", + "tests/test_flash_drm.cc", + "tests/test_flash_drm.h", + "tests/test_flash_file.cc", + "tests/test_flash_file.h", + "tests/test_flash_fullscreen.cc", + "tests/test_flash_fullscreen.h", + "tests/test_flash_fullscreen_for_browser_ui.cc", + "tests/test_flash_fullscreen_for_browser_ui.h", + "tests/test_flash_message_loop.cc", + "tests/test_flash_message_loop.h", + "tests/test_net_address_private.cc", + "tests/test_net_address_private.h", + "tests/test_pdf.cc", + "tests/test_pdf.h", + "tests/test_platform_verification_private.cc", + "tests/test_platform_verification_private.h", + "tests/test_tcp_socket_private_trusted.cc", + "tests/test_tcp_socket_private_trusted.h", + "tests/test_url_util.cc", + "tests/test_url_util.h", + "tests/test_utils.h", + "tests/test_video_decoder_dev.cc", + "tests/test_video_decoder_dev.h", + "tests/test_x509_certificate_private.cc", + "tests/test_x509_certificate_private.h", + + # Deprecated test cases. + "tests/test_instance_deprecated.cc", + "tests/test_instance_deprecated.h", + "tests/test_var_deprecated.cc", + "tests/test_var_deprecated.h", + ] configs += [ "//build/config:precompiled_headers", @@ -62,18 +240,15 @@ source_set("ppapi_tests_sources") { ] } -if (!is_mac) { - shared_library("ppapi_tests") { - deps = [ - ":ppapi_tests_sources", - ] - } +if (is_mac) { + ppapi_tests_target_type = "mac_plugin_bundle" } else { - mac_plugin_bundle("ppapi_tests") { - deps = [ - ":ppapi_tests_sources", - ] - } + ppapi_tests_target_type = "shared_library" +} +target(ppapi_tests_target_type, "ppapi_tests") { + deps = [ + ":ppapi_tests_sources", + ] } source_set("power_saver_test_plugin_sources") { @@ -241,39 +416,6 @@ executable("pepper_hash_for_uma") { ] } -if (is_nacl_glibc) { - shared_library("ppapi_cpp_lib") { - # When using gcc, we hide all symbols by default, but that breaks at - # link time as the test executable requires symbols defined in the - # shared library. - configs -= [ "//build/config/gcc:symbol_visibility_hidden" ] - configs += [ "//build/config/gcc:symbol_visibility_default" ] - - sources = ppapi_sources.cpp_source_files - sources += [ - "cpp/module_embedder.h", - "cpp/ppp_entrypoints.cc", - ] - cflags = [ "-fPIC" ] - deps = [ - "//build/config/nacl:nacl_base", - ] - } -} else { - static_library("ppapi_cpp_lib") { - # This library is distributed as a part of the SDK and as such has to - # be a static library rather than a source set. - sources = ppapi_sources.cpp_source_files - sources += [ - "cpp/module_embedder.h", - "cpp/ppp_entrypoints.cc", - ] - deps = [ - "//build/config/nacl:nacl_base", - ] - } -} - source_set("ppapi_gles2_lib") { include_dirs = [ "lib/gl/include" ] sources = [ @@ -292,14 +434,22 @@ if (enable_nacl) { if (is_nacl) { nacl_test_data("ppapi_nacl_tests") { include_dirs = [ "lib/gl/include" ] - sources = ppapi_sources.test_common_source_files + - ppapi_sources.test_nacl_source_files + sources = test_common_source_files + + sources += [ + "tests/test_nacl_irt_stack_alignment.cc", + "tests/test_nacl_irt_stack_alignment.h", + "tests/test_tcp_server_socket_private_disallowed.cc", + "tests/test_tcp_socket_private_disallowed.cc", + "tests/test_udp_socket_private_disallowed.cc", + ] + defines = [ "GL_GLEXT_PROTOTYPES", "PPAPI_TEST_IMPLEMENTATION", ] deps = [ - ":ppapi_cpp_lib", + "//ppapi/cpp", ] if (current_cpu == "pnacl") { pretranslate_pexe = true @@ -311,9 +461,17 @@ if (enable_nacl) { data_deps = [ ":copy_test_files", ":ppapi_nacl_tests(//build/toolchain/nacl:clang_newlib_${target_cpu})", - ":ppapi_nacl_tests(//build/toolchain/nacl:glibc_${target_cpu})", ":ppapi_nacl_tests(//build/toolchain/nacl:newlib_pnacl)", - ":ppapi_nacl_tests(//build/toolchain/nacl:newlib_pnacl_nonsfi)", ] + + if (target_cpu != "mipsel") { + data_deps += + [ ":ppapi_nacl_tests(//build/toolchain/nacl:glibc_${target_cpu})" ] + } + + if (is_linux && enable_nacl_nonsfi) { + data_deps += + [ ":ppapi_nacl_tests(//build/toolchain/nacl:newlib_pnacl_nonsfi)" ] + } } } diff --git a/chromium/ppapi/api/pp_input_event.idl b/chromium/ppapi/api/pp_input_event.idl index e08f090fe4f..6a76cb4cce0 100644 --- a/chromium/ppapi/api/pp_input_event.idl +++ b/chromium/ppapi/api/pp_input_event.idl @@ -69,7 +69,7 @@ struct PP_InputEvent_Character { * maximum UTF-8 character is 4 bytes, there will always be at least one null * at the end so you can treat this as a null-terminated UTF-8 string. */ - char[5] text; + int8_t[5] text; }; /** @@ -111,8 +111,6 @@ struct PP_InputEvent_Mouse { * plugin will give non-integer values. */ float_t y; - - /* TODO(brettw) figure out exactly what this means.*/ int32_t click_count; }; diff --git a/chromium/ppapi/api/ppb_gamepad.idl b/chromium/ppapi/api/ppb_gamepad.idl index 1552fd67d71..927f5cceb69 100644 --- a/chromium/ppapi/api/ppb_gamepad.idl +++ b/chromium/ppapi/api/ppb_gamepad.idl @@ -59,7 +59,7 @@ struct PP_GamepadSampleData { PP_Bool connected; /* Padding to make the struct the same size between 64 and 32. */ - char[4] unused_pad_; + int8_t[4] unused_pad_; }; /** @@ -73,7 +73,7 @@ struct PP_GamepadsSampleData { uint32_t length; /* Padding to make the struct the same size between 64 and 32. */ - char[4] unused_pad_; + int8_t[4] unused_pad_; /** * Data for an individual gamepad device connected to the system. diff --git a/chromium/ppapi/api/ppb_input_event.idl b/chromium/ppapi/api/ppb_input_event.idl index b9224fa584a..b737a2e4832 100644 --- a/chromium/ppapi/api/ppb_input_event.idl +++ b/chromium/ppapi/api/ppb_input_event.idl @@ -10,7 +10,8 @@ label Chrome { M13 = 1.0, M14 = 1.1, - M34 = 1.2 + M34 = 1.2, + M55 = 1.3 }; /** @@ -68,10 +69,6 @@ enum PP_InputEvent_Type { * * Register for this event using the PP_INPUTEVENT_CLASS_KEYBOARD class. */ - - /* - * TODO(brettw) differentiate from KEYDOWN. - */ PP_INPUTEVENT_TYPE_RAWKEYDOWN = 6, /** @@ -199,7 +196,11 @@ enum PP_InputEvent_Modifier { PP_INPUTEVENT_MODIFIER_CAPSLOCKKEY = 1 << 9, PP_INPUTEVENT_MODIFIER_NUMLOCKKEY = 1 << 10, PP_INPUTEVENT_MODIFIER_ISLEFT = 1 << 11, - PP_INPUTEVENT_MODIFIER_ISRIGHT = 1 << 12 + PP_INPUTEVENT_MODIFIER_ISRIGHT = 1 << 12, + [version=1.3] + PP_INPUTEVENT_MODIFIER_ISPEN = 1 << 13, + [version=1.3] + PP_INPUTEVENT_MODIFIER_ISERASER = 1 << 14 }; /** @@ -573,9 +574,6 @@ interface PPB_MouseInputEvent { */ [returnByValue] PP_Point GetPosition([in] PP_Resource mouse_event); - /* - * TODO(brettw) figure out exactly what this means. - */ int32_t GetClickCount([in] PP_Resource mouse_event); /** diff --git a/chromium/ppapi/api/private/ppb_net_address_private.idl b/chromium/ppapi/api/private/ppb_net_address_private.idl index 9feb503050e..cc8045ddbd9 100644 --- a/chromium/ppapi/api/private/ppb_net_address_private.idl +++ b/chromium/ppapi/api/private/ppb_net_address_private.idl @@ -37,7 +37,7 @@ enum PP_NetAddressFamily_Private { [assert_size(132)] struct PP_NetAddress_Private { uint32_t size; - char[128] data; + int8_t[128] data; }; /** diff --git a/chromium/ppapi/c/BUILD.gn b/chromium/ppapi/c/BUILD.gn index 7ec7674d612..cd9cf210bd0 100644 --- a/chromium/ppapi/c/BUILD.gn +++ b/chromium/ppapi/c/BUILD.gn @@ -2,9 +2,146 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("//ppapi/ppapi_sources.gni") - # These are just headers. source_set("c") { - sources = rebase_path(ppapi_sources.c_source_files, ".", "..") + sources = [ + "pp_array_output.h", + "pp_bool.h", + "pp_codecs.h", + "pp_completion_callback.h", + "pp_errors.h", + "pp_file_info.h", + "pp_graphics_3d.h", + "pp_input_event.h", + "pp_instance.h", + "pp_macros.h", + "pp_module.h", + "pp_point.h", + "pp_rect.h", + "pp_resource.h", + "pp_size.h", + "pp_stdint.h", + "pp_time.h", + "pp_touch_point.h", + "pp_var.h", + "ppb.h", + "ppb_audio.h", + "ppb_audio_buffer.h", + "ppb_audio_config.h", + "ppb_audio_encoder.h", + "ppb_compositor.h", + "ppb_console.h", + "ppb_core.h", + "ppb_file_io.h", + "ppb_file_ref.h", + "ppb_file_system.h", + "ppb_fullscreen.h", + "ppb_gamepad.h", + "ppb_graphics_2d.h", + "ppb_graphics_3d.h", + "ppb_host_resolver.h", + "ppb_image_data.h", + "ppb_input_event.h", + "ppb_instance.h", + "ppb_media_stream_audio_track.h", + "ppb_media_stream_video_track.h", + "ppb_message_loop.h", + "ppb_messaging.h", + "ppb_mouse_cursor.h", + "ppb_mouse_lock.h", + "ppb_net_address.h", + "ppb_network_list.h", + "ppb_network_monitor.h", + "ppb_network_proxy.h", + "ppb_opengles2.h", + "ppb_ppb_vpn_provider.h", + "ppb_tcp_socket.h", + "ppb_text_input_controller.h", + "ppb_udp_socket.h", + "ppb_url_loader.h", + "ppb_url_request_info.h", + "ppb_url_response_info.h", + "ppb_var.h", + "ppb_var_array.h", + "ppb_var_array_buffer.h", + "ppb_var_dictionary.h", + "ppb_video_decoder.h", + "ppb_video_encoder.h", + "ppb_video_frame.h", + "ppb_view.h", + "ppb_websocket.h", + "ppp.h", + "ppp_graphics_3d.h", + "ppp_input_event.h", + "ppp_instance.h", + "ppp_messaging.h", + "ppp_mouse_lock.h", + + # Dev interfaces. + "dev/pp_cursor_type_dev.h", + "dev/pp_video_dev.h", + "dev/ppb_buffer_dev.h", + "dev/ppb_char_set_dev.h", + "dev/ppb_cursor_control_dev.h", + "dev/ppb_device_ref_dev.h", + "dev/ppb_file_chooser_dev.h", + "dev/ppb_ime_input_event_dev.h", + "dev/ppb_memory_dev.h", + "dev/ppb_printing_dev.h", + "dev/ppb_text_input_dev.h", + "dev/ppb_truetype_font_dev.h", + "dev/ppb_url_util_dev.h", + "dev/ppb_video_decoder_dev.h", + "dev/ppp_network_state_dev.h", + "dev/ppp_text_input_dev.h", + "dev/ppp_video_decoder_dev.h", + + # Private interfaces. + "private/pp_file_handle.h", + "private/pp_private_font_charset.h", + "private/pp_video_frame_private.h", + "private/ppb_camera_capabilities_private.h", + "private/ppb_camera_device_private.h", + "private/ppb_content_decryptor_private.h", + "private/ppb_ext_crx_file_system_private.h", + "private/ppb_find_private.h", + "private/ppb_flash.h", + "private/ppb_flash_clipboard.h", + "private/ppb_flash_file.h", + "private/ppb_flash_font_file.h", + "private/ppb_flash_fullscreen.h", + "private/ppb_flash_menu.h", + "private/ppb_flash_message_loop.h", + "private/ppb_host_resolver_private.h", + "private/ppb_instance_private.h", + "private/ppb_isolated_file_system_private.h", + "private/ppb_net_address_private.h", + "private/ppb_output_protection_private.h", + "private/ppb_pdf.h", + "private/ppb_platform_verification_private.h", + "private/ppb_proxy_private.h", + "private/ppb_tcp_server_socket_private.h", + "private/ppb_tcp_socket_private.h", + "private/ppb_testing_private.h", + "private/ppb_udp_socket_private.h", + "private/ppb_uma_private.h", + "private/ppb_video_destination_private.h", + "private/ppb_video_source_private.h", + "private/ppb_x509_certificate_private.h", + "private/ppp_content_decryptor_private.h", + "private/ppp_find_private.h", + "private/ppp_instance_private.h", + + # Deprecated interfaces. + "dev/deprecated_bool.h", + "dev/ppb_var_deprecated.h", + "dev/ppp_class_deprecated.h", + + # Trusted interfaces. + "trusted/ppb_broker_trusted.h", + "trusted/ppb_browser_font_trusted.h", + "trusted/ppb_file_chooser_trusted.h", + "trusted/ppb_url_loader_trusted.h", + "trusted/ppp_broker.h", + ] } diff --git a/chromium/ppapi/c/pp_input_event.h b/chromium/ppapi/c/pp_input_event.h index ea65ae584dc..cfac56d016f 100644 --- a/chromium/ppapi/c/pp_input_event.h +++ b/chromium/ppapi/c/pp_input_event.h @@ -81,7 +81,7 @@ struct PP_InputEvent_Character { * maximum UTF-8 character is 4 bytes, there will always be at least one null * at the end so you can treat this as a null-terminated UTF-8 string. */ - char text[5]; + int8_t text[5]; }; PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_InputEvent_Character, 12); @@ -121,7 +121,6 @@ struct PP_InputEvent_Mouse { * plugin will give non-integer values. */ float y; - /* TODO(brettw) figure out exactly what this means. */ int32_t click_count; }; PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_InputEvent_Mouse, 20); diff --git a/chromium/ppapi/c/pp_macros.h b/chromium/ppapi/c/pp_macros.h index 72985488326..16dc079d2f4 100644 --- a/chromium/ppapi/c/pp_macros.h +++ b/chromium/ppapi/c/pp_macros.h @@ -3,13 +3,13 @@ * found in the LICENSE file. */ -/* From pp_macros.idl modified Mon Feb 1 13:37:12 2016. */ +/* From pp_macros.idl modified Thu Oct 15 10:46:35 2015. */ #ifndef PPAPI_C_PP_MACROS_H_ #define PPAPI_C_PP_MACROS_H_ -#define PPAPI_RELEASE 52 +#define PPAPI_RELEASE 55 /** * @file diff --git a/chromium/ppapi/c/ppb_gamepad.h b/chromium/ppapi/c/ppb_gamepad.h index 4beb9b8f1f8..388ef631e27 100644 --- a/chromium/ppapi/c/ppb_gamepad.h +++ b/chromium/ppapi/c/ppb_gamepad.h @@ -64,7 +64,7 @@ struct PP_GamepadSampleData { */ PP_Bool connected; /* Padding to make the struct the same size between 64 and 32. */ - char unused_pad_[4]; + int8_t unused_pad_[4]; }; PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_GamepadSampleData, 472); @@ -77,7 +77,7 @@ struct PP_GamepadsSampleData { */ uint32_t length; /* Padding to make the struct the same size between 64 and 32. */ - char unused_pad_[4]; + int8_t unused_pad_[4]; /** * Data for an individual gamepad device connected to the system. */ diff --git a/chromium/ppapi/c/ppb_input_event.h b/chromium/ppapi/c/ppb_input_event.h index ca2bf152b9d..bd2c775e53b 100644 --- a/chromium/ppapi/c/ppb_input_event.h +++ b/chromium/ppapi/c/ppb_input_event.h @@ -3,7 +3,7 @@ * found in the LICENSE file. */ -/* From ppb_input_event.idl modified Thu Apr 3 14:52:10 2014. */ +/* From ppb_input_event.idl modified Thu Sep 1 12:40:05 2016. */ #ifndef PPAPI_C_PPB_INPUT_EVENT_H_ #define PPAPI_C_PPB_INPUT_EVENT_H_ @@ -96,9 +96,6 @@ typedef enum { * * Register for this event using the PP_INPUTEVENT_CLASS_KEYBOARD class. */ - /* - * TODO(brettw) differentiate from KEYDOWN. - */ PP_INPUTEVENT_TYPE_RAWKEYDOWN = 6, /** * Notification that a key was pressed. This does not necessarily correspond @@ -214,7 +211,9 @@ typedef enum { PP_INPUTEVENT_MODIFIER_CAPSLOCKKEY = 1 << 9, PP_INPUTEVENT_MODIFIER_NUMLOCKKEY = 1 << 10, PP_INPUTEVENT_MODIFIER_ISLEFT = 1 << 11, - PP_INPUTEVENT_MODIFIER_ISRIGHT = 1 << 12 + PP_INPUTEVENT_MODIFIER_ISRIGHT = 1 << 12, + PP_INPUTEVENT_MODIFIER_ISPEN = 1 << 13, + PP_INPUTEVENT_MODIFIER_ISERASER = 1 << 14 } PP_InputEvent_Modifier; PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_InputEvent_Modifier, 4); @@ -545,9 +544,6 @@ struct PPB_MouseInputEvent_1_1 { * mouse drags. The return value will be (0, 0) for non-mouse events. */ struct PP_Point (*GetPosition)(PP_Resource mouse_event); - /* - * TODO(brettw) figure out exactly what this means. - */ int32_t (*GetClickCount)(PP_Resource mouse_event); /** * Returns the change in position of the mouse. When the mouse is locked, diff --git a/chromium/ppapi/c/private/ppb_net_address_private.h b/chromium/ppapi/c/private/ppb_net_address_private.h index 82f6e4557e9..bead6ee976e 100644 --- a/chromium/ppapi/c/private/ppb_net_address_private.h +++ b/chromium/ppapi/c/private/ppb_net_address_private.h @@ -60,7 +60,7 @@ PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_NetAddressFamily_Private, 4); */ struct PP_NetAddress_Private { uint32_t size; - char data[128]; + int8_t data[128]; }; PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_NetAddress_Private, 132); /** diff --git a/chromium/ppapi/c/private/ppb_pdf.h b/chromium/ppapi/c/private/ppb_pdf.h index da85c45bebe..06ddf7e23ec 100644 --- a/chromium/ppapi/c/private/ppb_pdf.h +++ b/chromium/ppapi/c/private/ppb_pdf.h @@ -157,6 +157,11 @@ struct PPB_PDF { struct PP_PrivateAccessibilityPageInfo* page_info, struct PP_PrivateAccessibilityTextRunInfo text_runs[], struct PP_PrivateAccessibilityCharInfo chars[]); + + // Sends information about the PDF's URL and the embedder's URL. + void (*SetCrashData)(PP_Instance instance, + const char* pdf_url, + const char* top_level_url); }; #endif // PPAPI_C_PRIVATE_PPB_PDF_H_ diff --git a/chromium/ppapi/cpp/BUILD.gn b/chromium/ppapi/cpp/BUILD.gn index 06ec9d1f238..586ca715e06 100644 --- a/chromium/ppapi/cpp/BUILD.gn +++ b/chromium/ppapi/cpp/BUILD.gn @@ -2,11 +2,21 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("//ppapi/ppapi_sources.gni") +if (is_nacl) { + import("//build/config/nacl/config.gni") +} + +if (is_nacl && is_nacl_glibc) { + cpp_target_type = "shared_library" +} else { + cpp_target_type = "static_library" +} # Link to this target to get the PPAPI C++ wrapper objects and plugin startup # code. See also "objects" below. -source_set("cpp") { +target(cpp_target_type, "cpp") { + output_name = "ppapi_cpp_lib" + sources = [ "module_embedder.h", "ppp_entrypoints.cc", @@ -16,12 +26,282 @@ source_set("cpp") { ":objects", "//ppapi/c", ] + + if (is_nacl) { + public_deps += [ "//build/config/nacl:nacl_base" ] + + if (is_nacl_glibc) { + # When using gcc, we hide all symbols by default, but that breaks at + # link time as the test executable requires symbols defined in the + # shared library. + configs -= [ "//build/config/gcc:symbol_visibility_hidden" ] + configs += [ "//build/config/gcc:symbol_visibility_default" ] + + cflags = [ "-fPIC" ] + } else { + # This library is distributed as a part of the SDK and as such has to + # be a static library rather than a source set. + complete_static_lib = true + } + } } # Link to this target to get only the PPAPI C++ wrapper objects but not the # plugin startup code. Some plugins need special startup code that they supply # themselves. source_set("objects") { - sources = rebase_path(ppapi_sources.cpp_source_files, ".", "..") + sources = [ + "array_output.cc", + "array_output.h", + "audio.cc", + "audio.h", + "audio_buffer.cc", + "audio_buffer.h", + "audio_config.cc", + "audio_config.h", + "audio_encoder.cc", + "audio_encoder.h", + "completion_callback.h", + "compositor.cc", + "compositor.h", + "compositor_layer.cc", + "compositor_layer.h", + "core.cc", + "core.h", + "directory_entry.cc", + "directory_entry.h", + "file_io.cc", + "file_io.h", + "file_ref.cc", + "file_ref.h", + "file_system.cc", + "file_system.h", + "fullscreen.cc", + "fullscreen.h", + "graphics_2d.cc", + "graphics_2d.h", + "graphics_3d.cc", + "graphics_3d.h", + "graphics_3d_client.cc", + "graphics_3d_client.h", + "host_resolver.cc", + "host_resolver.h", + "image_data.cc", + "image_data.h", + "input_event.cc", + "input_event.h", + "instance.cc", + "instance.h", + "instance_handle.cc", + "instance_handle.h", + "logging.h", + "media_stream_audio_track.cc", + "media_stream_audio_track.h", + "media_stream_video_track.cc", + "media_stream_video_track.h", + "message_handler.h", + "message_loop.cc", + "message_loop.h", + "module.cc", + "module.h", + "module_impl.h", + "mouse_cursor.cc", + "mouse_cursor.h", + "mouse_lock.cc", + "mouse_lock.h", + "net_address.cc", + "net_address.h", + "network_list.cc", + "network_list.h", + "network_monitor.cc", + "network_monitor.h", + "network_proxy.cc", + "network_proxy.h", + "output_traits.h", + "point.h", + "rect.cc", + "rect.h", + "resource.cc", + "resource.h", + "size.h", + "tcp_socket.cc", + "tcp_socket.h", + "text_input_controller.cc", + "text_input_controller.h", + "touch_point.h", + "udp_socket.cc", + "udp_socket.h", + "url_loader.cc", + "url_loader.h", + "url_request_info.cc", + "url_request_info.h", + "url_response_info.cc", + "url_response_info.h", + "var.cc", + "var.h", + "var_array.cc", + "var_array.h", + "var_array_buffer.cc", + "var_array_buffer.h", + "var_dictionary.cc", + "var_dictionary.h", + "video_decoder.cc", + "video_decoder.h", + "video_encoder.cc", + "video_encoder.h", + "video_frame.cc", + "video_frame.h", + "view.cc", + "view.h", + "vpn_provider.cc", + "vpn_provider.h", + "websocket.cc", + "websocket.h", + + # Dev interfaces. + "dev/audio_input_dev.cc", + "dev/audio_input_dev.h", + "dev/buffer_dev.cc", + "dev/buffer_dev.h", + "dev/crypto_dev.cc", + "dev/crypto_dev.h", + "dev/cursor_control_dev.cc", + "dev/cursor_control_dev.h", + "dev/device_ref_dev.cc", + "dev/device_ref_dev.h", + "dev/file_chooser_dev.cc", + "dev/file_chooser_dev.h", + "dev/ime_input_event_dev.cc", + "dev/ime_input_event_dev.h", + "dev/memory_dev.cc", + "dev/memory_dev.h", + "dev/printing_dev.cc", + "dev/printing_dev.h", + "dev/text_input_dev.cc", + "dev/text_input_dev.h", + "dev/truetype_font_dev.cc", + "dev/truetype_font_dev.h", + "dev/url_util_dev.cc", + "dev/url_util_dev.h", + "dev/video_capture_client_dev.cc", + "dev/video_capture_client_dev.h", + "dev/video_capture_dev.cc", + "dev/video_capture_dev.h", + "dev/video_decoder_client_dev.cc", + "dev/video_decoder_client_dev.h", + "dev/video_decoder_dev.cc", + "dev/video_decoder_dev.h", + "dev/view_dev.cc", + "dev/view_dev.h", + + # Deprecated interfaces. + "dev/scriptable_object_deprecated.cc", + "dev/scriptable_object_deprecated.h", + + # Private interfaces. + "private/camera_capabilities_private.cc", + "private/camera_capabilities_private.h", + "private/camera_device_private.cc", + "private/camera_device_private.h", + "private/content_decryptor_private.cc", + "private/content_decryptor_private.h", + "private/ext_crx_file_system_private.cc", + "private/ext_crx_file_system_private.h", + "private/file_io_private.cc", + "private/file_io_private.h", + "private/find_private.cc", + "private/find_private.h", + "private/flash.cc", + "private/flash.h", + "private/flash_clipboard.cc", + "private/flash_clipboard.h", + "private/flash_device_id.cc", + "private/flash_device_id.h", + "private/flash_drm.cc", + "private/flash_drm.h", + "private/flash_file.cc", + "private/flash_file.h", + "private/flash_font_file.cc", + "private/flash_font_file.h", + "private/flash_fullscreen.cc", + "private/flash_fullscreen.h", + "private/flash_menu.cc", + "private/flash_menu.h", + "private/flash_message_loop.cc", + "private/flash_message_loop.h", + "private/host_resolver_private.cc", + "private/host_resolver_private.h", + "private/instance_private.cc", + "private/instance_private.h", + "private/isolated_file_system_private.cc", + "private/isolated_file_system_private.h", + "private/net_address_private.cc", + "private/net_address_private.h", + "private/output_protection_private.cc", + "private/output_protection_private.h", + "private/pass_file_handle.cc", + "private/pass_file_handle.h", + "private/pdf.cc", + "private/pdf.h", + "private/platform_verification.cc", + "private/platform_verification.h", + "private/tcp_server_socket_private.cc", + "private/tcp_server_socket_private.h", + "private/tcp_socket_private.cc", + "private/tcp_socket_private.h", + "private/udp_socket_private.cc", + "private/udp_socket_private.h", + "private/uma_private.cc", + "private/uma_private.h", + "private/var_private.cc", + "private/var_private.h", + "private/video_destination_private.cc", + "private/video_destination_private.h", + "private/video_frame_private.cc", + "private/video_frame_private.h", + "private/video_source_private.cc", + "private/video_source_private.h", + "private/x509_certificate_private.cc", + "private/x509_certificate_private.h", + + # Trusted interfaces. + "trusted/browser_font_trusted.cc", + "trusted/browser_font_trusted.h", + "trusted/file_chooser_trusted.cc", + "trusted/file_chooser_trusted.h", + + # Utility sources. + "../utility/completion_callback_factory.h", + "../utility/completion_callback_factory_thread_traits.h", + "../utility/graphics/paint_aggregator.cc", + "../utility/graphics/paint_aggregator.h", + "../utility/graphics/paint_manager.cc", + "../utility/graphics/paint_manager.h", + "../utility/threading/lock.cc", + "../utility/threading/lock.h", + "../utility/threading/simple_thread.cc", + "../utility/threading/simple_thread.h", + "../utility/websocket/websocket_api.cc", + "../utility/websocket/websocket_api.h", + ] + configs += [ "//build/config:precompiled_headers" ] + + public_deps = [ + "//ppapi/c", + ] + + if (is_nacl) { + public_deps += [ "//build/config/nacl:nacl_base" ] + + if (is_nacl_glibc) { + # When using gcc, we hide all symbols by default, but that breaks at + # link time as the test executable requires symbols defined in the + # shared library. + configs -= [ "//build/config/gcc:symbol_visibility_hidden" ] + configs += [ "//build/config/gcc:symbol_visibility_default" ] + + cflags = [ "-fPIC" ] + } + } } diff --git a/chromium/ppapi/cpp/private/pdf.cc b/chromium/ppapi/cpp/private/pdf.cc index d314d47b3ef..dda3fa9ff49 100644 --- a/chromium/ppapi/cpp/private/pdf.cc +++ b/chromium/ppapi/cpp/private/pdf.cc @@ -183,4 +183,14 @@ void PDF::SetAccessibilityPageInfo( } } +// static +void PDF::SetCrashData(const InstanceHandle& instance, + const char* pdf_url, + const char* top_level_url) { + if (has_interface<PPB_PDF>()) { + get_interface<PPB_PDF>()->SetCrashData(instance.pp_instance(), pdf_url, + top_level_url); + } +} + } // namespace pp diff --git a/chromium/ppapi/cpp/private/pdf.h b/chromium/ppapi/cpp/private/pdf.h index 3cd7aeb3911..6635596a095 100644 --- a/chromium/ppapi/cpp/private/pdf.h +++ b/chromium/ppapi/cpp/private/pdf.h @@ -69,6 +69,9 @@ class PDF { PP_PrivateAccessibilityPageInfo* page_info, PP_PrivateAccessibilityTextRunInfo text_runs[], PP_PrivateAccessibilityCharInfo chars[]); + static void SetCrashData(const InstanceHandle& instance, + const char* pdf_url, + const char* top_level_url); }; } // namespace pp diff --git a/chromium/ppapi/examples/video_effects/video_effects.html b/chromium/ppapi/examples/video_effects/video_effects.html index f7dd0ce0abd..fa37d59b81c 100644 --- a/chromium/ppapi/examples/video_effects/video_effects.html +++ b/chromium/ppapi/examples/video_effects/video_effects.html @@ -92,7 +92,7 @@ function start() { // Call into getUserMedia via the polyfill (adapter.js). getUserMedia({audio:false, video:true}, gotStream, function() {}); -} +} function onRegisterStreamDone() { vidprocessedlocal.src = URL.createObjectURL(processedLocalstream); @@ -111,7 +111,7 @@ function HandleMessage(message_event) { function initEffect() { var url = URL.createObjectURL(localstream); - processedLocalstream = new webkitMediaStream([]); + processedLocalstream = new MediaStream([]); var processedStreamUrl = URL.createObjectURL(processedLocalstream); effectsPlugin.postMessage( 'registerStream' + ' ' + url + ' ' + processedStreamUrl); @@ -127,7 +127,7 @@ function toggleEffect() { effectsPlugin.postMessage('effectOff'); } } - + function call() { callButton.disabled = true; hangupButton.disabled = false; @@ -135,15 +135,15 @@ function call() { var servers = null; pc1 = new RTCPeerConnection(servers); trace("Created local peer connection object pc1"); - pc1.onicecandidate = iceCallback1; + pc1.onicecandidate = iceCallback1; pc2 = new RTCPeerConnection(servers); trace("Created remote peer connection object pc2"); pc2.onicecandidate = iceCallback2; - pc2.onaddstream = gotRemoteStream; + pc2.onaddstream = gotRemoteStream; pc1.addStream(processedLocalstream); trace("Adding Local Stream to peer connection"); - + pc1.createOffer(gotDescription1); } @@ -155,7 +155,7 @@ function gotDescription1(desc){ // to pass in the right constraints in order for it to // accept the incoming offer of audio and video. var sdpConstraints = {'mandatory': { - 'OfferToReceiveAudio':true, + 'OfferToReceiveAudio':true, 'OfferToReceiveVideo':true }}; pc2.createAnswer(gotDescription2, null, sdpConstraints); } @@ -168,7 +168,7 @@ function gotDescription2(desc){ function hangup() { trace("Ending call"); - pc1.close(); + pc1.close(); pc2.close(); pc1 = null; pc2 = null; @@ -187,7 +187,7 @@ function iceCallback1(event){ trace("Local ICE candidate: \n" + event.candidate.candidate); } } - + function iceCallback2(event){ if (event.candidate) { pc1.addIceCandidate(new RTCIceCandidate(event.candidate)); @@ -204,5 +204,3 @@ document.addEventListener('DOMContentLoaded', InitializePlugin, false); </script> </body> </html> - - diff --git a/chromium/ppapi/host/resource_message_filter.h b/chromium/ppapi/host/resource_message_filter.h index 8dcf6c2963b..31b469c1f72 100644 --- a/chromium/ppapi/host/resource_message_filter.h +++ b/chromium/ppapi/host/resource_message_filter.h @@ -52,7 +52,7 @@ struct PPAPI_HOST_EXPORT ResourceMessageFilterDeleteTraits { // scoped_refptr<base::TaskRunner> OverrideTaskRunnerForMessage( // const IPC::Message& message) override { // if (message.type() == MyMessage::ID) -// return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI); +// return BrowserThread::GetTaskRunnerForThread(BrowserThread::UI); // return NULL; // } // @@ -127,9 +127,9 @@ class PPAPI_HOST_EXPORT ResourceMessageFilter scoped_refptr<base::SingleThreadTaskRunner> deletion_task_runner_; - // Message loop to send resource message replies on. This will be the message - // loop proxy of the IO thread for the browser process or the main thread for - // the renderer process. + // Task runner to send resource message replies on. This will be the task + // runner of the IO thread for the browser process or the main thread for a + // renderer process. scoped_refptr<base::SingleThreadTaskRunner> reply_thread_task_runner_; // Non-owning pointer to the resource host owning this filter. Should only be diff --git a/chromium/ppapi/nacl_irt/irt_pnacl_translator_compile.cc b/chromium/ppapi/nacl_irt/irt_pnacl_translator_compile.cc index a79dd959277..74022d71be9 100644 --- a/chromium/ppapi/nacl_irt/irt_pnacl_translator_compile.cc +++ b/chromium/ppapi/nacl_irt/irt_pnacl_translator_compile.cc @@ -3,6 +3,7 @@ // found in the LICENSE file. #include "base/macros.h" +#include "base/run_loop.h" #include "build/build_config.h" #include "ipc/ipc_listener.h" #include "ipc/ipc_sync_channel.h" @@ -100,10 +101,8 @@ class TranslatorCompileListener : public IPC::Listener { void ServeTranslateRequest(const struct nacl_irt_pnacl_compile_funcs* funcs) { base::MessageLoop loop; - int fd = ppapi::GetRendererIPCFileDescriptor(); - IPC::ChannelHandle handle("NaCl IPC", base::FileDescriptor(fd, false)); - new TranslatorCompileListener(handle, funcs); - loop.Run(); + new TranslatorCompileListener(ppapi::GetRendererIPCChannelHandle(), funcs); + base::RunLoop().Run(); } } diff --git a/chromium/ppapi/nacl_irt/irt_pnacl_translator_link.cc b/chromium/ppapi/nacl_irt/irt_pnacl_translator_link.cc index dc88a7a2494..5ecd9803621 100644 --- a/chromium/ppapi/nacl_irt/irt_pnacl_translator_link.cc +++ b/chromium/ppapi/nacl_irt/irt_pnacl_translator_link.cc @@ -3,6 +3,7 @@ // found in the LICENSE file. #include "base/macros.h" +#include "base/run_loop.h" #include "build/build_config.h" #include "ipc/ipc_listener.h" #include "ipc/ipc_sync_channel.h" @@ -71,10 +72,8 @@ class TranslatorLinkListener : public IPC::Listener { void ServeLinkRequest(CallbackFunc func) { base::MessageLoop loop; - int fd = ppapi::GetRendererIPCFileDescriptor(); - IPC::ChannelHandle handle("NaCl IPC", base::FileDescriptor(fd, false)); - new TranslatorLinkListener(handle, func); - loop.Run(); + new TranslatorLinkListener(ppapi::GetRendererIPCChannelHandle(), func); + base::RunLoop().Run(); } } diff --git a/chromium/ppapi/nacl_irt/irt_ppapi.cc b/chromium/ppapi/nacl_irt/irt_ppapi.cc index 8d2f715b0cb..d7ed0690f4a 100644 --- a/chromium/ppapi/nacl_irt/irt_ppapi.cc +++ b/chromium/ppapi/nacl_irt/irt_ppapi.cc @@ -10,6 +10,7 @@ #include <stdint.h> +#include "base/run_loop.h" #include "base/threading/thread.h" #include "ipc/ipc_logging.h" #include "ppapi/nacl_irt/irt_interfaces.h" @@ -38,11 +39,11 @@ int irt_ppapi_start(const struct PP_StartFunctions* funcs) { ppapi::PpapiDispatcher ppapi_dispatcher( ppapi::GetIOThread()->task_runner(), ppapi::GetShutdownEvent(), - ppapi::GetBrowserIPCFileDescriptor(), - ppapi::GetRendererIPCFileDescriptor()); + ppapi::GetBrowserIPCChannelHandle(), + ppapi::GetRendererIPCChannelHandle()); plugin_globals.SetPluginProxyDelegate(&ppapi_dispatcher); - loop.Run(); + base::RunLoop().Run(); return 0; } diff --git a/chromium/ppapi/nacl_irt/irt_start.cc b/chromium/ppapi/nacl_irt/irt_start.cc index b0f09df701b..d25a6ab5eb1 100644 --- a/chromium/ppapi/nacl_irt/irt_start.cc +++ b/chromium/ppapi/nacl_irt/irt_start.cc @@ -11,11 +11,19 @@ #include <stdint.h> #include "base/at_exit.h" +#include "mojo/edk/embedder/embedder.h" #include "native_client/src/public/chrome_main.h" #include "native_client/src/public/irt_core.h" #include "ppapi/nacl_irt/irt_interfaces.h" #include "ppapi/nacl_irt/plugin_startup.h" +namespace { +IPC::ChannelHandle MakeIPCHandle(const char* name, int fd) { + return IPC::ChannelHandle(name, + base::FileDescriptor(fd, false /* auto_close */)); +} +} // namespace + void nacl_irt_start(uint32_t* info) { nacl_irt_init(info); @@ -24,10 +32,12 @@ void nacl_irt_start(uint32_t* info) { // In SFI mode, the FDs of IPC channels are NACL_CHROME_DESC_BASE and its // successor, which is set in nacl_listener.cc. - ppapi::SetIPCFileDescriptors( - NACL_CHROME_DESC_BASE, - NACL_CHROME_DESC_BASE + 1, - NACL_CHROME_DESC_BASE + 2); + ppapi::SetIPCChannelHandles( + MakeIPCHandle("NaCl Browser", NACL_CHROME_DESC_BASE), + MakeIPCHandle("NaCl Renderer", NACL_CHROME_DESC_BASE + 1), + MakeIPCHandle("NaCl Manifest", NACL_CHROME_DESC_BASE + 2)); + // The Mojo EDK must be initialized before using IPC. + mojo::edk::Init(); ppapi::StartUpPlugin(); nacl_irt_enter_user_code(info, chrome_irt_query); diff --git a/chromium/ppapi/nacl_irt/manifest_service.cc b/chromium/ppapi/nacl_irt/manifest_service.cc index f045dbcb704..5a3f7387c51 100644 --- a/chromium/ppapi/nacl_irt/manifest_service.cc +++ b/chromium/ppapi/nacl_irt/manifest_service.cc @@ -32,8 +32,7 @@ namespace ppapi { class ManifestMessageFilter : public IPC::SyncMessageFilter { public: ManifestMessageFilter(base::WaitableEvent* shutdown_event) - : SyncMessageFilter(shutdown_event, - false /* is_channel_send_thread_safe */), + : SyncMessageFilter(shutdown_event), connected_event_(base::WaitableEvent::ResetPolicy::MANUAL, base::WaitableEvent::InitialState::NOT_SIGNALED) {} @@ -45,8 +44,8 @@ class ManifestMessageFilter : public IPC::SyncMessageFilter { // When set up is done, OnFilterAdded is called on IO thread. Unblocks the // Send(). - void OnFilterAdded(IPC::Sender* sender) override { - SyncMessageFilter::OnFilterAdded(sender); + void OnFilterAdded(IPC::Channel* channel) override { + SyncMessageFilter::OnFilterAdded(channel); connected_event_.Signal(); } diff --git a/chromium/ppapi/nacl_irt/plugin_startup.cc b/chromium/ppapi/nacl_irt/plugin_startup.cc index c7b818dd11a..b90f14ae801 100644 --- a/chromium/ppapi/nacl_irt/plugin_startup.cc +++ b/chromium/ppapi/nacl_irt/plugin_startup.cc @@ -12,51 +12,56 @@ #include "base/synchronization/waitable_event.h" #include "base/threading/thread.h" #include "ipc/ipc_channel_handle.h" -#include "mojo/edk/embedder/embedder.h" #include "ppapi/nacl_irt/manifest_service.h" #include "ppapi/shared_impl/ppb_audio_shared.h" namespace ppapi { namespace { -int g_nacl_browser_ipc_fd = -1; -int g_nacl_renderer_ipc_fd = -1; -int g_manifest_service_fd = -1; +IPC::ChannelHandle* g_nacl_browser_ipc_handle = nullptr; +IPC::ChannelHandle* g_nacl_renderer_ipc_handle = nullptr; +IPC::ChannelHandle* g_manifest_service_handle = nullptr; base::WaitableEvent* g_shutdown_event = NULL; base::Thread* g_io_thread = NULL; ManifestService* g_manifest_service = NULL; +bool IsValidChannelHandle(IPC::ChannelHandle* handle) { + // ChannelMojo not yet supported. + return handle && handle->socket.fd != -1 && !handle->mojo_handle.is_valid(); +} + // Creates the manifest service on IO thread so that its Listener's thread and // IO thread are shared. Upon completion of the manifest service creation, // event is signaled. void StartUpManifestServiceOnIOThread(base::WaitableEvent* event) { // The start up must be called only once. DCHECK(!g_manifest_service); - // manifest_service_fd must be set. - DCHECK_NE(g_manifest_service_fd, -1); + // manifest_service_handle must be set. + DCHECK(IsValidChannelHandle(g_manifest_service_handle)); // IOThread and shutdown event must be initialized in advance. DCHECK(g_io_thread); DCHECK(g_shutdown_event); g_manifest_service = new ManifestService( - IPC::ChannelHandle("NaCl IPC", - base::FileDescriptor(g_manifest_service_fd, false)), - g_io_thread->task_runner(), g_shutdown_event); + *g_manifest_service_handle, g_io_thread->task_runner(), + g_shutdown_event); event->Signal(); } } // namespace -void SetIPCFileDescriptors( - int browser_ipc_fd, int renderer_ipc_fd, int manifest_service_fd) { +void SetIPCChannelHandles( + IPC::ChannelHandle browser_ipc_handle, + IPC::ChannelHandle renderer_ipc_handle, + IPC::ChannelHandle manifest_service_handle) { // The initialization must be only once. - DCHECK_EQ(g_nacl_browser_ipc_fd, -1); - DCHECK_EQ(g_nacl_renderer_ipc_fd, -1); - DCHECK_EQ(g_manifest_service_fd, -1); - g_nacl_browser_ipc_fd = browser_ipc_fd; - g_nacl_renderer_ipc_fd = renderer_ipc_fd; - g_manifest_service_fd = manifest_service_fd; + DCHECK(!g_nacl_browser_ipc_handle); + DCHECK(!g_nacl_renderer_ipc_handle); + DCHECK(!g_nacl_renderer_ipc_handle); + g_nacl_browser_ipc_handle = new IPC::ChannelHandle(browser_ipc_handle); + g_nacl_renderer_ipc_handle = new IPC::ChannelHandle(renderer_ipc_handle); + g_manifest_service_handle = new IPC::ChannelHandle(manifest_service_handle); } void StartUpPlugin() { @@ -64,9 +69,6 @@ void StartUpPlugin() { DCHECK(!g_shutdown_event); DCHECK(!g_io_thread); - // The Mojo EDK must be initialized before using IPC. - mojo::edk::Init(); - g_shutdown_event = new base::WaitableEvent(base::WaitableEvent::ResetPolicy::MANUAL, base::WaitableEvent::InitialState::NOT_SIGNALED); @@ -74,7 +76,7 @@ void StartUpPlugin() { g_io_thread->StartWithOptions( base::Thread::Options(base::MessageLoop::TYPE_IO, 0)); - if (g_manifest_service_fd != -1) { + if (IsValidChannelHandle(g_manifest_service_handle)) { // Manifest service must be created on IOThread so that the main message // handling will be done on the thread, which has a message loop // even before irt_ppapi_start invocation. @@ -91,16 +93,16 @@ void StartUpPlugin() { PPB_Audio_Shared::SetNaClMode(); } -int GetBrowserIPCFileDescriptor() { - // The descriptor must be initialized in advance. - DCHECK_NE(g_nacl_browser_ipc_fd, -1); - return g_nacl_browser_ipc_fd; +IPC::ChannelHandle GetBrowserIPCChannelHandle() { + // The handle must be initialized in advance. + DCHECK(IsValidChannelHandle(g_nacl_browser_ipc_handle)); + return *g_nacl_browser_ipc_handle; } -int GetRendererIPCFileDescriptor() { - // The descriptor must be initialized in advance. - DCHECK_NE(g_nacl_renderer_ipc_fd, -1); - return g_nacl_renderer_ipc_fd; +IPC::ChannelHandle GetRendererIPCChannelHandle() { + // The handle must be initialized in advance. + DCHECK(IsValidChannelHandle(g_nacl_renderer_ipc_handle)); + return *g_nacl_renderer_ipc_handle; } base::WaitableEvent* GetShutdownEvent() { diff --git a/chromium/ppapi/nacl_irt/plugin_startup.h b/chromium/ppapi/nacl_irt/plugin_startup.h index 2684a78316b..06ce229de45 100644 --- a/chromium/ppapi/nacl_irt/plugin_startup.h +++ b/chromium/ppapi/nacl_irt/plugin_startup.h @@ -5,6 +5,7 @@ #ifndef PPAPI_NACL_IRT_PLUGIN_STARTUP_H_ #define PPAPI_NACL_IRT_PLUGIN_STARTUP_H_ +#include "ipc/ipc_channel_handle.h" #include "ppapi/proxy/ppapi_proxy_export.h" namespace base { @@ -16,22 +17,24 @@ namespace ppapi { class ManifestService; -// Sets the IPC channels for the browser and the renderer by the given FD -// numbers. This will be used for non-SFI mode. Must be called before the +// Sets the IPC channels for the browser and the renderer. +// This will be used for non-SFI mode. Must be called before the // ppapi_start() IRT interface is called. -PPAPI_PROXY_EXPORT void SetIPCFileDescriptors( - int browser_ipc_fd, int renderer_ipc_fd, int manifest_service_fd); +PPAPI_PROXY_EXPORT void SetIPCChannelHandles( + IPC::ChannelHandle browser_ipc_handle, + IPC::ChannelHandle renderer_ipc_handle, + IPC::ChannelHandle manifest_service_handle); // Runs start up procedure for the plugin. // Specifically, start background IO thread for IPC, and prepare // shutdown event instance. PPAPI_PROXY_EXPORT void StartUpPlugin(); -// Returns IPC file descriptor for PPAPI to the browser. -int GetBrowserIPCFileDescriptor(); +// Returns IPC channel handle for PPAPI to the browser. +IPC::ChannelHandle GetBrowserIPCChannelHandle(); -// Returns IPC file descriptor for PPAPI to the renderer. -int GetRendererIPCFileDescriptor(); +// Returns IPC channel handle for PPAPI to the renderer. +IPC::ChannelHandle GetRendererIPCChannelHandle(); // Returns the shutdown event instance for the plugin. // Must be called after StartUpPlugin(). @@ -40,8 +43,8 @@ base::WaitableEvent* GetShutdownEvent(); // Returns the IOThread for the plugin. Must be called after StartUpPlugin(). base::Thread* GetIOThread(); -// Returns the ManifestService interface. To use this, manifest_service_fd -// needs to be set via SetIPCFileDescriptors. Must be called after +// Returns the ManifestService interface. To use this, manifest_service_handle +// needs to be set via SetIPCChannelHandles. Must be called after // StartUpPlugin(). // If not available, returns NULL. ManifestService* GetManifestService(); diff --git a/chromium/ppapi/nacl_irt/ppapi_dispatcher.cc b/chromium/ppapi/nacl_irt/ppapi_dispatcher.cc index 8fd69bc10b9..789a75ce5da 100644 --- a/chromium/ppapi/nacl_irt/ppapi_dispatcher.cc +++ b/chromium/ppapi/nacl_irt/ppapi_dispatcher.cc @@ -34,15 +34,12 @@ namespace ppapi { PpapiDispatcher::PpapiDispatcher( scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, base::WaitableEvent* shutdown_event, - int browser_ipc_fd, - int renderer_ipc_fd) + IPC::ChannelHandle browser_ipc_handle, + IPC::ChannelHandle renderer_ipc_handle) : next_plugin_dispatcher_id_(0), task_runner_(io_task_runner), shutdown_event_(shutdown_event), - renderer_ipc_fd_(renderer_ipc_fd) { - IPC::ChannelHandle channel_handle( - "NaCl IPC", base::FileDescriptor(browser_ipc_fd, false)); - + renderer_ipc_handle_(renderer_ipc_handle) { proxy::PluginGlobals* globals = proxy::PluginGlobals::Get(); // Delay initializing the SyncChannel until after we add filters. This // ensures that the filters won't miss any messages received by @@ -56,7 +53,7 @@ PpapiDispatcher::PpapiDispatcher( globals->RegisterResourceMessageFilters(plugin_filter.get()); channel_->AddFilter(new tracing::ChildTraceMessageFilter(task_runner_.get())); - channel_->Init(channel_handle, IPC::Channel::MODE_SERVER, true); + channel_->Init(browser_ipc_handle, IPC::Channel::MODE_SERVER, true); } base::SingleThreadTaskRunner* PpapiDispatcher::GetIPCTaskRunner() { @@ -184,11 +181,8 @@ void PpapiDispatcher::OnMsgInitializeNaClDispatcher( proxy::PluginDispatcher* dispatcher = new proxy::PluginDispatcher(::PPP_GetInterface, args.permissions, args.off_the_record); - IPC::ChannelHandle channel_handle( - "nacl", - base::FileDescriptor(renderer_ipc_fd_, false)); if (!dispatcher->InitPluginWithChannel(this, base::kNullProcessId, - channel_handle, false)) { + renderer_ipc_handle_, false)) { delete dispatcher; return; } diff --git a/chromium/ppapi/nacl_irt/ppapi_dispatcher.h b/chromium/ppapi/nacl_irt/ppapi_dispatcher.h index 4cb3b1138a8..953db41a450 100644 --- a/chromium/ppapi/nacl_irt/ppapi_dispatcher.h +++ b/chromium/ppapi/nacl_irt/ppapi_dispatcher.h @@ -14,6 +14,7 @@ #include "base/files/file.h" #include "base/memory/ref_counted.h" #include "base/process/process_handle.h" +#include "ipc/ipc_channel_handle.h" #include "ipc/ipc_listener.h" #include "ipc/ipc_platform_file.h" #include "ipc/ipc_sender.h" @@ -50,8 +51,8 @@ class PpapiDispatcher : public proxy::PluginDispatcher::PluginDelegate, public: PpapiDispatcher(scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, base::WaitableEvent* shutdown_event, - int browser_ipc_fd, - int renderer_ipc_fd); + IPC::ChannelHandle browser_ipc_handle, + IPC::ChannelHandle renderer_ipc_handle); // PluginDispatcher::PluginDelegate implementation. base::SingleThreadTaskRunner* GetIPCTaskRunner() override; @@ -94,7 +95,7 @@ class PpapiDispatcher : public proxy::PluginDispatcher::PluginDelegate, scoped_refptr<base::SingleThreadTaskRunner> task_runner_; base::WaitableEvent* shutdown_event_; - int renderer_ipc_fd_; + IPC::ChannelHandle renderer_ipc_handle_; std::unique_ptr<IPC::SyncChannel> channel_; }; diff --git a/chromium/ppapi/native_client/BUILD.gn b/chromium/ppapi/native_client/BUILD.gn index 65b06f1f520..eef25a26d78 100644 --- a/chromium/ppapi/native_client/BUILD.gn +++ b/chromium/ppapi/native_client/BUILD.gn @@ -47,6 +47,8 @@ if (is_nacl) { irt_cpu = "x86_32" } else if (current_cpu == "x64") { irt_cpu = "x86_64" + } else if (current_cpu == "mipsel") { + irt_cpu = "mips32" } else { irt_cpu = current_cpu } diff --git a/chromium/ppapi/native_client/nacl_test_data.gni b/chromium/ppapi/native_client/nacl_test_data.gni index 398645c7b0d..67b8041fa14 100644 --- a/chromium/ppapi/native_client/nacl_test_data.gni +++ b/chromium/ppapi/native_client/nacl_test_data.gni @@ -228,6 +228,8 @@ template("nacl_test_data") { arch = "x86-64" } else if (translate_cpu == "arm") { arch = "armv7" + } else if (translate_cpu == "mipsel") { + arch = "mipsel" } } diff --git a/chromium/ppapi/native_client/native_client.gyp b/chromium/ppapi/native_client/native_client.gyp deleted file mode 100644 index c4e5fae3fed..00000000000 --- a/chromium/ppapi/native_client/native_client.gyp +++ /dev/null @@ -1,309 +0,0 @@ -# Copyright (c) 2012 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. - -{ - 'includes': [ - '../../build/common_untrusted.gypi', - ], - 'conditions': [ - ['disable_nacl==0 and disable_nacl_untrusted==0', { - 'targets': [ - { - 'target_name': 'ppapi_lib', - 'type': 'none', - 'dependencies': [ - '../../native_client/src/untrusted/pthread/pthread.gyp:pthread_lib', - 'src/untrusted/irt_stub/irt_stub.gyp:ppapi_stub_lib', - ], - 'include_dirs': [ - '..', - ], - 'copies': [ - { - 'destination': '>(tc_include_dir_newlib)/nacl', - 'files': [ - 'src/shared/ppapi_proxy/ppruntime.h', - ], - }, - - { - 'destination': '>(tc_lib_dir_pnacl_newlib)', - 'files': [ - 'src/untrusted/irt_stub/libppapi.a', - ], - }, - ], - 'conditions': [ - ['target_arch=="ia32" or target_arch=="x64"', { - 'copies': [ - { - 'destination': '>(tc_include_dir_glibc)/include/nacl', - 'files': [ - 'src/shared/ppapi_proxy/ppruntime.h', - ], - }, - ], - }], - ['target_arch=="ia32"', { - 'copies': [ - # Here we copy linker scripts out of the Native Client repo.. - # These are source, not build artifacts. - { - 'destination': '>(tc_lib_dir_newlib32)', - 'files': [ - 'src/untrusted/irt_stub/libppapi.a', - ], - }, - { - 'destination': '>(tc_lib_dir_glibc32)', - 'files': [ - 'src/untrusted/irt_stub/libppapi.a', - 'src/untrusted/irt_stub/libppapi.so', - ], - }, - ], - }], - ['target_arch=="x64" or (target_arch=="ia32" and OS=="win")', { - 'copies': [ - { - 'destination': '>(tc_lib_dir_newlib64)', - 'files': [ - 'src/untrusted/irt_stub/libppapi.a', - ], - }, - { - 'destination': '>(tc_lib_dir_glibc64)', - 'files': [ - 'src/untrusted/irt_stub/libppapi.a', - 'src/untrusted/irt_stub/libppapi.so', - ], - }, - ] - }], - ['target_arch=="arm"', { - 'copies': [ - { - 'destination': '>(tc_lib_dir_newlib_arm)', - 'files': [ - 'src/untrusted/irt_stub/libppapi.a', - ], - }, - { - 'destination': '>(tc_lib_dir_glibc_arm)', - 'files': [ - 'src/untrusted/irt_stub/libppapi.a', - 'src/untrusted/irt_stub/libppapi.so', - ], - }, - ] - }], - ['target_arch=="mipsel"', { - 'copies': [ - { - 'destination': '>(tc_lib_dir_newlib_mips)', - 'files': [ - 'src/untrusted/irt_stub/libppapi.a', - ], - }, - ] - }] - ], - }, - { - 'target_name': 'nacl_irt', - 'type': 'none', - 'variables': { - 'nexe_target': 'nacl_irt', - # These out_* fields override the default filenames, which - # include a "_newlib" suffix and places them in the target - # directory. - 'out_newlib64': '<(PRODUCT_DIR)/nacl_irt_x86_64.nexe', - 'out_newlib32': '<(PRODUCT_DIR)/nacl_irt_x86_32.nexe', - 'out_newlib_arm': '<(PRODUCT_DIR)/nacl_irt_arm.nexe', - 'out_newlib_mips': '<(PRODUCT_DIR)/nacl_irt_mips32.nexe', - 'build_glibc': 0, - 'build_newlib': 0, - 'build_irt': 1, - 'include_dirs': [ - '..', - ], - 'link_flags': [ - '-Wl,--start-group', - '-lirt_browser', - '-lpnacl_irt_shim_for_irt', - '-lppapi_proxy_nacl', - '-lppapi_ipc_nacl', - '-lppapi_shared_nacl', - '-lgles2_implementation_nacl', - '-lgles2_cmd_helper_nacl', - '-lgles2_utils_nacl', - '-lcommand_buffer_client_nacl', - '-lcommand_buffer_common_nacl', - '-ltracing_nacl', - '-lgpu_ipc_nacl', - '-lipc_nacl', - '-lbase_nacl', - '-lshared_memory_support_nacl', - '-limc_syscalls', - '-lplatform', - '-lgio', - '-lmojo_cpp_bindings_nacl', - '-lmojo_cpp_system_nacl', - '-lmojo_public_system_nacl', - '-lmojo_system_impl_nacl', - '-Wl,--end-group', - '-lm', - ], - 'extra_args': [ - '--strip-all', - ], - 'conditions': [ - # untrusted.gypi and build_nexe.py currently build - # both x86-32 and x86-64 whenever target_arch is some - # flavor of x86. However, on non-windows platforms - # we only need one architecture. - ['OS!="win" and target_arch=="ia32"', - { - 'enable_x86_64': 0 - } - ], - ['target_arch=="x64"', - { - 'enable_x86_32': 0 - } - ], - ['target_arch=="ia32" or target_arch=="x64"', { - 'extra_deps_newlib64': [ - '>(tc_lib_dir_irt64)/libppapi_proxy_nacl.a', - '>(tc_lib_dir_irt64)/libppapi_ipc_nacl.a', - '>(tc_lib_dir_irt64)/libppapi_shared_nacl.a', - '>(tc_lib_dir_irt64)/libgles2_implementation_nacl.a', - '>(tc_lib_dir_irt64)/libcommand_buffer_client_nacl.a', - '>(tc_lib_dir_irt64)/libcommand_buffer_common_nacl.a', - '>(tc_lib_dir_irt64)/libgpu_ipc_nacl.a', - '>(tc_lib_dir_irt64)/libtracing_nacl.a', - '>(tc_lib_dir_irt64)/libgles2_cmd_helper_nacl.a', - '>(tc_lib_dir_irt64)/libgles2_utils_nacl.a', - '>(tc_lib_dir_irt64)/libipc_nacl.a', - '>(tc_lib_dir_irt64)/libbase_nacl.a', - '>(tc_lib_dir_irt64)/libirt_browser.a', - '>(tc_lib_dir_irt64)/libpnacl_irt_shim_for_irt.a', - '>(tc_lib_dir_irt64)/libshared_memory_support_nacl.a', - '>(tc_lib_dir_irt64)/libplatform.a', - '>(tc_lib_dir_irt64)/libimc_syscalls.a', - '>(tc_lib_dir_irt64)/libgio.a', - '>(tc_lib_dir_irt64)/libmojo_cpp_bindings_nacl.a', - '>(tc_lib_dir_irt64)/libmojo_cpp_system_nacl.a', - '>(tc_lib_dir_irt64)/libmojo_public_system_nacl.a', - '>(tc_lib_dir_irt64)/libmojo_system_impl_nacl.a', - ], - 'extra_deps_newlib32': [ - '>(tc_lib_dir_irt32)/libppapi_proxy_nacl.a', - '>(tc_lib_dir_irt32)/libppapi_ipc_nacl.a', - '>(tc_lib_dir_irt32)/libppapi_shared_nacl.a', - '>(tc_lib_dir_irt32)/libgles2_implementation_nacl.a', - '>(tc_lib_dir_irt32)/libcommand_buffer_client_nacl.a', - '>(tc_lib_dir_irt32)/libcommand_buffer_common_nacl.a', - '>(tc_lib_dir_irt32)/libgpu_ipc_nacl.a', - '>(tc_lib_dir_irt32)/libtracing_nacl.a', - '>(tc_lib_dir_irt32)/libgles2_cmd_helper_nacl.a', - '>(tc_lib_dir_irt32)/libgles2_utils_nacl.a', - '>(tc_lib_dir_irt32)/libipc_nacl.a', - '>(tc_lib_dir_irt32)/libbase_nacl.a', - '>(tc_lib_dir_irt32)/libirt_browser.a', - '>(tc_lib_dir_irt32)/libpnacl_irt_shim_for_irt.a', - '>(tc_lib_dir_irt32)/libshared_memory_support_nacl.a', - '>(tc_lib_dir_irt32)/libplatform.a', - '>(tc_lib_dir_irt32)/libimc_syscalls.a', - '>(tc_lib_dir_irt32)/libgio.a', - '>(tc_lib_dir_irt32)/libmojo_cpp_bindings_nacl.a', - '>(tc_lib_dir_irt32)/libmojo_cpp_system_nacl.a', - '>(tc_lib_dir_irt32)/libmojo_public_system_nacl.a', - '>(tc_lib_dir_irt32)/libmojo_system_impl_nacl.a', - ], - }], - ['target_arch=="arm"', { - 'extra_deps_arm': [ - '>(tc_lib_dir_irt_arm)/libppapi_proxy_nacl.a', - '>(tc_lib_dir_irt_arm)/libppapi_ipc_nacl.a', - '>(tc_lib_dir_irt_arm)/libppapi_shared_nacl.a', - '>(tc_lib_dir_irt_arm)/libgles2_implementation_nacl.a', - '>(tc_lib_dir_irt_arm)/libcommand_buffer_client_nacl.a', - '>(tc_lib_dir_irt_arm)/libcommand_buffer_common_nacl.a', - '>(tc_lib_dir_irt_arm)/libgpu_ipc_nacl.a', - '>(tc_lib_dir_irt_arm)/libtracing_nacl.a', - '>(tc_lib_dir_irt_arm)/libgles2_cmd_helper_nacl.a', - '>(tc_lib_dir_irt_arm)/libgles2_utils_nacl.a', - '>(tc_lib_dir_irt_arm)/libipc_nacl.a', - '>(tc_lib_dir_irt_arm)/libbase_nacl.a', - '>(tc_lib_dir_irt_arm)/libirt_browser.a', - '>(tc_lib_dir_irt_arm)/libpnacl_irt_shim_for_irt.a', - '>(tc_lib_dir_irt_arm)/libshared_memory_support_nacl.a', - '>(tc_lib_dir_irt_arm)/libplatform.a', - '>(tc_lib_dir_irt_arm)/libimc_syscalls.a', - '>(tc_lib_dir_irt_arm)/libgio.a', - '>(tc_lib_dir_irt_arm)/libmojo_cpp_bindings_nacl.a', - '>(tc_lib_dir_irt_arm)/libmojo_cpp_system_nacl.a', - '>(tc_lib_dir_irt_arm)/libmojo_public_system_nacl.a', - '>(tc_lib_dir_irt_arm)/libmojo_system_impl_nacl.a', - ], - }], - ['target_arch=="mipsel"', { - 'extra_deps_mips': [ - '>(tc_lib_dir_irt_mips)/libppapi_proxy_nacl.a', - '>(tc_lib_dir_irt_mips)/libppapi_ipc_nacl.a', - '>(tc_lib_dir_irt_mips)/libppapi_shared_nacl.a', - '>(tc_lib_dir_irt_mips)/libgles2_implementation_nacl.a', - '>(tc_lib_dir_irt_mips)/libcommand_buffer_client_nacl.a', - '>(tc_lib_dir_irt_mips)/libcommand_buffer_common_nacl.a', - '>(tc_lib_dir_irt_mips)/libgpu_ipc_nacl.a', - '>(tc_lib_dir_irt_mips)/libtracing_nacl.a', - '>(tc_lib_dir_irt_mips)/libgles2_cmd_helper_nacl.a', - '>(tc_lib_dir_irt_mips)/libgles2_utils_nacl.a', - '>(tc_lib_dir_irt_mips)/libipc_nacl.a', - '>(tc_lib_dir_irt_mips)/libbase_nacl.a', - '>(tc_lib_dir_irt_mips)/libirt_browser.a', - '>(tc_lib_dir_irt_mips)/libpnacl_irt_shim_for_irt.a', - '>(tc_lib_dir_irt_mips)/libshared_memory_support_nacl.a', - '>(tc_lib_dir_irt_mips)/libplatform.a', - '>(tc_lib_dir_irt_mips)/libimc_syscalls.a', - '>(tc_lib_dir_irt_mips)/libgio.a', - '>(tc_lib_dir_irt_mips)/libmojo_cpp_bindings_nacl.a', - '>(tc_lib_dir_irt_mips)/libmojo_cpp_system_nacl.a', - '>(tc_lib_dir_irt_mips)/libmojo_public_system_nacl.a', - '>(tc_lib_dir_irt_mips)/libmojo_system_impl_nacl.a', - ], - }], - ], - }, - 'dependencies': [ - 'src/untrusted/pnacl_irt_shim/pnacl_irt_shim.gyp:irt', - '../ppapi_proxy_nacl.gyp:ppapi_proxy_nacl', - '../ppapi_ipc_nacl.gyp:ppapi_ipc_nacl', - '../ppapi_shared_nacl.gyp:ppapi_shared_nacl', - '../../gpu/command_buffer/command_buffer_nacl.gyp:gles2_utils_nacl', - '../../gpu/gpu_nacl.gyp:command_buffer_client_nacl', - '../../gpu/gpu_nacl.gyp:command_buffer_common_nacl', - '../../gpu/gpu_nacl.gyp:gles2_implementation_nacl', - '../../gpu/gpu_nacl.gyp:gles2_cmd_helper_nacl', - '../../gpu/gpu_nacl.gyp:gpu_ipc_nacl', - '../../components/tracing_nacl.gyp:tracing_nacl', - '../../ipc/ipc_nacl.gyp:ipc_nacl', - '../../base/base_nacl.gyp:base_nacl', - '../../media/media_nacl.gyp:shared_memory_support_nacl', - '../../mojo/mojo_edk_nacl.gyp:mojo_system_impl_nacl', - '../../mojo/mojo_public_nacl.gyp:mojo_cpp_bindings_nacl', - '../../mojo/mojo_public_nacl.gyp:mojo_cpp_system_nacl', - '../../mojo/mojo_public_nacl.gyp:mojo_public_system_nacl', - '../../native_client/src/untrusted/irt/irt.gyp:irt_browser_lib', - '../../native_client/src/shared/platform/platform.gyp:platform_lib', - '../../native_client/src/tools/tls_edit/tls_edit.gyp:tls_edit#host', - '../../native_client/src/untrusted/nacl/nacl.gyp:imc_syscalls_lib', - '../../native_client/src/shared/gio/gio.gyp:gio_lib', - ], - }, - ], - }], - ], -} diff --git a/chromium/ppapi/native_client/src/untrusted/irt_stub/irt_stub.gyp b/chromium/ppapi/native_client/src/untrusted/irt_stub/irt_stub.gyp deleted file mode 100644 index e1b2d85b6ea..00000000000 --- a/chromium/ppapi/native_client/src/untrusted/irt_stub/irt_stub.gyp +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright (c) 2011 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. - -{ - 'includes': [ - '../../../../../build/common_untrusted.gypi', - ], - 'targets' : [ - { - 'target_name': 'ppapi_stub_lib', - 'type': 'none', - 'variables': { - 'nlib_target': 'libppapi_stub.a', - 'build_glibc': 1, - 'build_newlib': 1, - 'build_pnacl_newlib': 1, - }, - # Always compile libppapi_stub with -fPIC so that -lppapi can be linked - # into shared libraries (libppapi.so is a linker script that pulls in - # ppapi_stub). - 'compile_flags': [ '-fPIC' ], - 'include_dirs': [ - '../../../..', - ], - 'sources': [ - 'plugin_main_irt.c', - 'ppapi_plugin_main.c', - 'ppapi_plugin_start.c', - 'thread_creator.c' - ], - }, - ], -} diff --git a/chromium/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_irt_shim.gyp b/chromium/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_irt_shim.gyp deleted file mode 100644 index 83d67c6975c..00000000000 --- a/chromium/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_irt_shim.gyp +++ /dev/null @@ -1,96 +0,0 @@ -# Copyright (c) 2012 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. - -{ - 'includes': [ - '../../../../../native_client/build/untrusted.gypi', - ], - 'targets': [ - { - # The full library, which PNaCl uses for offline .pexe -> .nexe. - # We keep the target names in this file short to avoid having really long - # path names on Windows. - # https://code.google.com/p/nativeclient/issues/detail?id=3846 - 'target_name': 'aot', - 'type': 'none', - 'variables': { - 'nlib_target': 'libpnacl_irt_shim.a', - 'out_pnacl_newlib_arm': '>(tc_lib_dir_pnacl_translate)/lib-arm/>(nlib_target)', - 'out_pnacl_newlib_x86_32': '>(tc_lib_dir_pnacl_translate)/lib-x86-32/>(nlib_target)', - 'out_pnacl_newlib_x86_64': '>(tc_lib_dir_pnacl_translate)/lib-x86-64/>(nlib_target)', - 'out_pnacl_newlib_mips': '>(tc_lib_dir_pnacl_translate)/lib-mips32/>(nlib_target)', - # TODO(hidehiko): When crrev.com/524573002 is submitted and NaCl - # repository is rolled out with the CL, then we can simply remove this - # variable, as it is no longer used. - 'out_pnacl_newlib_x86_32_nonsfi': '>(tc_lib_dir_pnacl_translate)/lib-x86-32-nonsfi/>(nlib_target)', - 'out_newlib32_nonsfi': '>(tc_lib_dir_pnacl_translate)/lib-x86-32-nonsfi/>(nlib_target)', - 'out_pnacl_newlib_arm_nonsfi': '>(tc_lib_dir_pnacl_translate)/lib-arm-nonsfi/>(nlib_target)', - 'out_newlib_arm_nonsfi': '>(tc_lib_dir_pnacl_translate)/lib-arm-nonsfi/>(nlib_target)', - 'build_pnacl_newlib': 1, - 'pnacl_native_biased': 1, - 'enable_x86_32': 1, - 'enable_x86_64': 1, - 'enable_arm': 1, - 'enable_mips': 1, - 'enable_x86_32_nonsfi': 1, - 'enable_arm_nonsfi': 1, - 'sources': [ - 'irt_shim_ppapi.c', - 'pnacl_shim.c', - 'shim_entry.c', - 'shim_ppapi.c', - ], - 'extra_args': [ - '--strip-debug', - ], - # Indicate that this variant of the shim library should not depend on - # the unstable/private IRT hook interface. - 'compile_flags': [ - '-DPNACL_SHIM_AOT', - ], - }, - }, - # Smaller shim library for PNaCl in-browser translation. - # Uses an unstable IRT hook interface to get the shim from the IRT itself. - # If we ever change that hook interface or change the in-IRT shim's ABI, - # we would need to clear the translation cache to match the new IRT. - { - 'target_name': 'browser', - 'type': 'none', - 'variables': { - # Use a different name from the AOT variant. Have the - # pnacl_support_extension rename this to the canonical name when - # copying to the final target directory. - 'nlib_target': 'libpnacl_irt_shim_browser.a', - 'build_newlib': 1, - 'sources': [ - 'shim_entry.c', - 'shim_ppapi.c', - ], - 'extra_args': [ - '--strip-debug', - ], - }, - }, - { - # Second half of shim library for PNaCl in-browser translation. - # This half goes into the IRT and is returned by the unstable - # IRT hook interface. - 'target_name': 'irt', - 'type': 'none', - 'variables': { - 'nlib_target': 'libpnacl_irt_shim_for_irt.a', - 'build_glibc': 0, - 'build_newlib': 0, - # Unlike the above, build this the way the IRT is built so that the - # output library directories match the IRT linking search paths. - 'build_irt': 1, - 'sources': [ - 'irt_shim_ppapi.c', - 'pnacl_shim.c', - ], - }, - }, - ], -} diff --git a/chromium/ppapi/native_client/src/untrusted/pnacl_irt_shim/shim_ppapi.c b/chromium/ppapi/native_client/src/untrusted/pnacl_irt_shim/shim_ppapi.c index e6984edf44a..557ccb18a88 100644 --- a/chromium/ppapi/native_client/src/untrusted/pnacl_irt_shim/shim_ppapi.c +++ b/chromium/ppapi/native_client/src/untrusted/pnacl_irt_shim/shim_ppapi.c @@ -6,23 +6,26 @@ #include "ppapi/native_client/src/untrusted/pnacl_irt_shim/shim_ppapi.h" -#include <string.h> #include "native_client/src/untrusted/irt/irt.h" #include "ppapi/nacl_irt/public/irt_ppapi.h" #include "ppapi/native_client/src/shared/ppapi_proxy/ppruntime.h" #include "ppapi/native_client/src/untrusted/pnacl_irt_shim/irt_shim_ppapi.h" #include "ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.h" -/* Use local strcmp to avoid dependency on libc. */ -static int mystrcmp(const char* s1, const char *s2) { - while((*s1 && *s2) && (*s1++ == *s2++)); - return *(--s1) - *(--s2); +#define ARRAY_SIZEOF(a) (sizeof(a) / sizeof(a[0])) + +/* Returns 1 if the strings s1 and s2 are equal, comparing only the first n + bytes of s1 and s2; 0 otherwise. */ +static int streq(const char *s1, const char *s2, size_t n) { + for(; n && *s1 && *s2 && *s1 == *s2; ++s1, ++s2, --n); + return n == 0 || *s1 == *s2; } + TYPE_nacl_irt_query __pnacl_real_irt_query_func = NULL; size_t __pnacl_wrap_irt_query_func(const char *interface_ident, - void *table, size_t tablesize) { + void *table, size_t tablesize) { /* * Note there is a benign race in initializing the wrapper. * We build the "hook" structure by copying from the IRT's hook and then @@ -30,7 +33,8 @@ size_t __pnacl_wrap_irt_query_func(const char *interface_ident, * attempting to do this simultaneously, which should not be a problem, * as they are writing the same values. */ - if (0 != mystrcmp(interface_ident, NACL_IRT_PPAPIHOOK_v0_1)) { + if (!streq(interface_ident, NACL_IRT_PPAPIHOOK_v0_1, + ARRAY_SIZEOF(NACL_IRT_PPAPIHOOK_v0_1))) { /* * The interface is not wrapped, so use the real interface. */ diff --git a/chromium/ppapi/native_client/src/untrusted/pnacl_support_extension/pnacl_support_extension.gyp b/chromium/ppapi/native_client/src/untrusted/pnacl_support_extension/pnacl_support_extension.gyp deleted file mode 100644 index 34e51715d72..00000000000 --- a/chromium/ppapi/native_client/src/untrusted/pnacl_support_extension/pnacl_support_extension.gyp +++ /dev/null @@ -1,180 +0,0 @@ -# Copyright (c) 2012 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. - -{ - # re: untrusted.gypi -- Though this doesn't really use build_nexe.py or - # anything, it depends on untrusted nexes from the toolchain and for the shim. - 'includes': [ - '../../../../../build/common_untrusted.gypi', - ], - 'targets': [ - { - 'target_name': 'pnacl_support_extension', - 'type': 'none', - 'variables': { - 'pnacl_translator_dir%': "<(DEPTH)/native_client/toolchain/<(TOOLCHAIN_OS)_x86/pnacl_translator", - 'pnacl_translator_stamp%': "pnacl_translator.json", - 'pnacl_output_prefix': '<(PRODUCT_DIR)/pnacl/pnacl_public_', - }, - 'conditions': [ - ['disable_nacl==0 and disable_pnacl==0 and disable_nacl_untrusted==0', { - 'dependencies': [ - '../../../../../ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_irt_shim.gyp:browser', - ], - 'sources': [ - 'pnacl_component_crx_gen.py', - ], - # We could use 'copies', but we want to rename the files - # in a white-listed way first. Thus use a script. - 'actions': [ - { - 'action_name': 'generate_pnacl_support_extension', - 'inputs': [ - 'pnacl_component_crx_gen.py', - '<(DEPTH)/native_client/build/package_version/package_version.py', - # A stamp file representing the contents of pnacl_translator. - '<(pnacl_translator_dir)/<(pnacl_translator_stamp)', - '<(DEPTH)/native_client/pnacl/driver/pnacl_info_template.json', - '<(DEPTH)/native_client/toolchain_revisions/pnacl_translator.json', - ], - 'outputs': [ - '<(pnacl_output_prefix)pnacl_json', - ], - 'conditions': [ - # On Windows, for offline testing (i.e., without component updater - # selecting the platform-specific files with multi-CRXes), we need - # to stage both x86-32 and x86-64 (because 32-bit chrome on 64-bit - # windows will need 64-bit nexes). - ['OS=="win"', { - 'outputs': [ - '<(pnacl_output_prefix)x86_32_crtbegin_o', - '<(pnacl_output_prefix)x86_32_ld_nexe', - '<(pnacl_output_prefix)x86_32_libcrt_platform_a', - '<(pnacl_output_prefix)x86_32_libgcc_a', - '<(pnacl_output_prefix)x86_32_libpnacl_irt_shim_a', - '<(pnacl_output_prefix)x86_32_pnacl_llc_nexe', - '<(pnacl_output_prefix)x86_32_pnacl_sz_nexe', - '<(pnacl_output_prefix)x86_64_crtbegin_o', - '<(pnacl_output_prefix)x86_64_ld_nexe', - '<(pnacl_output_prefix)x86_64_libcrt_platform_a', - '<(pnacl_output_prefix)x86_64_libgcc_a', - '<(pnacl_output_prefix)x86_64_libpnacl_irt_shim_a', - '<(pnacl_output_prefix)x86_64_pnacl_llc_nexe', - '<(pnacl_output_prefix)x86_64_pnacl_sz_nexe', - ], - 'inputs': [ - '>(tc_lib_dir_newlib32)/libpnacl_irt_shim_browser.a', - '>(tc_lib_dir_newlib64)/libpnacl_irt_shim_browser.a', - ], - 'variables': { - 'lib_overrides': [ - # Use the two freshly generated shims. - '--lib_override=ia32,>(tc_lib_dir_newlib32)/libpnacl_irt_shim_browser.a,libpnacl_irt_shim.a', - '--lib_override=x64,>(tc_lib_dir_newlib64)/libpnacl_irt_shim_browser.a,libpnacl_irt_shim.a', - ], - }, - }], - # Non-windows installers only need the matching architecture. - ['OS!="win"', { - 'conditions': [ - ['target_arch=="arm"', { - 'outputs': [ - '<(pnacl_output_prefix)arm_crtbegin_o', - '<(pnacl_output_prefix)arm_ld_nexe', - '<(pnacl_output_prefix)arm_libcrt_platform_a', - '<(pnacl_output_prefix)arm_libgcc_a', - '<(pnacl_output_prefix)arm_libpnacl_irt_shim_a', - '<(pnacl_output_prefix)arm_pnacl_llc_nexe', - '<(pnacl_output_prefix)arm_pnacl_sz_nexe', - ], - 'inputs': [ - '>(tc_lib_dir_newlib_arm)/libpnacl_irt_shim_browser.a', - ], - 'variables': { - 'lib_overrides': [ - # Use the freshly generated shim. - '--lib_override=arm,>(tc_lib_dir_newlib_arm)/libpnacl_irt_shim_browser.a,libpnacl_irt_shim.a', - ], - }, - }], - ['target_arch=="mipsel"', { - 'outputs': [ - '<(pnacl_output_prefix)mips32_crtbegin_o', - '<(pnacl_output_prefix)mips32_ld_nexe', - '<(pnacl_output_prefix)mips32_libcrt_platform_a', - '<(pnacl_output_prefix)mips32_libgcc_a', - '<(pnacl_output_prefix)mips32_libpnacl_irt_shim_a', - '<(pnacl_output_prefix)mips32_pnacl_llc_nexe', - ], - 'inputs': [ - '>(tc_lib_dir_newlib_mips)/libpnacl_irt_shim_browser.a', - ], - 'variables': { - 'lib_overrides': [ - # Use the freshly generated shim. - '--lib_override=mipsel,>(tc_lib_dir_newlib_mips)/libpnacl_irt_shim_browser.a,libpnacl_irt_shim.a', - ], - }, - }], - ['target_arch=="ia32"', { - 'outputs': [ - '<(pnacl_output_prefix)x86_32_crtbegin_o', - '<(pnacl_output_prefix)x86_32_ld_nexe', - '<(pnacl_output_prefix)x86_32_libcrt_platform_a', - '<(pnacl_output_prefix)x86_32_libgcc_a', - '<(pnacl_output_prefix)x86_32_libpnacl_irt_shim_a', - '<(pnacl_output_prefix)x86_32_pnacl_llc_nexe', - '<(pnacl_output_prefix)x86_32_pnacl_sz_nexe', - ], - 'inputs': [ - '>(tc_lib_dir_newlib32)/libpnacl_irt_shim_browser.a', - ], - 'variables': { - 'lib_overrides': [ - # Use the freshly generated shim. - '--lib_override=ia32,>(tc_lib_dir_newlib32)/libpnacl_irt_shim_browser.a,libpnacl_irt_shim.a', - ], - }, - }], - ['target_arch=="x64"', { - 'outputs': [ - '<(pnacl_output_prefix)x86_64_crtbegin_o', - '<(pnacl_output_prefix)x86_64_ld_nexe', - '<(pnacl_output_prefix)x86_64_libcrt_platform_a', - '<(pnacl_output_prefix)x86_64_libgcc_a', - '<(pnacl_output_prefix)x86_64_libpnacl_irt_shim_a', - '<(pnacl_output_prefix)x86_64_pnacl_llc_nexe', - '<(pnacl_output_prefix)x86_64_pnacl_sz_nexe', - ], - 'inputs': [ - '>(tc_lib_dir_newlib64)/libpnacl_irt_shim_browser.a', - ], - 'variables': { - 'lib_overrides': [ - # Use the freshly generated shim. - '--lib_override=x64,>(tc_lib_dir_newlib64)/libpnacl_irt_shim_browser.a,libpnacl_irt_shim.a', - ], - }, - }], - ], - }], - ], - 'action': [ - 'python', 'pnacl_component_crx_gen.py', - '--dest=<(PRODUCT_DIR)/pnacl', - '<@(lib_overrides)', - '--target_arch=<(target_arch)', - '--info_template_path=<(DEPTH)/native_client/pnacl/driver/pnacl_info_template.json', - '--pnacl_translator_path=<(pnacl_translator_dir)', - '--package_version_path=<(DEPTH)/native_client/build/package_version/package_version.py', - '--pnacl_package_name=pnacl_translator', - # ABI Version Number. - '1', - ], - }, - ], - }], - ], - }], -} diff --git a/chromium/ppapi/native_client/tools/browser_tester/browsertester/browserlauncher.py b/chromium/ppapi/native_client/tools/browser_tester/browsertester/browserlauncher.py index 1abbb4479d8..b07be1062d9 100755 --- a/chromium/ppapi/native_client/tools/browser_tester/browsertester/browserlauncher.py +++ b/chromium/ppapi/native_client/tools/browser_tester/browsertester/browserlauncher.py @@ -268,13 +268,12 @@ class ChromeLauncher(BrowserLauncher): # https://code.google.com/p/chromium/issues/detail?id=171836) '--enable-logging', '--disable-web-resources', - '--disable-preconnect', + # This prevents Chrome from making "hidden" network requests at + # startup and navigation. These requests could be a source of + # non-determinism, and they also add noise to the netlogs. + '--disable-features=NetworkPrediction', # This is speculative, sync should not occur with a clean profile. '--disable-sync', - # This prevents Chrome from making "hidden" network requests at - # startup. These requests could be a source of non-determinism, - # and they also add noise to the netlogs. - '--dns-prefetch-disable', '--no-first-run', '--no-default-browser-check', '--log-level=1', diff --git a/chromium/ppapi/ppapi.gyp b/chromium/ppapi/ppapi.gyp deleted file mode 100644 index 94e2daafc9d..00000000000 --- a/chromium/ppapi/ppapi.gyp +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) 2012 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. - -# This is the "public" ppapi.gyp file, which must have dependencies on the -# redistributable portions of PPAPI only. This prevents circular dependencies -# in the .gyp files (since ppapi_internal depends on parts of Chrome). - -{ - 'variables': { - 'chromium_code': 1, # Use higher warning level. - }, - 'target_defaults': { - 'conditions': [ - # Linux shared libraries should always be built -fPIC. - # - # TODO(ajwong): For internal pepper plugins, which are statically linked - # into chrome, do we want to build w/o -fPIC? If so, how can we express - # that in the build system? - ['os_posix == 1 and OS != "mac" and OS != "android"', { - 'cflags': ['-fPIC', '-fvisibility=hidden'], - - # This is needed to make the Linux shlib build happy. Without this, - # -fvisibility=hidden gets stripped by the exclusion in common.gypi - # that is triggered when a shared library build is specified. - 'cflags/': [['include', '^-fvisibility=hidden$']], - }], - ], - }, - 'includes': [ - 'ppapi_sources.gypi', - 'ppapi_cpp.gypi', - 'ppapi_gl.gypi', - ], -} diff --git a/chromium/ppapi/ppapi_cpp.gypi b/chromium/ppapi/ppapi_cpp.gypi deleted file mode 100644 index 0a07d53cbe8..00000000000 --- a/chromium/ppapi/ppapi_cpp.gypi +++ /dev/null @@ -1,69 +0,0 @@ -# Copyright (c) 2011 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. - -# Shared source lists between trusted and untrusted targets are stored in -# ppapi_sources.gypi. - -{ - 'includes': [ - 'ppapi_sources.gypi', - ], - 'targets': [ - { - # GN version: //ppapi/c - 'target_name': 'ppapi_c', - 'type': 'none', - 'all_dependent_settings': { - 'include_dirs+': [ - '..', - ], - }, - 'sources': [ - '<@(c_source_files)', - ], - }, - { - # GN version: //ppapi/cpp:objects - 'target_name': 'ppapi_cpp_objects', - 'type': 'static_library', - 'dependencies': [ - 'ppapi_c' - ], - 'include_dirs+': [ - '..', - ], - 'sources': [ - '<@(cpp_source_files)', - ], - }, - { - # GN version: //ppapi/cpp - 'target_name': 'ppapi_cpp', - 'type': 'static_library', - 'dependencies': [ - 'ppapi_c', - 'ppapi_cpp_objects', - ], - 'include_dirs+': [ - '..', - ], - 'sources': [ - 'cpp/module_embedder.h', - 'cpp/ppp_entrypoints.cc', - ], - }, - { - # GN version: //ppapi/cpp/private:internal_module - 'target_name': 'ppapi_internal_module', - 'type': 'static_library', - 'include_dirs+': [ - '..', - ], - 'sources': [ - 'cpp/private/internal_module.cc', - 'cpp/private/internal_module.h', - ] - }, - ], -} diff --git a/chromium/ppapi/ppapi_gl.gypi b/chromium/ppapi/ppapi_gl.gypi deleted file mode 100644 index 47a0a4cd493..00000000000 --- a/chromium/ppapi/ppapi_gl.gypi +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (c) 2011 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. - -{ - 'targets': [ - { - # GN version: //ppapi/lib/gl/gles2 - 'target_name': 'ppapi_gles2', - 'type': 'static_library', - 'dependencies': [ - 'ppapi_c', - ], - 'include_dirs': [ - 'lib/gl/include', - ], - 'sources': [ - 'lib/gl/gles2/gl2ext_ppapi.c', - 'lib/gl/gles2/gl2ext_ppapi.h', - 'lib/gl/gles2/gles2.c', - ], - }, - ], -} diff --git a/chromium/ppapi/ppapi_host.gypi b/chromium/ppapi/ppapi_host.gypi deleted file mode 100644 index 3113ddf5c22..00000000000 --- a/chromium/ppapi/ppapi_host.gypi +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright (c) 2012 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. - -{ - 'targets': [ - { - # GN version: //ppapi/host - 'target_name': 'ppapi_host', - 'type': '<(component)', - 'dependencies': [ - '../base/base.gyp:base', - '../ipc/ipc.gyp:ipc', - '../media/media.gyp:shared_memory_support', - '../ui/surface/surface.gyp:surface', - '../url/url.gyp:url_lib', - 'ppapi.gyp:ppapi_c', - 'ppapi_internal.gyp:ppapi_ipc', - 'ppapi_internal.gyp:ppapi_proxy', - 'ppapi_internal.gyp:ppapi_shared', - ], - 'defines': [ - 'PPAPI_HOST_IMPLEMENTATION', - ], - 'sources': [ - # Note: sources list duplicated in GN build. - 'host/dispatch_host_message.h', - 'host/error_conversion.cc', - 'host/error_conversion.h', - 'host/host_factory.h', - 'host/host_message_context.cc', - 'host/host_message_context.h', - 'host/instance_message_filter.cc', - 'host/instance_message_filter.h', - 'host/message_filter_host.cc', - 'host/message_filter_host.h', - 'host/ppapi_host.cc', - 'host/ppapi_host.h', - 'host/ppapi_host_export.h', - 'host/resource_host.cc', - 'host/resource_host.h', - 'host/resource_message_filter.cc', - 'host/resource_message_filter.h', - 'host/resource_message_handler.cc', - 'host/resource_message_handler.h', - ], - }, - ], -} diff --git a/chromium/ppapi/ppapi_internal.gyp b/chromium/ppapi/ppapi_internal.gyp deleted file mode 100644 index c58423a8d8e..00000000000 --- a/chromium/ppapi/ppapi_internal.gyp +++ /dev/null @@ -1,268 +0,0 @@ -# Copyright (c) 2012 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. - -{ - 'variables': { - 'chromium_code': 1, # Use higher warning level. - }, - 'target_defaults': { - 'conditions': [ - # Linux shared libraries should always be built -fPIC. - # - # TODO(ajwong): For internal pepper plugins, which are statically linked - # into chrome, do we want to build w/o -fPIC? If so, how can we express - # that in the build system? - ['os_posix==1 and OS!="android" and OS!="mac"', { - 'cflags': ['-fPIC', '-fvisibility=hidden'], - - # This is needed to make the Linux shlib build happy. Without this, - # -fvisibility=hidden gets stripped by the exclusion in common.gypi - # that is triggered when a shared library build is specified. - 'cflags/': [['include', '^-fvisibility=hidden$']], - }], - ], - }, - 'includes': [ - 'ppapi_sources.gypi', - 'ppapi_host.gypi', - 'ppapi_ipc.gypi', - 'ppapi_proxy.gypi', - 'ppapi_shared.gypi', - 'ppapi_tests.gypi', - ], - 'targets': [ - { - # GN version: //ppapi/shared_impl and //ppapi/thunk - 'target_name': 'ppapi_shared', - 'type': '<(component)', - 'variables': { - # Set the ppapi_shared_target variable, so that we will pull in the - # sources from ppapi_shared.gypi (and only from there). We follow the - # same pattern for the other targets defined within this file. - 'ppapi_shared_target': 1, - }, - 'dependencies': [ - '../base/base.gyp:base', - '../base/base.gyp:base_i18n', - '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', - '../gpu/command_buffer/command_buffer.gyp:gles2_utils', - '../gpu/gpu.gyp:command_buffer_client', - '../gpu/gpu.gyp:gles2_implementation', - '../ipc/ipc.gyp:ipc', - '../media/media.gyp:shared_memory_support', - '../skia/skia.gyp:skia', - '../third_party/icu/icu.gyp:icuuc', - '../ui/surface/surface.gyp:surface', - '../url/url.gyp:url_lib', - 'ppapi.gyp:ppapi_c', - ], - 'export_dependent_settings': [ - '../base/base.gyp:base', - ], - 'conditions': [ - ['OS=="mac"', { - 'link_settings': { - 'libraries': [ - '$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework', - ], - }, - }], - ], - }, - ], - 'conditions': [ - ['component=="static_library"', { - # In a static build, build ppapi_ipc separately. - 'targets': [ - { - # GN version: //ppapi/proxy:ipc - 'target_name': 'ppapi_ipc', - 'type': 'static_library', - 'variables': { - 'ppapi_ipc_target': 1, - }, - 'dependencies': [ - '../base/base.gyp:base', - '../gpu/gpu.gyp:command_buffer_traits', - '../ipc/ipc.gyp:ipc', - '../skia/skia.gyp:skia', - 'ppapi.gyp:ppapi_c', - 'ppapi_shared', - ], - 'all_dependent_settings': { - 'include_dirs': [ - '..', - ], - }, - }, - { - # GN version: //ppapi/proxy - 'target_name': 'ppapi_proxy', - 'type': 'static_library', - 'variables': { - 'ppapi_proxy_target': 1, - }, - 'dependencies': [ - '../base/base.gyp:base', - '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', - '../gin/gin.gyp:gin', - '../gpu/gpu.gyp:gles2_implementation', - '../gpu/gpu.gyp:command_buffer_traits', - '../media/media.gyp:shared_memory_support', - '../ipc/ipc.gyp:ipc', - '../mojo/mojo_edk.gyp:mojo_system_impl', - '../skia/skia.gyp:skia', - '../third_party/icu/icu.gyp:icuuc', - '../third_party/icu/icu.gyp:icui18n', - '../ui/surface/surface.gyp:surface', - 'ppapi.gyp:ppapi_c', - 'ppapi_shared', - 'ppapi_ipc', - ], - 'all_dependent_settings': { - 'include_dirs': [ - '..', - ], - }, - 'conditions': [ - ['chrome_multiple_dll==1', { - 'dependencies': [ - '../third_party/WebKit/public/blink.gyp:blink_minimal', - ], - }, { - 'dependencies': [ - '../third_party/WebKit/public/blink.gyp:blink', - ], - }], - ], - }, - ], - }, - { # component != static_library - # In the component build, we'll just build ppapi_ipc in to ppapi_proxy. - 'targets': [ - { - # GN version: //ppapi:ppapi_proxy - 'target_name': 'ppapi_proxy', - 'type': 'shared_library', - 'variables': { - # Setting both variables means we pull in the sources from both - # ppapi_ipc.gypi and ppapi_proxy.gypi. - 'ppapi_ipc_target': 1, - 'ppapi_proxy_target': 1, - }, - 'dependencies': [ - '../base/base.gyp:base', - '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', - '../gin/gin.gyp:gin', - '../gpu/gpu.gyp:gles2_implementation', - '../gpu/gpu.gyp:command_buffer_traits', - '../media/media.gyp:shared_memory_support', - '../mojo/mojo_edk.gyp:mojo_system_impl', - '../ipc/ipc.gyp:ipc', - '../skia/skia.gyp:skia', - '../third_party/icu/icu.gyp:icuuc', - '../third_party/icu/icu.gyp:icui18n', - '../ui/surface/surface.gyp:surface', - 'ppapi.gyp:ppapi_c', - 'ppapi_shared', - ], - 'all_dependent_settings': { - 'include_dirs': [ - '..', - ], - }, - 'conditions': [ - ['chrome_multiple_dll==1', { - 'dependencies': [ - '../third_party/WebKit/public/blink.gyp:blink_minimal', - ], - }, { - 'dependencies': [ - '../third_party/WebKit/public/blink.gyp:blink', - ], - }], - ], - }, - { - # In component build, this is just a phony target that makes sure - # ppapi_proxy is built, since that's where the ipc sources go in the - # component build. - 'target_name': 'ppapi_ipc', - 'type': 'none', - 'dependencies': [ - 'ppapi_proxy', - ], - }, - ], - }], - ['disable_nacl!=1 and OS=="win" and target_arch=="ia32"', { - # In windows builds, we also want to define some targets to build in - # 64-bit mode for use by nacl64.exe (the NaCl helper process for 64-bit - # Windows). - 'targets': [ - { - # GN version: //ppapi:ppapi_shared - # (Should be automagical when compiling in the 64-bit toolchain.) - 'target_name': 'ppapi_shared_win64', - 'type': '<(component)', - 'variables': { - 'nacl_win64_target': 1, - 'ppapi_shared_target': 1, - }, - 'dependencies': [ - 'ppapi.gyp:ppapi_c', - '../base/base.gyp:base_win64', - '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations_win64', - '../gpu/gpu.gyp:command_buffer_common_win64', - '../ipc/ipc.gyp:ipc_win64', - ], - 'defines': [ - '<@(nacl_win64_defines)', - ], - 'export_dependent_settings': [ - '../base/base.gyp:base_win64', - ], - 'configurations': { - 'Common_Base': { - 'msvs_target_platform': 'x64', - }, - }, - }, - { - # GN version: //ppapi:ppapi_ipc - # (Should be automagical when compiling in the 64-bit toolchain.) - 'target_name': 'ppapi_ipc_win64', - 'type': 'static_library', - 'variables': { - 'nacl_win64_target': 1, - 'ppapi_ipc_target': 1, - }, - 'dependencies': [ - '../base/base.gyp:base_win64', - '../ipc/ipc.gyp:ipc_win64', - '../gpu/gpu.gyp:command_buffer_traits_win64', - 'ppapi.gyp:ppapi_c', - 'ppapi_shared_win64', - ], - 'export_dependent_settings': [ - '../gpu/gpu.gyp:command_buffer_traits_win64', - ], - 'defines': [ - '<@(nacl_win64_defines)', - ], - 'all_dependent_settings': { - 'include_dirs': [ - '..', - ], - }, - 'configurations': { - 'Common_Base': { - 'msvs_target_platform': 'x64', - }, - }, - }], - }], - ], -} diff --git a/chromium/ppapi/ppapi_ipc.gypi b/chromium/ppapi/ppapi_ipc.gypi deleted file mode 100644 index 132c0f11e92..00000000000 --- a/chromium/ppapi/ppapi_ipc.gypi +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright (c) 2012 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. - -{ - 'target_defaults': { - 'variables': { - 'nacl_win64_target': 0, - 'ppapi_ipc_target': 0, - }, - 'target_conditions': [ - # This part is shared between the targets defined below. - ['ppapi_ipc_target==1', { - 'sources': [ - 'proxy/nacl_message_scanner.cc', - 'proxy/nacl_message_scanner.h', - 'proxy/ppapi_messages.cc', - 'proxy/ppapi_messages.h', - 'proxy/ppapi_param_traits.cc', - 'proxy/ppapi_param_traits.h', - 'proxy/raw_var_data.cc', - 'proxy/raw_var_data.h', - 'proxy/resource_message_params.cc', - 'proxy/resource_message_params.h', - 'proxy/serialized_flash_menu.cc', - 'proxy/serialized_flash_menu.h', - 'proxy/serialized_handle.cc', - 'proxy/serialized_handle.h', - 'proxy/serialized_structs.cc', - 'proxy/serialized_structs.h', - 'proxy/serialized_var.cc', - 'proxy/serialized_var.h', - 'proxy/var_serialization_rules.h', - ], - 'include_dirs': [ - '..', - ], - 'target_conditions': [ - ['>(nacl_untrusted_build)==1 or >(nacl_win64_target)==1', { - 'sources!': [ - 'proxy/serialized_flash_menu.cc', - ], - }], - ], - }], - ], - }, -} diff --git a/chromium/ppapi/ppapi_ipc_nacl.gyp b/chromium/ppapi/ppapi_ipc_nacl.gyp deleted file mode 100644 index 3608f8042de..00000000000 --- a/chromium/ppapi/ppapi_ipc_nacl.gyp +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright 2014 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. - -{ - 'variables': { - 'chromium_code': 1, - }, - 'includes': [ - '../native_client/build/untrusted.gypi', - 'ppapi_ipc.gypi', - ], - 'conditions': [ - ['disable_nacl==0 and disable_nacl_untrusted==0', { - 'targets': [ - { - 'target_name': 'ppapi_ipc_nacl', - 'type': 'none', - 'variables': { - 'ppapi_ipc_target': 1, - 'nacl_win64_target': 0, - 'nacl_untrusted_build': 1, - 'nlib_target': 'libppapi_ipc_nacl.a', - 'build_glibc': 0, - 'build_newlib': 0, - 'build_irt': 1, - 'build_pnacl_newlib': 0, - 'build_nonsfi_helper': 1, - }, - 'include_dirs': [ - '..', - ], - 'dependencies': [ - '../base/base_nacl.gyp:base_nacl', - '../base/base_nacl.gyp:base_nacl_nonsfi', - '../gpu/gpu_nacl.gyp:gpu_ipc_nacl', - '../ipc/ipc_nacl.gyp:ipc_nacl', - '../ipc/ipc_nacl.gyp:ipc_nacl_nonsfi', - '../ppapi/ppapi_shared_nacl.gyp:ppapi_shared_nacl', - '../components/tracing_nacl.gyp:tracing_nacl', - ], - }, - ], - }], - ], -} diff --git a/chromium/ppapi/ppapi_nacl.gyp b/chromium/ppapi/ppapi_nacl.gyp deleted file mode 100644 index dd1ccba0c8c..00000000000 --- a/chromium/ppapi/ppapi_nacl.gyp +++ /dev/null @@ -1,402 +0,0 @@ -# Copyright 2014 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. - -# This GYP file defines untrusted (NaCl) targets. All targets in this -# file should be conditionally depended upon via 'disable_nacl!=1' to avoid -# requiring NaCl sources for building. - -{ - 'includes': [ - '../build/common_untrusted.gypi', - 'ppapi_sources.gypi', - ], - 'targets': [ - { - 'target_name': 'nacl_elf_loader', - 'type': 'none', - 'conditions': [ - ['target_arch=="arm" and disable_glibc==0', { - 'dependencies': [ - '<(DEPTH)/native_client/src/untrusted/elf_loader/elf_loader.gyp:elf_loader_nexe', - ], - 'actions': [ - { - 'action_name': 'copy_arm_elf_loader', - 'message': 'Copying elf_loader_arm.nexe', - 'inputs': [ - '<(PRODUCT_DIR)/elf_loader_newlib_arm.nexe', - ], - 'outputs': [ - '>(tc_lib_dir_glibc_arm)/elf_loader_arm.nexe', - ], - 'action': [ - 'python', '<(DEPTH)/build/cp.py', '>@(_inputs)', '>@(_outputs)' - ], - }], - }], - ], - }, - { - 'target_name': 'ppapi_cpp_lib', - 'type': 'none', - 'variables': { - 'nlib_target': 'libppapi_cpp.a', - 'nso_target': 'libppapi_cpp.so', - 'nacl_untrusted_build': 1, - 'build_glibc': 1, - 'build_newlib': 1, - 'build_pnacl_newlib': 1, - 'sources': [ - '<@(cpp_source_files)', - 'cpp/module_embedder.h', - 'cpp/ppp_entrypoints.cc', - ], - }, - }, - { - 'target_name': 'ppapi_gles2_lib', - 'type': 'none', - 'variables': { - 'nlib_target': 'libppapi_gles2.a', - 'nacl_untrusted_build': 1, - 'nso_target': 'libppapi_gles2.so', - 'build_glibc': 1, - 'build_newlib': 1, - 'build_pnacl_newlib': 1, - 'include_dirs': [ - 'lib/gl/include', - ], - 'sources': [ - 'lib/gl/gles2/gl2ext_ppapi.c', - 'lib/gl/gles2/gl2ext_ppapi.h', - 'lib/gl/gles2/gles2.c', - ], - }, - }, - { - 'target_name': 'ppapi_nacl_tests', - 'type': 'none', - 'dependencies': [ - '<(DEPTH)/native_client/src/untrusted/nacl/nacl.gyp:nacl_lib', - '<(DEPTH)/native_client/src/untrusted/pthread/pthread.gyp:pthread_lib', - 'ppapi_cpp_lib', - 'nacl_elf_loader', - 'native_client/native_client.gyp:ppapi_lib', - ], - 'variables': { - # This is user code (vs IRT code), so tls accesses do not - # need to be indirect through a function call. - 'newlib_tls_flags=': [], - # TODO(bradnelson): Remove this compile flag once new nacl_rev is - # above 9362. - 'compile_flags': [ - '-DGL_GLEXT_PROTOTYPES', - ], - # Speed up pnacl linking by not generating debug info for tests. - # We compile with --strip-all under extra_args so debug info is - # discarded anyway. Remove this and the --strip-all flag if - # debug info is really needed. - 'compile_flags!': [ - '-g', - ], - 'defines': [ - 'GL_GLEXT_PROTOTYPES', - ], - 'nexe_target': 'ppapi_nacl_tests', - 'nacl_untrusted_build': 1, - 'build_newlib': 1, - 'include_dirs': [ - 'lib/gl/include', - '..', - ], - 'link_flags': [ - '-lppapi_cpp', - '-lppapi', - '-pthread', - ], - 'link_flags!': [ - '-O3', - ], - 'translate_flags': [ - '-O0', - ], - 'conditions': [ - ['target_arch=="ia32"', { - 'extra_deps_newlib32': [ - '>(tc_lib_dir_newlib32)/libppapi_cpp.a', - '>(tc_lib_dir_newlib32)/libppapi.a', - ], - 'extra_deps_glibc32': [ - '>(tc_lib_dir_glibc32)/libppapi_cpp.so', - '>(tc_lib_dir_glibc32)/libppapi.so', - ], - }], - ['target_arch=="x64" or (target_arch=="ia32" and OS=="win")', { - 'extra_deps_newlib64': [ - '>(tc_lib_dir_newlib64)/libppapi_cpp.a', - '>(tc_lib_dir_newlib64)/libppapi.a', - ], - 'extra_deps_glibc64': [ - '>(tc_lib_dir_glibc64)/libppapi_cpp.so', - '>(tc_lib_dir_glibc64)/libppapi.so', - ], - }], - ['target_arch=="arm"', { - 'extra_deps_arm': [ - '>(tc_lib_dir_newlib_arm)/libppapi_cpp.a', - '>(tc_lib_dir_newlib_arm)/libppapi.a', - ], - }], - ], - 'extra_deps_pnacl_newlib': [ - '>(tc_lib_dir_pnacl_newlib)/libppapi_cpp.a', - '>(tc_lib_dir_pnacl_newlib)/libppapi.a', - ], - 'sources': [ - '<@(test_common_source_files)', - '<@(test_nacl_source_files)', - ], - 'extra_args': [ - '--strip-all', - ], - 'variables': { - 'conditions': [ - ['target_arch=="arm"', { - 'objdump': '>(nacl_glibc_tc_root)/bin/arm-nacl-objdump' - }, { - 'objdump': '>(nacl_glibc_tc_root)/bin/x86_64-nacl-objdump' - }], - ] - }, - 'create_nmf': '<(DEPTH)/native_client_sdk/src/tools/create_nmf.py', - 'create_nmf_flags': [ - '--no-default-libpath', - '--objdump=<(objdump)', - ], - 'create_nonsfi_test_nmf': 'tests/create_nonsfi_test_nmf.py', - }, - 'conditions': [ - ['target_arch!="mipsel" and disable_glibc==0', { - 'variables': { - 'build_glibc': 1, - # NOTE: Use /lib, not /lib64 here; it is a symbolic link which - # doesn't work on Windows. - 'libdir_glibc64': '>(nacl_glibc_tc_root)/x86_64-nacl/lib', - 'libdir_glibc32': '>(nacl_glibc_tc_root)/x86_64-nacl/lib32', - 'nmf_glibc%': '<(PRODUCT_DIR)/>(nexe_target)_glibc.nmf', - }, - 'actions': [ - { - 'action_name': 'Generate GLIBC NMF and copy libs', - # NOTE: create_nmf must be first, it is the script python executes - # below. - 'inputs': ['>(create_nmf)'], - # NOTE: There is no explicit dependency for the lib32 - # and lib64 directories created in the PRODUCT_DIR. - # They are created as a side-effect of NMF creation. - 'outputs': ['>(nmf_glibc)'], - 'action': [ - 'python', - '>@(_inputs)', - '>@(create_nmf_flags)', - '--output=>(nmf_glibc)', - '--stage-dependencies=<(PRODUCT_DIR)', - ], - 'conditions': [ - ['target_arch=="ia32"', { - 'action': [ - '--library-path=>(libdir_glibc32)', - '--library-path=>(tc_lib_dir_glibc32)', - ], - 'inputs': ['>(out_glibc32)'], - }], - ['target_arch=="arm"', { - 'action': [ - '--library-path=>(nacl_glibc_tc_root)/arm-nacl/lib', - '--library-path=>(tc_lib_dir_glibc_arm)', - ], - 'inputs': ['>(out_glibc_arm)'], - }], - ['target_arch=="x64" or (target_arch=="ia32" and OS=="win")', { - 'action': [ - '--library-path=>(libdir_glibc64)', - '--library-path=>(tc_lib_dir_glibc64)', - ], - 'inputs': ['>(out_glibc64)'], - }], - ], - }, - ], - }], - # Test PNaCl pre-translated code (pre-translated to save bot time). - # We only care about testing that code generation is correct, - # and in-browser translation is tested elsewhere. - # NOTE: native_client/build/untrusted.gypi dictates that - # PNaCl only generate x86-32 and x86-64 on x86 platforms, - # ARM on ARM platforms, or MIPS on MIPS platforms, not all - # versions always. - # The same goes for the PNaCl shims. So, we have two variations here. - ['disable_pnacl==0 and (target_arch=="ia32" or target_arch=="x64")', { - 'variables': { - 'build_pnacl_newlib': 1, - 'translate_pexe_with_build': 1, - 'nmf_pnacl%': '<(PRODUCT_DIR)/>(nexe_target)_pnacl.nmf', - }, - # Shim is a dependency for the nexe because we pre-translate. - 'dependencies': [ - '<(DEPTH)/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_irt_shim.gyp:aot', - ], - 'actions': [ - { - 'action_name': 'Generate PNACL NEWLIB NMF', - # NOTE: create_nmf must be first, it is the script python executes - # below. - 'inputs': [ - '>(create_nmf)', - ], - 'outputs': ['>(nmf_pnacl)'], - 'action': [ - 'python', - '>@(_inputs)', - '>@(create_nmf_flags)', - '--output=>(nmf_pnacl)', - ], - 'conditions': [ - ['target_arch=="ia32"', { - 'inputs': [ - '>(out_pnacl_newlib_x86_32_nexe)', - ], - }], - ['target_arch=="x64" or (target_arch=="ia32" and OS=="win")', { - 'inputs': [ - '>(out_pnacl_newlib_x86_64_nexe)', - ], - }], - ], - }, - ], - }], - ['disable_pnacl==0 and (target_arch=="ia32" or target_arch=="x64" or target_arch=="arm") and OS=="linux"', { - # In addition to above configuration, build x86-32 and arm nonsfi - # .nexe files by translating from .pexe binary, for non-SFI mode PPAPI - # testing. - 'variables': { - 'translate_pexe_with_build': 1, - 'nmf_nonsfi%': '<(PRODUCT_DIR)/>(nexe_target)_pnacl_nonsfi.nmf', - }, - 'conditions': [ - ['target_arch=="ia32" or target_arch=="x64"', { - 'variables': { - 'enable_x86_32_nonsfi': 1, - }, - }], - ['target_arch=="arm"', { - 'variables': { - 'enable_arm_nonsfi': 1, - }, - }], - ], - # Shim is a dependency for the nexe because we pre-translate. - 'dependencies': [ - '<(DEPTH)/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_irt_shim.gyp:aot', - ], - 'actions': [ - { - 'action_name': 'Generate PNACL NEWLIB NONSFI NMF', - 'inputs': ['>(create_nonsfi_test_nmf)'], - 'outputs': ['>(nmf_nonsfi)'], - 'action': [ - 'python', - '>(create_nonsfi_test_nmf)', - '--output=>(nmf_nonsfi)', - ], - 'target_conditions': [ - ['enable_x86_32_nonsfi==1 and "<(target_arch)"=="ia32"', { - 'inputs': ['>(out_pnacl_newlib_x86_32_nonsfi_nexe)'], - 'action': [ - '--program=>(out_pnacl_newlib_x86_32_nonsfi_nexe)', - '--arch=x86-32', - ] - }], - ['enable_x86_32_nonsfi==1 and "<(target_arch)"=="x64"', { - 'inputs': ['>(out_pnacl_newlib_x86_32_nonsfi_nexe)'], - 'action': [ - '--program=>(out_pnacl_newlib_x86_32_nonsfi_nexe)', - # This should be used only for nacl_helper_nonsfi test. - # In theory this should be x86-32. However, currently - # fallback logic to x86-32-nonsfi is not implemented, - # and, moreover, it would break the tests for current - # nacl_helper in Non-SFI mode on x64 Chrome. - # So, here we introduce the hack to use "x86-64" in order - # to take the benefit to run nacl_helper_nonsfi tests on - # x64 Chrome. - # TODO(hidehiko): Remove this hack. - '--arch=x86-64', - ] - }], - ['enable_arm_nonsfi==1', { - 'inputs': ['>(out_pnacl_newlib_arm_nonsfi_nexe)'], - 'action': [ - '--program=>(out_pnacl_newlib_arm_nonsfi_nexe)', - '--arch=arm', - ] - }], - ], - }, - ], - }], - ['disable_pnacl==0 and target_arch=="arm"', { - 'variables': { - 'build_pnacl_newlib': 1, - 'translate_pexe_with_build': 1, - 'nmf_pnacl%': '<(PRODUCT_DIR)/>(nexe_target)_pnacl.nmf', - }, - # Shim is a dependency for the nexe because we pre-translate. - 'dependencies': [ - '<(DEPTH)/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_irt_shim.gyp:aot', - ], - 'actions': [ - { - 'action_name': 'Generate PNACL NEWLIB NMF', - # NOTE: create_nmf must be first, it is the script python executes - # below. - 'inputs': ['>(create_nmf)', '>(out_pnacl_newlib_arm_nexe)'], - 'outputs': ['>(nmf_pnacl)'], - 'action': [ - 'python', - '>@(_inputs)', - '>@(create_nmf_flags)', - '--output=>(nmf_pnacl)', - ], - }, - ], - }], - ['disable_pnacl==0 and target_arch=="mipsel"', { - 'variables': { - 'build_pnacl_newlib': 1, - 'translate_pexe_with_build': 1, - 'nmf_pnacl%': '<(PRODUCT_DIR)/>(nexe_target)_pnacl.nmf', - }, - # Shim is a dependency for the nexe because we pre-translate. - 'dependencies': [ - '<(DEPTH)/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_irt_shim.gyp:aot', - ], - 'actions': [ - { - 'action_name': 'Generate PNACL NEWLIB NMF', - 'inputs': ['>(create_nmf)', '>(out_pnacl_newlib_mips_nexe)'], - 'outputs': ['>(nmf_pnacl)'], - 'action': [ - 'python', - '>@(_inputs)', - '>@(create_nmf_flags)', - '--output=>(nmf_pnacl)', - ], - }, - ], - }], - ], - }, - ], -} diff --git a/chromium/ppapi/ppapi_nacl_test_common.gypi b/chromium/ppapi/ppapi_nacl_test_common.gypi deleted file mode 100644 index 9d06affbe75..00000000000 --- a/chromium/ppapi/ppapi_nacl_test_common.gypi +++ /dev/null @@ -1,285 +0,0 @@ -# Copyright (c) 2013 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. - -{ - 'includes': [ - '../build/common_untrusted.gypi', - ], - 'target_defaults': { - # We need to override the variables in untrusted.gypi outside of a - # target_condition block because the target_condition block in - # untrusted gypi is fully evaluated and interpolated before any of the - # target_condition blocks in this file are expanded. This means that any - # variables overriden inside a target_condition block in this file will not - # affect the values in untrusted.gypi. - 'variables': { - 'nacl_untrusted_build': 1, - 'test_files': [], - 'generate_nmf%': 1, - 'nacl_newlib_out_dir': '<(PRODUCT_DIR)/>(nexe_destination_dir)/newlib', - 'nacl_glibc_out_dir': '<(PRODUCT_DIR)/>(nexe_destination_dir)/glibc', - 'nacl_pnacl_newlib_out_dir': '<(PRODUCT_DIR)/>(nexe_destination_dir)/pnacl', - 'nacl_pnacl_newlib_nonsfi_out_dir': '<(PRODUCT_DIR)/>(nexe_destination_dir)/nonsfi', - 'target_conditions': [ - ['nexe_target!=""', { - # These variables are used for nexe building and for library building. - 'out_newlib32%': '>(nacl_newlib_out_dir)/>(nexe_target)_newlib_x86_32.nexe', - 'out_newlib64%': '>(nacl_newlib_out_dir)/>(nexe_target)_newlib_x86_64.nexe', - 'out_newlib_arm%': '>(nacl_newlib_out_dir)/>(nexe_target)_newlib_arm.nexe', - 'out_newlib_mips%': '>(nacl_newlib_out_dir)/>(nexe_target)_newlib_mips32.nexe', - 'nmf_newlib%': '>(nacl_newlib_out_dir)/>(nexe_target).nmf', - 'out_glibc32%': '>(nacl_glibc_out_dir)/>(nexe_target)_glibc_x86_32.nexe', - 'out_glibc64%': '>(nacl_glibc_out_dir)/>(nexe_target)_glibc_x86_64.nexe', - 'out_glibc_arm%': '>(nacl_glibc_out_dir)/>(nexe_target)_glibc_arm.nexe', - 'nmf_glibc%': '>(nacl_glibc_out_dir)/>(nexe_target).nmf', - 'out_pnacl_newlib%': '>(nacl_pnacl_newlib_out_dir)/>(nexe_target)_newlib_pnacl.pexe', - 'nmf_pnacl_newlib%': '>(nacl_pnacl_newlib_out_dir)/>(nexe_target).nmf', - 'out_pnacl_newlib_x86_32_nonsfi_nexe': '>(nacl_pnacl_newlib_nonsfi_out_dir)/>(nexe_target)_pnacl_newlib_x32_nonsfi.nexe', - 'out_pnacl_newlib_arm_nonsfi_nexe': '>(nacl_pnacl_newlib_nonsfi_out_dir)/>(nexe_target)_pnacl_newlib_arm_nonsfi.nexe', - 'nmf_pnacl_newlib_nonsfi%': '>(nacl_pnacl_newlib_nonsfi_out_dir)/>(nexe_target).nmf', - }], - ], - }, - 'dependencies': [ - '<(DEPTH)/native_client/src/untrusted/nacl/nacl.gyp:nacl_lib', - '<(DEPTH)/native_client/src/untrusted/pthread/pthread.gyp:pthread_lib', - '<(DEPTH)/ppapi/ppapi_nacl.gyp:ppapi_cpp_lib', - '<(DEPTH)/ppapi/ppapi_nacl.gyp:nacl_elf_loader', - '<(DEPTH)/ppapi/native_client/native_client.gyp:ppapi_lib', - ], - 'target_conditions': [ - ['test_files!=[] and build_newlib==1', { - 'copies': [ - { - 'destination': '>(nacl_newlib_out_dir)', - 'files': [ - '>@(test_files)', - ], - }, - ], - }], - ['test_files!=[] and "<(target_arch)"!="mipsel" and disable_glibc==0 and build_glibc==1', { - 'copies': [ - { - 'destination': '>(nacl_glibc_out_dir)', - 'files': [ - '>@(test_files)', - ], - }, - ], - }], - # Nonsfi pnacl copy is covered below. - ['test_files!=[] and build_pnacl_newlib==1 and disable_pnacl==0', { - 'copies': [ - { - 'destination': '>(nacl_pnacl_newlib_out_dir)', - 'files': [ - '>@(test_files)', - ], - }, - ], - }], - ['test_files!=[] and build_pnacl_newlib==1 and (enable_x86_32_nonsfi==1 or enable_arm_nonsfi==1)', { - 'copies': [ - { - 'destination': '>(nacl_pnacl_newlib_nonsfi_out_dir)', - 'files': [ - '>@(test_files)', - ], - }, - ], - }], - ['nexe_target!=""', { - 'variables': { - # Patch over the fact that untrusted.gypi doesn't define these in all - # cases. - 'enable_x86_64%': 0, - 'enable_x86_32%': 0, - 'enable_arm%': 0, - 'enable_mips%': 0, - 'include_dirs': [ - '<(DEPTH)', - ], - 'link_flags': [ - '-lppapi_cpp', - '-lppapi', - '-pthread', - ], - 'extra_args': [ - '--strip-all', - ], - 'variables': { - 'conditions': [ - ['target_arch=="arm"', { - 'objdump': '>(nacl_glibc_tc_root)/bin/arm-nacl-objdump' - }, { - 'objdump': '>(nacl_glibc_tc_root)/bin/x86_64-nacl-objdump' - }], - ] - }, - 'create_nmf': '<(DEPTH)/native_client_sdk/src/tools/create_nmf.py', - 'create_nmf_args_portable%': [], - 'create_nonsfi_test_nmf': '<(DEPTH)/ppapi/tests/create_nonsfi_test_nmf.py', - 'create_nmf_args': [ - '--no-default-libpath', - '--objdump=<(objdump)', - ], - }, - 'target_conditions': [ - ['generate_nmf==1 and build_newlib==1 and disable_newlib==0', { - 'actions': [ - { - 'action_name': 'Generate NEWLIB NMF', - 'inputs': ['>(create_nmf)'], - 'outputs': ['>(nmf_newlib)'], - 'action': [ - 'python', - '>(create_nmf)', - '>@(create_nmf_args)', - '--output=>(nmf_newlib)', - '>@(create_nmf_args_portable)', - ], - 'target_conditions': [ - ['enable_x86_64==1', { - 'inputs': ['>(out_newlib64)'], - 'action': ['>(out_newlib64)'], - }], - ['enable_x86_32==1', { - 'inputs': ['>(out_newlib32)'], - 'action': ['>(out_newlib32)'], - }], - ['enable_arm==1', { - 'inputs': ['>(out_newlib_arm)'], - 'action': ['>(out_newlib_arm)'], - }], - ['enable_mips==1', { - 'inputs': ['>(out_newlib_mips)'], - 'action': ['>(out_newlib_mips)'], - }], - ], - }, - ], - }], - ['"<(target_arch)"!="mipsel" and generate_nmf==1 and disable_glibc==0 and build_glibc==1', { - 'variables': { - # NOTE: Use /lib, not /lib64 here; it is a symbolic link which - # doesn't work on Windows. - 'libdir_glibc64': '>(nacl_glibc_tc_root)/x86_64-nacl/lib', - 'libdir_glibc32': '>(nacl_glibc_tc_root)/x86_64-nacl/lib32', - 'libdir_glibc_arm': '>(nacl_glibc_tc_root)/arm-nacl/lib', - }, - 'actions': [ - { - 'action_name': 'Generate GLIBC NMF and copy libs', - 'inputs': ['>(create_nmf)'], - # NOTE: There is no explicit dependency for the lib32 - # and lib64 directories created in the PRODUCT_DIR. - # They are created as a side-effect of NMF creation. - 'outputs': ['>(nmf_glibc)'], - 'action': [ - 'python', - '>@(_inputs)', - '>@(create_nmf_args)', - '--output=>(nmf_glibc)', - '--path-prefix=>(nexe_target)_libs', - '--stage-dependencies=<(nacl_glibc_out_dir)', - '>@(create_nmf_args_portable)', - ], - 'target_conditions': [ - ['enable_x86_64==1', { - 'inputs': ['>(out_glibc64)'], - 'action': [ - '--library-path=>(libdir_glibc64)', - '--library-path=>(tc_lib_dir_glibc64)', - ], - }], - ['enable_x86_32==1', { - 'inputs': ['>(out_glibc32)'], - 'action': [ - '--library-path=>(libdir_glibc32)', - '--library-path=>(tc_lib_dir_glibc32)', - ], - }], - ['enable_arm==1', { - 'inputs': ['>(out_glibc_arm)'], - 'action': [ - '--library-path=>(libdir_glibc_arm)', - '--library-path=>(tc_lib_dir_glibc_arm)', - ], - }], - ], - }, - ], - }], - ['generate_nmf==1 and build_pnacl_newlib==1 and disable_pnacl==0', { - 'actions': [ - { - 'action_name': 'Generate PNACL NEWLIB NMF', - # NOTE: create_nmf must be first, it is the script python - # executes below. - 'inputs': ['>(create_nmf)', '>(out_pnacl_newlib)'], - 'outputs': ['>(nmf_pnacl_newlib)'], - 'action': [ - 'python', - '>(create_nmf)', - '>@(create_nmf_args)', - '--output=>(nmf_pnacl_newlib)', - '>(out_pnacl_newlib)', - '>@(create_nmf_args_portable)', - ], - }, - ], - }], - ['generate_nmf==1 and build_pnacl_newlib==1 and disable_pnacl==0 and (enable_x86_32_nonsfi==1 or enable_arm_nonsfi==1)', { - 'actions': [ - { - 'action_name': 'Generate PNACL NEWLIB nonsfi NMF', - 'inputs': ['>(create_nonsfi_test_nmf)'], - 'outputs': ['>(nmf_pnacl_newlib_nonsfi)'], - 'action': [ - 'python', - '>(create_nonsfi_test_nmf)', - '>@(create_nmf_args_portable)', - '--output=>(nmf_pnacl_newlib_nonsfi)', - ], - 'target_conditions': [ - ['enable_x86_32_nonsfi==1 and "<(target_arch)"=="ia32"', { - 'inputs': ['>(out_pnacl_newlib_x86_32_nonsfi_nexe)'], - 'action': [ - '--program=>(out_pnacl_newlib_x86_32_nonsfi_nexe)', - '--arch=x86-32', - ] - }], - ['enable_x86_32_nonsfi==1 and "<(target_arch)"=="x64"', { - 'inputs': ['>(out_pnacl_newlib_x86_32_nonsfi_nexe)'], - 'action': [ - '--program=>(out_pnacl_newlib_x86_32_nonsfi_nexe)', - # This should be used only for nacl_helper_nonsfi test. - # In theory this should be x86-32. However, currently - # fallback logic to x86-32-nonsfi is not implemented, - # and, moreover, it would break the tests for current - # nacl_helper in Non-SFI mode on x64 Chrome. - # So, here we introduce the hack to use "x86-64" in order - # to take the benefit to run nacl_helper_nonsfi tests on - # x64 Chrome. - # TODO(hidehiko): Remove this hack. - '--arch=x86-64', - ] - }], - ['enable_arm_nonsfi==1', { - 'inputs': ['>(out_pnacl_newlib_arm_nonsfi_nexe)'], - 'action': [ - '--program=>(out_pnacl_newlib_arm_nonsfi_nexe)', - '--arch=arm', - ] - }], - ], - }, - ], - }], - ], - }], - ], - }, -} diff --git a/chromium/ppapi/ppapi_proxy.gypi b/chromium/ppapi/ppapi_proxy.gypi deleted file mode 100644 index 6a1ccc453cb..00000000000 --- a/chromium/ppapi/ppapi_proxy.gypi +++ /dev/null @@ -1,310 +0,0 @@ -# Copyright (c) 2012 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. - -{ - 'target_defaults': { - 'variables': { - 'ppapi_proxy_target': 0, - }, - 'target_conditions': [ - # This part is shared between the targets defined below. - ['ppapi_proxy_target==1', { - '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', - - 'proxy/audio_buffer_resource.cc', - 'proxy/audio_buffer_resource.h', - 'proxy/audio_encoder_resource.cc', - 'proxy/audio_encoder_resource.h', - 'proxy/audio_input_resource.cc', - 'proxy/audio_input_resource.h', - 'proxy/broker_dispatcher.cc', - 'proxy/broker_dispatcher.h', - 'proxy/broker_resource.cc', - 'proxy/broker_resource.h', - 'proxy/browser_font_singleton_resource.cc', - 'proxy/browser_font_singleton_resource.h', - 'proxy/camera_capabilities_resource.cc', - 'proxy/camera_capabilities_resource.h', - 'proxy/camera_device_resource.cc', - 'proxy/camera_device_resource.h', - 'proxy/compositor_layer_resource.cc', - 'proxy/compositor_layer_resource.h', - 'proxy/compositor_resource.cc', - 'proxy/compositor_resource.h', - 'proxy/connection.h', - 'proxy/device_enumeration_resource_helper.cc', - 'proxy/device_enumeration_resource_helper.h', - 'proxy/dispatcher.cc', - 'proxy/dispatcher.h', - 'proxy/enter_proxy.h', - 'proxy/error_conversion.cc', - 'proxy/error_conversion.h', - 'proxy/file_chooser_resource.cc', - 'proxy/file_chooser_resource.h', - 'proxy/file_io_resource.cc', - 'proxy/file_io_resource.h', - 'proxy/file_ref_resource.cc', - 'proxy/file_ref_resource.h', - 'proxy/file_system_resource.cc', - 'proxy/file_system_resource.h', - 'proxy/flash_clipboard_resource.cc', - 'proxy/flash_clipboard_resource.h', - 'proxy/flash_drm_resource.cc', - 'proxy/flash_drm_resource.h', - 'proxy/flash_file_resource.cc', - 'proxy/flash_file_resource.h', - 'proxy/flash_font_file_resource.cc', - 'proxy/flash_font_file_resource.h', - 'proxy/flash_fullscreen_resource.cc', - 'proxy/flash_fullscreen_resource.h', - 'proxy/flash_menu_resource.cc', - 'proxy/flash_menu_resource.h', - 'proxy/flash_resource.cc', - 'proxy/flash_resource.h', - 'proxy/gamepad_resource.cc', - 'proxy/gamepad_resource.h', - 'proxy/graphics_2d_resource.cc', - 'proxy/graphics_2d_resource.h', - 'proxy/host_dispatcher.cc', - 'proxy/host_dispatcher.h', - 'proxy/host_resolver_private_resource.cc', - 'proxy/host_resolver_private_resource.h', - 'proxy/host_resolver_resource.cc', - 'proxy/host_resolver_resource.h', - 'proxy/host_resolver_resource_base.cc', - 'proxy/host_resolver_resource_base.h', - 'proxy/host_var_serialization_rules.cc', - 'proxy/host_var_serialization_rules.h', - 'proxy/interface_list.cc', - 'proxy/interface_list.h', - 'proxy/interface_proxy.cc', - 'proxy/interface_proxy.h', - 'proxy/isolated_file_system_private_resource.cc', - 'proxy/isolated_file_system_private_resource.h', - 'proxy/locking_resource_releaser.h', - 'proxy/media_stream_audio_track_resource.cc', - 'proxy/media_stream_audio_track_resource.h', - 'proxy/media_stream_track_resource_base.cc', - 'proxy/media_stream_track_resource_base.h', - 'proxy/media_stream_video_track_resource.cc', - 'proxy/media_stream_video_track_resource.h', - 'proxy/message_handler.cc', - 'proxy/message_handler.h', - 'proxy/net_address_resource.cc', - 'proxy/net_address_resource.h', - 'proxy/network_list_resource.cc', - 'proxy/network_list_resource.h', - 'proxy/network_monitor_resource.cc', - 'proxy/network_monitor_resource.h', - 'proxy/network_proxy_resource.cc', - 'proxy/network_proxy_resource.h', - 'proxy/output_protection_resource.cc', - 'proxy/output_protection_resource.h', - 'proxy/pdf_resource.cc', - 'proxy/pdf_resource.h', - 'proxy/platform_verification_private_resource.cc', - 'proxy/platform_verification_private_resource.h', - 'proxy/plugin_array_buffer_var.cc', - 'proxy/plugin_array_buffer_var.h', - 'proxy/plugin_dispatcher.cc', - 'proxy/plugin_dispatcher.h', - 'proxy/plugin_globals.cc', - 'proxy/plugin_globals.h', - 'proxy/plugin_message_filter.cc', - 'proxy/plugin_message_filter.h', - 'proxy/plugin_resource.cc', - 'proxy/plugin_resource.h', - 'proxy/plugin_resource_tracker.cc', - 'proxy/plugin_resource_tracker.h', - 'proxy/plugin_resource_var.cc', - 'proxy/plugin_resource_var.h', - 'proxy/plugin_var_serialization_rules.cc', - 'proxy/plugin_var_serialization_rules.h', - 'proxy/plugin_var_tracker.cc', - 'proxy/plugin_var_tracker.h', - 'proxy/ppapi_command_buffer_proxy.cc', - 'proxy/ppapi_command_buffer_proxy.h', - 'proxy/ppapi_message_utils.h', - 'proxy/ppapi_messages.h', - 'proxy/ppb_audio_proxy.cc', - 'proxy/ppb_audio_proxy.h', - 'proxy/ppb_broker_proxy.cc', - 'proxy/ppb_broker_proxy.h', - 'proxy/ppb_buffer_proxy.cc', - 'proxy/ppb_buffer_proxy.h', - 'proxy/ppb_core_proxy.cc', - 'proxy/ppb_core_proxy.h', - 'proxy/ppb_flash_message_loop_proxy.cc', - 'proxy/ppb_flash_message_loop_proxy.h', - 'proxy/ppb_graphics_3d_proxy.cc', - 'proxy/ppb_graphics_3d_proxy.h', - 'proxy/ppb_image_data_proxy.cc', - 'proxy/ppb_image_data_proxy.h', - 'proxy/ppb_instance_proxy.cc', - 'proxy/ppb_instance_proxy.h', - 'proxy/ppb_message_loop_proxy.cc', - 'proxy/ppb_message_loop_proxy.h', - 'proxy/ppb_testing_proxy.cc', - 'proxy/ppb_testing_proxy.h', - 'proxy/ppb_var_deprecated_proxy.cc', - 'proxy/ppb_var_deprecated_proxy.h', - 'proxy/ppb_video_decoder_proxy.cc', - 'proxy/ppb_video_decoder_proxy.h', - 'proxy/ppb_x509_certificate_private_proxy.cc', - 'proxy/ppb_x509_certificate_private_proxy.h', - 'proxy/ppp_class_proxy.cc', - 'proxy/ppp_class_proxy.h', - 'proxy/ppp_content_decryptor_private_proxy.cc', - 'proxy/ppp_content_decryptor_private_proxy.h', - 'proxy/ppp_find_proxy.cc', - 'proxy/ppp_find_proxy.h', - 'proxy/ppp_graphics_3d_proxy.cc', - 'proxy/ppp_graphics_3d_proxy.h', - 'proxy/ppp_input_event_proxy.cc', - 'proxy/ppp_input_event_proxy.h', - 'proxy/ppp_instance_private_proxy.cc', - 'proxy/ppp_instance_private_proxy.h', - 'proxy/ppp_instance_proxy.cc', - 'proxy/ppp_instance_proxy.h', - 'proxy/ppp_messaging_proxy.cc', - 'proxy/ppp_messaging_proxy.h', - 'proxy/ppp_mouse_lock_proxy.cc', - 'proxy/ppp_mouse_lock_proxy.h', - 'proxy/ppp_pdf_proxy.cc', - 'proxy/ppp_pdf_proxy.h', - 'proxy/ppp_printing_proxy.cc', - 'proxy/ppp_printing_proxy.h', - 'proxy/ppp_text_input_proxy.cc', - 'proxy/ppp_text_input_proxy.h', - 'proxy/ppp_video_decoder_proxy.cc', - 'proxy/ppp_video_decoder_proxy.h', - 'proxy/printing_resource.cc', - 'proxy/printing_resource.h', - 'proxy/proxy_array_output.cc', - 'proxy/proxy_array_output.h', - 'proxy/proxy_channel.cc', - 'proxy/proxy_channel.h', - 'proxy/proxy_completion_callback_factory.h', - 'proxy/proxy_module.cc', - 'proxy/proxy_module.h', - 'proxy/proxy_object_var.cc', - 'proxy/proxy_object_var.h', - 'proxy/resource_creation_proxy.cc', - 'proxy/resource_creation_proxy.h', - 'proxy/resource_message_filter.h', - 'proxy/resource_reply_thread_registrar.cc', - 'proxy/resource_reply_thread_registrar.h', - 'proxy/tcp_server_socket_private_resource.cc', - 'proxy/tcp_server_socket_private_resource.h', - 'proxy/tcp_socket_private_resource.cc', - 'proxy/tcp_socket_private_resource.h', - 'proxy/tcp_socket_resource.cc', - 'proxy/tcp_socket_resource.h', - 'proxy/tcp_socket_resource_base.cc', - 'proxy/tcp_socket_resource_base.h', - 'proxy/truetype_font_resource.cc', - 'proxy/truetype_font_resource.h', - 'proxy/truetype_font_singleton_resource.cc', - 'proxy/truetype_font_singleton_resource.h', - 'proxy/udp_socket_filter.cc', - 'proxy/udp_socket_filter.h', - 'proxy/udp_socket_private_resource.cc', - 'proxy/udp_socket_private_resource.h', - 'proxy/udp_socket_resource.cc', - 'proxy/udp_socket_resource.h', - 'proxy/udp_socket_resource_base.cc', - 'proxy/udp_socket_resource_base.h', - 'proxy/uma_private_resource.cc', - 'proxy/uma_private_resource.h', - 'proxy/url_loader_resource.cc', - 'proxy/url_loader_resource.h', - 'proxy/url_request_info_resource.cc', - 'proxy/url_request_info_resource.h', - 'proxy/url_response_info_resource.cc', - 'proxy/url_response_info_resource.h', - 'proxy/var_serialization_rules.h', - 'proxy/video_capture_resource.cc', - 'proxy/video_capture_resource.h', - 'proxy/video_decoder_resource.cc', - 'proxy/video_decoder_resource.h', - 'proxy/video_destination_resource.cc', - 'proxy/video_destination_resource.h', - 'proxy/video_encoder_resource.cc', - 'proxy/video_encoder_resource.h', - 'proxy/video_frame_resource.cc', - 'proxy/video_frame_resource.h', - 'proxy/video_source_resource.cc', - 'proxy/video_source_resource.h', - 'proxy/vpn_provider_resource.cc', - 'proxy/vpn_provider_resource.h', - 'proxy/websocket_resource.cc', - 'proxy/websocket_resource.h', - ], - 'defines': [ - 'PPAPI_PROXY_IMPLEMENTATION', - ], - 'include_dirs': [ - '..', - ], - 'target_conditions': [ - ['>(nacl_untrusted_build)==1', { - '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', - ], - 'sources!': [ - 'proxy/audio_input_resource.cc', - 'proxy/broker_dispatcher.cc', - 'proxy/browser_font_singleton_resource.cc', - 'proxy/device_enumeration_resource_helper.cc', - 'proxy/flash_clipboard_resource.cc', - 'proxy/flash_drm_resource.cc', - 'proxy/flash_file_resource.cc', - 'proxy/flash_font_file_resource.cc', - 'proxy/flash_fullscreen_resource.cc', - 'proxy/flash_menu_resource.cc', - 'proxy/flash_resource.cc', - 'proxy/host_dispatcher.cc', - 'proxy/host_var_serialization_rules.cc', - 'proxy/pdf_resource.cc', - 'proxy/platform_verification_private_resource.cc', - 'proxy/platform_verification_private_resource.h', - 'proxy/ppb_broker_proxy.cc', - 'proxy/ppb_buffer_proxy.cc', - 'proxy/ppb_flash_message_loop_proxy.cc', - 'proxy/ppb_flash_proxy.cc', - 'proxy/ppb_pdf_proxy.cc', - 'proxy/ppb_var_deprecated_proxy.cc', - 'proxy/ppb_video_capture_proxy.cc', - 'proxy/ppb_video_decoder_proxy.cc', - 'proxy/ppp_content_decryptor_private_proxy.cc', - 'proxy/ppp_instance_private_proxy.cc', - 'proxy/ppp_video_decoder_proxy.cc', - 'proxy/serialized_flash_menu.cc', - 'proxy/video_capture_resource.cc', - ], - }], - ], - }], - ], - }, -} diff --git a/chromium/ppapi/ppapi_proxy_nacl.gyp b/chromium/ppapi/ppapi_proxy_nacl.gyp deleted file mode 100644 index 1f194792059..00000000000 --- a/chromium/ppapi/ppapi_proxy_nacl.gyp +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright 2014 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. - -{ - 'variables': { - 'chromium_code': 1, - }, - 'includes': [ - '../build/common_untrusted.gypi', - 'ppapi_proxy.gypi', - ], - 'conditions': [ - ['disable_nacl==0 and disable_nacl_untrusted==0', { - 'targets': [ - { - 'target_name': 'ppapi_proxy_nacl', - 'type': 'none', - 'variables': { - 'ppapi_proxy_target': 1, - 'nacl_untrusted_build': 1, - 'nlib_target': 'libppapi_proxy_nacl.a', - 'build_glibc': 0, - 'build_newlib': 0, - 'build_irt': 1, - 'build_pnacl_newlib': 0, - 'build_nonsfi_helper': 1, - }, - 'include_dirs': [ - '..', - ], - 'dependencies': [ - '../base/base_nacl.gyp:base_nacl', - '../base/base_nacl.gyp:base_nacl_nonsfi', - '../components/tracing_nacl.gyp:tracing_nacl', - '../gpu/command_buffer/command_buffer_nacl.gyp:gles2_utils_nacl', - '../gpu/gpu_nacl.gyp:command_buffer_client_nacl', - '../gpu/gpu_nacl.gyp:command_buffer_common_nacl', - '../gpu/gpu_nacl.gyp:gles2_cmd_helper_nacl', - '../gpu/gpu_nacl.gyp:gles2_implementation_nacl', - '../gpu/gpu_nacl.gyp:gpu_ipc_nacl', - '../ipc/ipc_nacl.gyp:ipc_nacl', - '../ipc/ipc_nacl.gyp:ipc_nacl_nonsfi', - '../mojo/mojo_edk_nacl.gyp:mojo_system_impl_nacl', - '../mojo/mojo_edk_nacl.gyp:mojo_system_impl_nacl_nonsfi', - '../ppapi/ppapi_ipc_nacl.gyp:ppapi_ipc_nacl', - '../ppapi/ppapi_shared_nacl.gyp:ppapi_shared_nacl', - '../third_party/WebKit/public/blink_headers.gyp:blink_headers', - '../third_party/khronos/khronos.gyp:khronos_headers', - ], - }, - ], - }], - ], -} diff --git a/chromium/ppapi/ppapi_shared.gypi b/chromium/ppapi/ppapi_shared.gypi deleted file mode 100644 index fd9f1b3aa88..00000000000 --- a/chromium/ppapi/ppapi_shared.gypi +++ /dev/null @@ -1,365 +0,0 @@ -# Copyright (c) 2012 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. - -{ - 'target_defaults': { - 'variables': { - 'ppapi_shared_target': 0, - }, - 'target_conditions': [ - # This part is shared between the targets defined below. - ['ppapi_shared_target==1', { - 'sources': [ - # Note: sources list duplicated in GN build. - 'shared_impl/array_var.cc', - 'shared_impl/array_var.h', - 'shared_impl/array_writer.cc', - 'shared_impl/array_writer.h', - 'shared_impl/callback_tracker.cc', - 'shared_impl/callback_tracker.h', - 'shared_impl/compositor_layer_data.cc', - 'shared_impl/compositor_layer_data.h', - 'shared_impl/dictionary_var.cc', - 'shared_impl/dictionary_var.h', - 'shared_impl/file_growth.cc', - 'shared_impl/file_growth.h', - 'shared_impl/file_io_state_manager.cc', - 'shared_impl/file_io_state_manager.h', - 'shared_impl/file_path.cc', - 'shared_impl/file_path.h', - 'shared_impl/file_ref_create_info.cc', - 'shared_impl/file_ref_create_info.h', - 'shared_impl/file_ref_util.cc', - 'shared_impl/file_ref_util.h', - 'shared_impl/file_system_util.cc', - 'shared_impl/file_system_util.h', - 'shared_impl/file_type_conversion.cc', - 'shared_impl/file_type_conversion.h', - 'shared_impl/flash_clipboard_format_registry.cc', - 'shared_impl/flash_clipboard_format_registry.h', - 'shared_impl/host_resource.cc', - 'shared_impl/host_resource.h', - 'shared_impl/id_assignment.cc', - 'shared_impl/id_assignment.h', - 'shared_impl/media_stream_audio_track_shared.cc', - 'shared_impl/media_stream_audio_track_shared.h', - 'shared_impl/media_stream_buffer.h', - 'shared_impl/media_stream_buffer_manager.cc', - 'shared_impl/media_stream_buffer_manager.h', - 'shared_impl/media_stream_video_track_shared.cc', - 'shared_impl/media_stream_video_track_shared.h', - 'shared_impl/platform_file.cc', - 'shared_impl/platform_file.h', - 'shared_impl/ppapi_constants.h', - 'shared_impl/ppapi_globals.cc', - 'shared_impl/ppapi_globals.h', - 'shared_impl/ppapi_nacl_plugin_args.cc', - 'shared_impl/ppapi_nacl_plugin_args.h', - 'shared_impl/ppapi_permissions.cc', - 'shared_impl/ppapi_permissions.h', - 'shared_impl/ppapi_preferences.cc', - 'shared_impl/ppapi_preferences.h', - 'shared_impl/ppapi_switches.cc', - 'shared_impl/ppapi_switches.h', - 'shared_impl/ppb_audio_config_shared.cc', - 'shared_impl/ppb_audio_config_shared.h', - 'shared_impl/ppb_audio_shared.cc', - 'shared_impl/ppb_audio_shared.h', - 'shared_impl/ppb_crypto_shared.cc', - 'shared_impl/ppb_device_ref_shared.cc', - 'shared_impl/ppb_device_ref_shared.h', - 'shared_impl/ppb_flash_font_file_shared.h', - 'shared_impl/ppb_gamepad_shared.cc', - 'shared_impl/ppb_gamepad_shared.h', - 'shared_impl/ppb_graphics_3d_shared.cc', - 'shared_impl/ppb_graphics_3d_shared.h', - 'shared_impl/ppb_image_data_shared.cc', - 'shared_impl/ppb_image_data_shared.h', - 'shared_impl/ppb_input_event_shared.cc', - 'shared_impl/ppb_input_event_shared.h', - 'shared_impl/ppb_instance_shared.cc', - 'shared_impl/ppb_instance_shared.h', - 'shared_impl/ppb_memory_shared.cc', - 'shared_impl/ppb_message_loop_shared.cc', - 'shared_impl/ppb_message_loop_shared.h', - 'shared_impl/ppb_opengles2_shared.cc', - 'shared_impl/ppb_opengles2_shared.h', - 'shared_impl/ppb_tcp_socket_shared.cc', - 'shared_impl/ppb_tcp_socket_shared.h', - 'shared_impl/ppb_trace_event_impl.cc', - 'shared_impl/ppb_trace_event_impl.h', - 'shared_impl/ppb_url_util_shared.cc', - 'shared_impl/ppb_url_util_shared.h', - 'shared_impl/ppb_var_shared.cc', - 'shared_impl/ppb_var_shared.h', - 'shared_impl/ppb_video_decoder_shared.cc', - 'shared_impl/ppb_video_decoder_shared.h', - 'shared_impl/ppb_view_shared.cc', - 'shared_impl/ppb_view_shared.h', - 'shared_impl/ppp_flash_browser_operations_shared.h', - 'shared_impl/ppp_instance_combined.cc', - 'shared_impl/ppp_instance_combined.h', - # TODO(viettrungluu): Split these out; it won't be used in NaCl. - 'shared_impl/private/net_address_private_impl.cc', - 'shared_impl/private/net_address_private_impl.h', - 'shared_impl/private/net_address_private_impl_constants.cc', - - 'shared_impl/proxy_lock.cc', - 'shared_impl/proxy_lock.h', - 'shared_impl/resource.cc', - 'shared_impl/resource.h', - 'shared_impl/resource_tracker.cc', - 'shared_impl/resource_tracker.h', - 'shared_impl/resource_var.cc', - 'shared_impl/resource_var.h', - 'shared_impl/scoped_pp_resource.cc', - 'shared_impl/scoped_pp_resource.h', - 'shared_impl/scoped_pp_var.cc', - 'shared_impl/scoped_pp_var.h', - 'shared_impl/socket_option_data.cc', - 'shared_impl/socket_option_data.h', - 'shared_impl/thread_aware_callback.cc', - 'shared_impl/thread_aware_callback.h', - 'shared_impl/time_conversion.cc', - 'shared_impl/time_conversion.h', - 'shared_impl/tracked_callback.cc', - 'shared_impl/tracked_callback.h', - 'shared_impl/url_request_info_data.cc', - 'shared_impl/url_request_info_data.h', - 'shared_impl/url_response_info_data.cc', - 'shared_impl/url_response_info_data.h', - 'shared_impl/var.cc', - 'shared_impl/var.h', - 'shared_impl/var_tracker.cc', - 'shared_impl/var_tracker.h', - 'shared_impl/vpn_provider_util.cc', - 'shared_impl/vpn_provider_util.h', - - 'shared_impl/private/ppb_char_set_shared.cc', - 'shared_impl/private/ppb_char_set_shared.h', - 'shared_impl/private/ppb_x509_certificate_private_shared.cc', - 'shared_impl/private/ppb_x509_certificate_private_shared.h', - - 'thunk/enter.cc', - 'thunk/enter.h', - 'thunk/ppb_audio_api.h', - 'thunk/ppb_audio_buffer_api.h', - 'thunk/ppb_audio_buffer_thunk.cc', - 'thunk/ppb_audio_config_api.h', - 'thunk/ppb_audio_config_thunk.cc', - 'thunk/ppb_audio_encoder_api.h', - 'thunk/ppb_audio_encoder_thunk.cc', - 'thunk/ppb_audio_input_api.h', - 'thunk/ppb_audio_input_dev_thunk.cc', - 'thunk/ppb_audio_thunk.cc', - 'thunk/ppb_broker_api.h', - 'thunk/ppb_broker_thunk.cc', - 'thunk/ppb_browser_font_trusted_api.h', - 'thunk/ppb_browser_font_trusted_thunk.cc', - 'thunk/ppb_buffer_api.h', - 'thunk/ppb_buffer_thunk.cc', - 'thunk/ppb_camera_capabilities_api.h', - 'thunk/ppb_camera_capabilities_private_thunk.cc', - 'thunk/ppb_camera_device_api.h', - 'thunk/ppb_camera_device_private_thunk.cc', - 'thunk/ppb_char_set_thunk.cc', - 'thunk/ppb_compositor_api.h', - 'thunk/ppb_compositor_layer_api.h', - 'thunk/ppb_compositor_layer_thunk.cc', - 'thunk/ppb_compositor_thunk.cc', - 'thunk/ppb_console_thunk.cc', - 'thunk/ppb_content_decryptor_private_thunk.cc', - 'thunk/ppb_cursor_control_thunk.cc', - 'thunk/ppb_device_ref_api.h', - 'thunk/ppb_device_ref_dev_thunk.cc', - 'thunk/ppb_ext_crx_file_system_private_thunk.cc', - 'thunk/ppb_file_chooser_api.h', - 'thunk/ppb_file_chooser_dev_thunk.cc', - 'thunk/ppb_file_chooser_trusted_thunk.cc', - 'thunk/ppb_file_io_api.h', - 'thunk/ppb_file_io_private_thunk.cc', - 'thunk/ppb_file_io_thunk.cc', - 'thunk/ppb_file_ref_api.h', - 'thunk/ppb_file_ref_thunk.cc', - 'thunk/ppb_file_system_api.h', - 'thunk/ppb_file_system_thunk.cc', - 'thunk/ppb_find_private_thunk.cc', - 'thunk/ppb_flash_clipboard_api.h', - 'thunk/ppb_flash_clipboard_thunk.cc', - 'thunk/ppb_flash_device_id_thunk.cc', - 'thunk/ppb_flash_drm_api.h', - 'thunk/ppb_flash_drm_thunk.cc', - 'thunk/ppb_flash_file_fileref_thunk.cc', - 'thunk/ppb_flash_file_modulelocal_thunk.cc', - 'thunk/ppb_flash_font_file_api.h', - 'thunk/ppb_flash_font_file_thunk.cc', - 'thunk/ppb_flash_fullscreen_api.h', - 'thunk/ppb_flash_fullscreen_thunk.cc', - 'thunk/ppb_flash_functions_api.h', - 'thunk/ppb_flash_menu_api.h', - 'thunk/ppb_flash_menu_thunk.cc', - 'thunk/ppb_flash_message_loop_api.h', - 'thunk/ppb_flash_message_loop_thunk.cc', - 'thunk/ppb_flash_print_thunk.cc', - 'thunk/ppb_flash_thunk.cc', - 'thunk/ppb_fullscreen_thunk.cc', - 'thunk/ppb_gamepad_api.h', - 'thunk/ppb_gamepad_thunk.cc', - 'thunk/ppb_gles_chromium_texture_mapping_thunk.cc', - 'thunk/ppb_graphics_2d_api.h', - 'thunk/ppb_graphics_2d_thunk.cc', - 'thunk/ppb_graphics_3d_api.h', - 'thunk/ppb_graphics_3d_thunk.cc', - 'thunk/ppb_host_resolver_api.h', - 'thunk/ppb_host_resolver_private_api.h', - 'thunk/ppb_host_resolver_private_thunk.cc', - 'thunk/ppb_host_resolver_thunk.cc', - 'thunk/ppb_image_data_api.h', - 'thunk/ppb_image_data_thunk.cc', - 'thunk/ppb_input_event_api.h', - 'thunk/ppb_input_event_thunk.cc', - 'thunk/ppb_instance_api.h', - 'thunk/ppb_instance_private_thunk.cc', - 'thunk/ppb_instance_thunk.cc', - 'thunk/ppb_isolated_file_system_private_api.h', - 'thunk/ppb_isolated_file_system_private_thunk.cc', - 'thunk/ppb_media_stream_audio_track_api.h', - 'thunk/ppb_media_stream_audio_track_thunk.cc', - 'thunk/ppb_media_stream_video_track_api.h', - 'thunk/ppb_media_stream_video_track_thunk.cc', - 'thunk/ppb_message_loop_api.h', - 'thunk/ppb_messaging_thunk.cc', - 'thunk/ppb_mouse_cursor_thunk.cc', - 'thunk/ppb_mouse_lock_thunk.cc', - 'thunk/ppb_net_address_api.h', - 'thunk/ppb_net_address_thunk.cc', - 'thunk/ppb_network_list_api.h', - 'thunk/ppb_network_list_thunk.cc', - 'thunk/ppb_network_monitor_api.h', - 'thunk/ppb_network_monitor_thunk.cc', - 'thunk/ppb_network_proxy_api.h', - 'thunk/ppb_network_proxy_thunk.cc', - 'thunk/ppb_output_protection_api.h', - 'thunk/ppb_output_protection_private_thunk.cc', - 'thunk/ppb_pdf_api.h', - 'thunk/ppb_pdf_thunk.cc', - 'thunk/ppb_platform_verification_api.h', - 'thunk/ppb_platform_verification_private_thunk.cc', - 'thunk/ppb_printing_api.h', - 'thunk/ppb_printing_dev_thunk.cc', - 'thunk/ppb_tcp_server_socket_private_api.h', - 'thunk/ppb_tcp_server_socket_private_thunk.cc', - 'thunk/ppb_tcp_socket_api.h', - 'thunk/ppb_tcp_socket_private_api.h', - 'thunk/ppb_tcp_socket_private_thunk.cc', - 'thunk/ppb_tcp_socket_thunk.cc', - 'thunk/ppb_text_input_thunk.cc', - 'thunk/ppb_truetype_font_api.h', - 'thunk/ppb_truetype_font_dev_thunk.cc', - 'thunk/ppb_truetype_font_singleton_api.h', - 'thunk/ppb_udp_socket_api.h', - 'thunk/ppb_udp_socket_private_api.h', - 'thunk/ppb_udp_socket_private_thunk.cc', - 'thunk/ppb_udp_socket_thunk.cc', - 'thunk/ppb_uma_private_thunk.cc', - 'thunk/ppb_uma_singleton_api.h', - 'thunk/ppb_url_loader_api.h', - 'thunk/ppb_url_loader_thunk.cc', - 'thunk/ppb_url_loader_trusted_thunk.cc', - 'thunk/ppb_url_request_info_api.h', - 'thunk/ppb_url_request_info_thunk.cc', - 'thunk/ppb_url_response_info_api.h', - 'thunk/ppb_url_response_info_thunk.cc', - 'thunk/ppb_url_util_thunk.cc', - 'thunk/ppb_var_array_thunk.cc', - 'thunk/ppb_var_dictionary_thunk.cc', - 'thunk/ppb_video_capture_api.h', - 'thunk/ppb_video_capture_thunk.cc', - 'thunk/ppb_video_decoder_api.h', - 'thunk/ppb_video_decoder_dev_api.h', - 'thunk/ppb_video_decoder_dev_thunk.cc', - 'thunk/ppb_video_decoder_thunk.cc', - 'thunk/ppb_video_destination_private_api.h', - 'thunk/ppb_video_destination_private_thunk.cc', - 'thunk/ppb_video_encoder_api.h', - 'thunk/ppb_video_encoder_thunk.cc', - 'thunk/ppb_video_frame_api.h', - 'thunk/ppb_video_frame_thunk.cc', - 'thunk/ppb_video_source_private_api.h', - 'thunk/ppb_video_source_private_thunk.cc', - 'thunk/ppb_view_api.h', - 'thunk/ppb_view_dev_thunk.cc', - 'thunk/ppb_view_thunk.cc', - 'thunk/ppb_vpn_provider_api.h', - 'thunk/ppb_vpn_provider_thunk.cc', - 'thunk/ppb_websocket_api.h', - 'thunk/ppb_websocket_thunk.cc', - 'thunk/ppb_x509_certificate_private_api.h', - 'thunk/ppb_x509_certificate_private_thunk.cc', - 'thunk/thunk.h', - ], - 'defines': [ - 'PPAPI_SHARED_IMPLEMENTATION', - 'PPAPI_THUNK_IMPLEMENTATION', - ], - 'include_dirs': [ - '..', - ], - 'target_conditions': [ - ['>(nacl_untrusted_build)==1 or >(nacl_win64_target)==1', { - 'sources!': [ - 'shared_impl/flash_clipboard_format_registry.cc', - 'shared_impl/ppb_url_util_shared.cc', - 'shared_impl/ppb_video_capture_shared.cc', - 'shared_impl/ppb_video_decoder_shared.cc', - 'shared_impl/private/ppb_browser_font_trusted_shared.cc', - 'shared_impl/private/ppb_char_set_shared.cc', - 'thunk/ppb_audio_input_dev_thunk.cc', - 'thunk/ppb_broker_thunk.cc', - 'thunk/ppb_browser_font_trusted_thunk.cc', - 'thunk/ppb_buffer_thunk.cc', - 'thunk/ppb_char_set_thunk.cc', - 'thunk/ppb_content_decryptor_private_thunk.cc', - 'thunk/ppb_flash_clipboard_thunk.cc', - 'thunk/ppb_flash_device_id_thunk.cc', - 'thunk/ppb_flash_drm_thunk.cc', - 'thunk/ppb_flash_file_fileref_thunk.cc', - 'thunk/ppb_flash_file_modulelocal_thunk.cc', - 'thunk/ppb_flash_font_file_thunk.cc', - 'thunk/ppb_flash_fullscreen_thunk.cc', - 'thunk/ppb_flash_menu_thunk.cc', - 'thunk/ppb_flash_message_loop_thunk.cc', - 'thunk/ppb_flash_message_loop_thunk.cc', - 'thunk/ppb_flash_thunk.cc', - 'thunk/ppb_gles_chromium_texture_mapping_thunk.cc', - 'thunk/ppb_pdf_thunk.cc', - 'thunk/ppb_platform_verification_private_thunk.cc', - 'thunk/ppb_transport_thunk.cc', - 'thunk/ppb_url_util_thunk.cc', - 'thunk/ppb_video_capture_thunk.cc', - 'thunk/ppb_video_decoder_dev_thunk.cc', - ], - }], - # We exclude a few more things for nacl_win64, to avoid pulling in - # more dependencies. - ['>(nacl_win64_target)==1', { - 'sources!': [ - 'shared_impl/ppb_audio_shared.cc', - 'shared_impl/ppb_graphics_3d_shared.cc', - 'shared_impl/ppb_opengles2_shared.cc', - 'shared_impl/private/net_address_private_impl.cc', - 'shared_impl/private/ppb_host_resolver_shared.cc', - 'thunk/ppb_graphics_3d_thunk.cc', - 'thunk/ppb_host_resolver_private_thunk.cc', - 'thunk/ppb_tcp_server_socket_private_thunk.cc', - 'thunk/ppb_tcp_socket_private_thunk.cc', - 'thunk/ppb_udp_socket_private_thunk.cc', - 'thunk/ppb_x509_certificate_private_thunk.cc', - ], - }], - ], - }], - ], - }, -} diff --git a/chromium/ppapi/ppapi_shared_nacl.gyp b/chromium/ppapi/ppapi_shared_nacl.gyp deleted file mode 100644 index 05e4acae480..00000000000 --- a/chromium/ppapi/ppapi_shared_nacl.gyp +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright 2014 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. - -{ - 'variables': { - 'chromium_code': 1, - }, - 'includes': [ - '../build/common_untrusted.gypi', - 'ppapi_shared.gypi', - ], - 'conditions': [ - ['disable_nacl==0 and disable_nacl_untrusted==0', { - 'targets': [ - { - 'target_name': 'ppapi_shared_nacl', - 'type': 'none', - 'variables': { - 'ppapi_shared_target': 1, - 'nacl_win64_target': 0, - 'nacl_untrusted_build': 1, - 'nlib_target': 'libppapi_shared_nacl.a', - 'build_glibc': 0, - 'build_newlib': 0, - 'build_irt': 1, - 'build_pnacl_newlib': 0, - 'build_nonsfi_helper': 1, - }, - 'include_dirs': [ - '..', - ], - 'dependencies': [ - '../base/base_nacl.gyp:base_nacl', - '../base/base_nacl.gyp:base_nacl_nonsfi', - '../gpu/command_buffer/command_buffer_nacl.gyp:gles2_utils_nacl', - '../gpu/gpu_nacl.gyp:command_buffer_client_nacl', - '../gpu/gpu_nacl.gyp:gles2_implementation_nacl', - '../media/media_nacl.gyp:shared_memory_support_nacl', - '../third_party/khronos/khronos.gyp:khronos_headers', - ], - }, - ], - }], - ], -} diff --git a/chromium/ppapi/ppapi_sources.gni b/chromium/ppapi/ppapi_sources.gni deleted file mode 100644 index dcee45c1d87..00000000000 --- a/chromium/ppapi/ppapi_sources.gni +++ /dev/null @@ -1,11 +0,0 @@ -# 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 this file to get the ppapi_sources dictionary containing source files -# from GYP. This is a .gni file so it can be shared between different BUILD.gn -# files without having to re-run the script each time. -ppapi_sources = exec_script("//build/gypi_to_gn.py", - [ rebase_path("ppapi_sources.gypi") ], - "scope", - [ "ppapi_sources.gypi" ]) diff --git a/chromium/ppapi/ppapi_sources.gypi b/chromium/ppapi/ppapi_sources.gypi deleted file mode 100644 index 674c868aee7..00000000000 --- a/chromium/ppapi/ppapi_sources.gypi +++ /dev/null @@ -1,578 +0,0 @@ -# Copyright (c) 2012 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. - -{ - 'variables': { - 'c_source_files': [ - 'c/pp_array_output.h', - 'c/pp_bool.h', - 'c/pp_codecs.h', - 'c/pp_completion_callback.h', - 'c/pp_errors.h', - 'c/pp_file_info.h', - 'c/pp_graphics_3d.h', - 'c/pp_input_event.h', - 'c/pp_instance.h', - 'c/pp_macros.h', - 'c/pp_module.h', - 'c/pp_point.h', - 'c/pp_rect.h', - 'c/pp_resource.h', - 'c/pp_size.h', - 'c/pp_stdint.h', - 'c/pp_time.h', - 'c/pp_touch_point.h', - 'c/pp_var.h', - 'c/ppb.h', - 'c/ppb_audio.h', - 'c/ppb_audio_buffer.h', - 'c/ppb_audio_config.h', - 'c/ppb_audio_encoder.h', - 'c/ppb_compositor.h', - 'c/ppb_console.h', - 'c/ppb_core.h', - 'c/ppb_file_io.h', - 'c/ppb_file_ref.h', - 'c/ppb_file_system.h', - 'c/ppb_fullscreen.h', - 'c/ppb_gamepad.h', - 'c/ppb_graphics_2d.h', - 'c/ppb_graphics_3d.h', - 'c/ppb_host_resolver.h', - 'c/ppb_image_data.h', - 'c/ppb_input_event.h', - 'c/ppb_instance.h', - 'c/ppb_media_stream_audio_track.h', - 'c/ppb_media_stream_video_track.h', - 'c/ppb_message_loop.h', - 'c/ppb_messaging.h', - 'c/ppb_mouse_cursor.h', - 'c/ppb_mouse_lock.h', - 'c/ppb_net_address.h', - 'c/ppb_network_list.h', - 'c/ppb_network_monitor.h', - 'c/ppb_network_proxy.h', - 'c/ppb_opengles2.h', - 'c/ppb_tcp_socket.h', - 'c/ppb_text_input_controller.h', - 'c/ppb_udp_socket.h', - 'c/ppb_url_loader.h', - 'c/ppb_url_request_info.h', - 'c/ppb_url_response_info.h', - 'c/ppb_var.h', - 'c/ppb_var_array.h', - 'c/ppb_var_array_buffer.h', - 'c/ppb_var_dictionary.h', - 'c/ppb_video_decoder.h', - 'c/ppb_video_encoder.h', - 'c/ppb_video_frame.h', - 'c/ppb_view.h', - 'c/ppb_ppb_vpn_provider.h', - 'c/ppb_websocket.h', - 'c/ppp.h', - 'c/ppp_graphics_3d.h', - 'c/ppp_input_event.h', - 'c/ppp_instance.h', - 'c/ppp_messaging.h', - 'c/ppp_mouse_lock.h', - - # Dev interfaces. - 'c/dev/pp_cursor_type_dev.h', - 'c/dev/pp_video_dev.h', - 'c/dev/ppb_buffer_dev.h', - 'c/dev/ppb_char_set_dev.h', - 'c/dev/ppb_cursor_control_dev.h', - 'c/dev/ppb_device_ref_dev.h', - 'c/dev/ppb_file_chooser_dev.h', - 'c/dev/ppb_ime_input_event_dev.h', - 'c/dev/ppb_memory_dev.h', - 'c/dev/ppb_printing_dev.h', - 'c/dev/ppb_text_input_dev.h', - 'c/dev/ppb_truetype_font_dev.h', - 'c/dev/ppb_url_util_dev.h', - 'c/dev/ppb_video_decoder_dev.h', - 'c/dev/ppp_network_state_dev.h', - 'c/dev/ppp_text_input_dev.h', - 'c/dev/ppp_video_decoder_dev.h', - - # Private interfaces. - 'c/private/pp_file_handle.h', - 'c/private/pp_private_font_charset.h', - 'c/private/pp_video_frame_private.h', - 'c/private/ppb_camera_capabilities_private.h', - 'c/private/ppb_camera_device_private.h', - 'c/private/ppb_content_decryptor_private.h', - 'c/private/ppb_ext_crx_file_system_private.h', - 'c/private/ppb_find_private.h', - 'c/private/ppb_flash.h', - 'c/private/ppb_flash_clipboard.h', - 'c/private/ppb_flash_file.h', - 'c/private/ppb_flash_font_file.h', - 'c/private/ppb_flash_fullscreen.h', - 'c/private/ppb_flash_menu.h', - 'c/private/ppb_flash_message_loop.h', - 'c/private/ppb_host_resolver_private.h', - 'c/private/ppb_instance_private.h', - 'c/private/ppb_isolated_file_system_private.h', - 'c/private/ppb_net_address_private.h', - 'c/private/ppb_output_protection_private.h', - 'c/private/ppb_pdf.h', - 'c/private/ppb_platform_verification_private.h', - 'c/private/ppb_proxy_private.h', - 'c/private/ppb_tcp_server_socket_private.h', - 'c/private/ppb_tcp_socket_private.h', - 'c/private/ppb_testing_private.h', - 'c/private/ppb_udp_socket_private.h', - 'c/private/ppb_uma_private.h', - 'c/private/ppb_video_destination_private.h', - 'c/private/ppb_video_source_private.h', - 'c/private/ppb_x509_certificate_private.h', - 'c/private/ppp_content_decryptor_private.h', - 'c/private/ppp_find_private.h', - 'c/private/ppp_instance_private.h', - - # Deprecated interfaces. - 'c/dev/deprecated_bool.h', - 'c/dev/ppb_var_deprecated.h', - 'c/dev/ppp_class_deprecated.h', - - # Trusted interfaces. - 'c/trusted/ppb_broker_trusted.h', - 'c/trusted/ppb_browser_font_trusted.h', - 'c/trusted/ppb_file_chooser_trusted.h', - 'c/trusted/ppb_url_loader_trusted.h', - 'c/trusted/ppp_broker.h', - ], - 'cpp_source_files': [ - 'cpp/array_output.cc', - 'cpp/array_output.h', - 'cpp/audio.cc', - 'cpp/audio.h', - 'cpp/audio_buffer.cc', - 'cpp/audio_buffer.h', - 'cpp/audio_config.cc', - 'cpp/audio_config.h', - 'cpp/audio_encoder.cc', - 'cpp/audio_encoder.h', - 'cpp/completion_callback.h', - 'cpp/compositor.cc', - 'cpp/compositor.h', - 'cpp/compositor_layer.cc', - 'cpp/compositor_layer.h', - 'cpp/core.cc', - 'cpp/core.h', - 'cpp/directory_entry.cc', - 'cpp/directory_entry.h', - 'cpp/file_io.cc', - 'cpp/file_io.h', - 'cpp/file_ref.cc', - 'cpp/file_ref.h', - 'cpp/file_system.cc', - 'cpp/file_system.h', - 'cpp/fullscreen.cc', - 'cpp/fullscreen.h', - 'cpp/graphics_2d.cc', - 'cpp/graphics_2d.h', - 'cpp/graphics_3d.cc', - 'cpp/graphics_3d.h', - 'cpp/graphics_3d_client.cc', - 'cpp/graphics_3d_client.h', - 'cpp/host_resolver.cc', - 'cpp/host_resolver.h', - 'cpp/image_data.cc', - 'cpp/image_data.h', - 'cpp/input_event.cc', - 'cpp/input_event.h', - 'cpp/instance.cc', - 'cpp/instance.h', - 'cpp/instance_handle.cc', - 'cpp/instance_handle.h', - 'cpp/logging.h', - 'cpp/media_stream_audio_track.cc', - 'cpp/media_stream_audio_track.h', - 'cpp/media_stream_video_track.cc', - 'cpp/media_stream_video_track.h', - 'cpp/message_handler.h', - 'cpp/message_loop.cc', - 'cpp/message_loop.h', - 'cpp/module.cc', - 'cpp/module.h', - 'cpp/module_impl.h', - 'cpp/mouse_cursor.cc', - 'cpp/mouse_cursor.h', - 'cpp/mouse_lock.cc', - 'cpp/mouse_lock.h', - 'cpp/net_address.cc', - 'cpp/net_address.h', - 'cpp/network_list.cc', - 'cpp/network_list.h', - 'cpp/network_monitor.cc', - 'cpp/network_monitor.h', - 'cpp/network_proxy.cc', - 'cpp/network_proxy.h', - 'cpp/output_traits.h', - 'cpp/point.h', - 'cpp/rect.cc', - 'cpp/rect.h', - 'cpp/resource.cc', - 'cpp/resource.h', - 'cpp/size.h', - 'cpp/tcp_socket.cc', - 'cpp/tcp_socket.h', - 'cpp/text_input_controller.cc', - 'cpp/text_input_controller.h', - 'cpp/touch_point.h', - 'cpp/udp_socket.cc', - 'cpp/udp_socket.h', - 'cpp/url_loader.cc', - 'cpp/url_loader.h', - 'cpp/url_request_info.cc', - 'cpp/url_request_info.h', - 'cpp/url_response_info.cc', - 'cpp/url_response_info.h', - 'cpp/var.cc', - 'cpp/var.h', - 'cpp/var_array.cc', - 'cpp/var_array.h', - 'cpp/var_array_buffer.cc', - 'cpp/var_array_buffer.h', - 'cpp/var_dictionary.cc', - 'cpp/var_dictionary.h', - 'cpp/video_decoder.cc', - 'cpp/video_decoder.h', - 'cpp/video_encoder.cc', - 'cpp/video_encoder.h', - 'cpp/video_frame.cc', - 'cpp/video_frame.h', - 'cpp/view.cc', - 'cpp/view.h', - 'cpp/vpn_provider.h', - 'cpp/vpn_provider.cc', - 'cpp/websocket.cc', - 'cpp/websocket.h', - - # Dev interfaces. - 'cpp/dev/audio_input_dev.cc', - 'cpp/dev/audio_input_dev.h', - 'cpp/dev/buffer_dev.cc', - 'cpp/dev/buffer_dev.h', - 'cpp/dev/crypto_dev.cc', - 'cpp/dev/crypto_dev.h', - 'cpp/dev/cursor_control_dev.cc', - 'cpp/dev/cursor_control_dev.h', - 'cpp/dev/device_ref_dev.cc', - 'cpp/dev/device_ref_dev.h', - 'cpp/dev/file_chooser_dev.cc', - 'cpp/dev/file_chooser_dev.h', - 'cpp/dev/ime_input_event_dev.cc', - 'cpp/dev/ime_input_event_dev.h', - 'cpp/dev/memory_dev.cc', - 'cpp/dev/memory_dev.h', - 'cpp/dev/printing_dev.cc', - 'cpp/dev/printing_dev.h', - 'cpp/dev/text_input_dev.cc', - 'cpp/dev/text_input_dev.h', - 'cpp/dev/truetype_font_dev.cc', - 'cpp/dev/truetype_font_dev.h', - 'cpp/dev/url_util_dev.cc', - 'cpp/dev/url_util_dev.h', - 'cpp/dev/video_capture_client_dev.cc', - 'cpp/dev/video_capture_client_dev.h', - 'cpp/dev/video_capture_dev.cc', - 'cpp/dev/video_capture_dev.h', - 'cpp/dev/video_decoder_client_dev.cc', - 'cpp/dev/video_decoder_client_dev.h', - 'cpp/dev/video_decoder_dev.cc', - 'cpp/dev/video_decoder_dev.h', - 'cpp/dev/view_dev.cc', - 'cpp/dev/view_dev.h', - - # Deprecated interfaces. - 'cpp/dev/scriptable_object_deprecated.cc', - 'cpp/dev/scriptable_object_deprecated.h', - - # Private interfaces. - 'cpp/private/camera_capabilities_private.cc', - 'cpp/private/camera_capabilities_private.h', - 'cpp/private/camera_device_private.cc', - 'cpp/private/camera_device_private.h', - 'cpp/private/content_decryptor_private.cc', - 'cpp/private/content_decryptor_private.h', - 'cpp/private/ext_crx_file_system_private.cc', - 'cpp/private/ext_crx_file_system_private.h', - 'cpp/private/file_io_private.cc', - 'cpp/private/file_io_private.h', - 'cpp/private/find_private.cc', - 'cpp/private/find_private.h', - 'cpp/private/flash.cc', - 'cpp/private/flash.h', - 'cpp/private/flash_clipboard.cc', - 'cpp/private/flash_clipboard.h', - 'cpp/private/flash_device_id.cc', - 'cpp/private/flash_device_id.h', - 'cpp/private/flash_drm.cc', - 'cpp/private/flash_drm.h', - 'cpp/private/flash_file.cc', - 'cpp/private/flash_file.h', - 'cpp/private/flash_font_file.cc', - 'cpp/private/flash_font_file.h', - 'cpp/private/flash_fullscreen.cc', - 'cpp/private/flash_fullscreen.h', - 'cpp/private/flash_menu.cc', - 'cpp/private/flash_menu.h', - 'cpp/private/flash_message_loop.cc', - 'cpp/private/flash_message_loop.h', - 'cpp/private/host_resolver_private.cc', - 'cpp/private/host_resolver_private.h', - 'cpp/private/instance_private.cc', - 'cpp/private/instance_private.h', - 'cpp/private/isolated_file_system_private.cc', - 'cpp/private/isolated_file_system_private.h', - 'cpp/private/net_address_private.cc', - 'cpp/private/net_address_private.h', - 'cpp/private/output_protection_private.cc', - 'cpp/private/output_protection_private.h', - 'cpp/private/pass_file_handle.cc', - 'cpp/private/pass_file_handle.h', - 'cpp/private/pdf.cc', - 'cpp/private/pdf.h', - 'cpp/private/platform_verification.cc', - 'cpp/private/platform_verification.h', - 'cpp/private/tcp_server_socket_private.cc', - 'cpp/private/tcp_server_socket_private.h', - 'cpp/private/tcp_socket_private.cc', - 'cpp/private/tcp_socket_private.h', - 'cpp/private/udp_socket_private.cc', - 'cpp/private/udp_socket_private.h', - 'cpp/private/uma_private.cc', - 'cpp/private/uma_private.h', - 'cpp/private/var_private.cc', - 'cpp/private/var_private.h', - 'cpp/private/video_destination_private.cc', - 'cpp/private/video_destination_private.h', - 'cpp/private/video_frame_private.cc', - 'cpp/private/video_frame_private.h', - 'cpp/private/video_source_private.cc', - 'cpp/private/video_source_private.h', - 'cpp/private/x509_certificate_private.cc', - 'cpp/private/x509_certificate_private.h', - - # Trusted interfaces. - 'cpp/trusted/browser_font_trusted.cc', - 'cpp/trusted/browser_font_trusted.h', - 'cpp/trusted/file_chooser_trusted.cc', - 'cpp/trusted/file_chooser_trusted.h', - - # Utility sources. - 'utility/completion_callback_factory.h', - 'utility/completion_callback_factory_thread_traits.h', - 'utility/graphics/paint_aggregator.cc', - 'utility/graphics/paint_aggregator.h', - 'utility/graphics/paint_manager.cc', - 'utility/graphics/paint_manager.h', - 'utility/threading/lock.cc', - 'utility/threading/lock.h', - 'utility/threading/simple_thread.cc', - 'utility/threading/simple_thread.h', - 'utility/websocket/websocket_api.cc', - 'utility/websocket/websocket_api.h', - ], - # - # Common Testing source for trusted and untrusted (NaCl) pugins. - # - 'test_common_source_files': [ - # Common test files - 'lib/gl/gles2/gl2ext_ppapi.c', - 'lib/gl/gles2/gl2ext_ppapi.h', - 'lib/gl/gles2/gles2.c', - 'tests/all_c_includes.h', - 'tests/all_cpp_includes.h', - 'tests/arch_dependent_sizes_32.h', - 'tests/arch_dependent_sizes_64.h', - 'tests/pp_thread.h', - 'tests/test_audio.cc', - 'tests/test_audio.h', - 'tests/test_audio_config.cc', - 'tests/test_audio_config.h', - 'tests/test_audio_encoder.cc', - 'tests/test_audio_encoder.h', - 'tests/test_case.cc', - 'tests/test_case.h', - 'tests/test_compositor.cc', - 'tests/test_compositor.h', - 'tests/test_console.cc', - 'tests/test_console.h', - 'tests/test_core.cc', - 'tests/test_core.h', - 'tests/test_cursor_control.cc', - 'tests/test_cursor_control.h', - 'tests/test_empty.cc', - 'tests/test_empty.h', - 'tests/test_file_io.cc', - 'tests/test_file_io.h', - 'tests/test_file_ref.cc', - 'tests/test_file_ref.h', - 'tests/test_file_system.cc', - 'tests/test_file_system.h', - 'tests/test_fullscreen.cc', - 'tests/test_fullscreen.h', - 'tests/test_graphics_2d.cc', - 'tests/test_graphics_2d.h', - 'tests/test_graphics_3d.cc', - 'tests/test_graphics_3d.h', - 'tests/test_host_resolver.cc', - 'tests/test_host_resolver.h', - 'tests/test_host_resolver_private.cc', - 'tests/test_host_resolver_private.h', - 'tests/test_host_resolver_private_disallowed.cc', - 'tests/test_host_resolver_private_disallowed.h', - 'tests/test_image_data.cc', - 'tests/test_image_data.h', - 'tests/test_ime_input_event.cc', - 'tests/test_ime_input_event.h', - 'tests/test_input_event.cc', - 'tests/test_input_event.h', - 'tests/test_media_stream_audio_track.cc', - 'tests/test_media_stream_audio_track.h', - 'tests/test_media_stream_video_track.cc', - 'tests/test_media_stream_video_track.h', - 'tests/test_memory.cc', - 'tests/test_memory.h', - 'tests/test_message_handler.cc', - 'tests/test_message_handler.h', - 'tests/test_message_loop.cc', - 'tests/test_message_loop.h', - 'tests/test_mouse_cursor.cc', - 'tests/test_mouse_cursor.h', - 'tests/test_mouse_lock.cc', - 'tests/test_mouse_lock.h', - 'tests/test_net_address.cc', - 'tests/test_net_address.h', - 'tests/test_net_address_private_untrusted.cc', - 'tests/test_net_address_private_untrusted.h', - 'tests/test_network_monitor.cc', - 'tests/test_network_monitor.h', - 'tests/test_network_proxy.cc', - 'tests/test_network_proxy.h', - 'tests/test_output_protection_private.cc', - 'tests/test_output_protection_private.h', - 'tests/test_paint_aggregator.cc', - 'tests/test_paint_aggregator.h', - 'tests/test_post_message.cc', - 'tests/test_post_message.h', - 'tests/test_printing.cc', - 'tests/test_printing.h', - 'tests/test_tcp_server_socket_private.cc', - 'tests/test_tcp_server_socket_private.h', - 'tests/test_tcp_socket.cc', - 'tests/test_tcp_socket.h', - 'tests/test_tcp_socket_private.cc', - 'tests/test_tcp_socket_private.h', - 'tests/test_test_internals.cc', - 'tests/test_test_internals.h', - 'tests/test_trace_event.cc', - 'tests/test_trace_event.h', - 'tests/test_truetype_font.cc', - 'tests/test_truetype_font.h', - 'tests/test_udp_socket.cc', - 'tests/test_udp_socket.h', - 'tests/test_udp_socket_private.cc', - 'tests/test_udp_socket_private.h', - 'tests/test_uma.cc', - 'tests/test_uma.h', - 'tests/test_url_loader.cc', - 'tests/test_url_loader.h', - 'tests/test_url_request.cc', - 'tests/test_url_request.h', - 'tests/test_utils.cc', - 'tests/test_var.cc', - 'tests/test_var.h', - 'tests/test_var_resource.cc', - 'tests/test_var_resource.h', - 'tests/test_video_decoder.cc', - 'tests/test_video_decoder.h', - 'tests/test_video_destination.cc', - 'tests/test_video_destination.h', - 'tests/test_video_encoder.cc', - 'tests/test_video_encoder.h', - 'tests/test_video_source.cc', - 'tests/test_video_source.h', - 'tests/test_view.cc', - 'tests/test_view.h', - 'tests/test_websocket.cc', - 'tests/test_websocket.h', - 'tests/testing_instance.cc', - 'tests/testing_instance.h', - - # Compile-time tests - 'tests/test_c_includes.c', - 'tests/test_cpp_includes.cc', - 'tests/test_struct_sizes.c', - ], - # - # Sources used in NaCl tests. - # - 'test_nacl_source_files': [ - # Test cases (PLEASE KEEP THIS SECTION IN ALPHABETICAL ORDER) - 'tests/test_nacl_irt_stack_alignment.cc', - 'tests/test_nacl_irt_stack_alignment.h', - 'tests/test_tcp_server_socket_private_disallowed.cc', - 'tests/test_tcp_socket_private_disallowed.cc', - 'tests/test_udp_socket_private_disallowed.cc', - ], - # - # Sources used in trusted tests. - # - 'test_trusted_source_files': [ - # Test cases (PLEASE KEEP THIS SECTION IN ALPHABETICAL ORDER) - 'tests/test_broker.cc', - 'tests/test_broker.h', - 'tests/test_browser_font.cc', - 'tests/test_browser_font.h', - 'tests/test_buffer.cc', - 'tests/test_buffer.h', - 'tests/test_char_set.cc', - 'tests/test_char_set.h', - 'tests/test_crypto.cc', - 'tests/test_crypto.h', - 'tests/test_file_chooser.cc', - 'tests/test_file_chooser.h', - 'tests/test_flash.cc', - 'tests/test_flash.h', - 'tests/test_flash_clipboard.cc', - 'tests/test_flash_clipboard.h', - 'tests/test_flash_drm.cc', - 'tests/test_flash_drm.h', - 'tests/test_flash_file.cc', - 'tests/test_flash_file.h', - 'tests/test_flash_fullscreen.cc', - 'tests/test_flash_fullscreen.h', - 'tests/test_flash_fullscreen_for_browser_ui.cc', - 'tests/test_flash_fullscreen_for_browser_ui.h', - 'tests/test_flash_message_loop.cc', - 'tests/test_flash_message_loop.h', - 'tests/test_net_address_private.cc', - 'tests/test_net_address_private.h', - 'tests/test_pdf.cc', - 'tests/test_pdf.h', - 'tests/test_platform_verification_private.cc', - 'tests/test_platform_verification_private.h', - 'tests/test_tcp_socket_private_trusted.cc', - 'tests/test_tcp_socket_private_trusted.h', - 'tests/test_url_util.cc', - 'tests/test_url_util.h', - 'tests/test_utils.h', - 'tests/test_video_decoder_dev.cc', - 'tests/test_video_decoder_dev.h', - 'tests/test_x509_certificate_private.cc', - 'tests/test_x509_certificate_private.h', - - # Deprecated test cases. - 'tests/test_instance_deprecated.cc', - 'tests/test_instance_deprecated.h', - 'tests/test_var_deprecated.cc', - 'tests/test_var_deprecated.h', - ], - }, -} diff --git a/chromium/ppapi/ppapi_tests.gypi b/chromium/ppapi/ppapi_tests.gypi deleted file mode 100644 index 9fdc8025b26..00000000000 --- a/chromium/ppapi/ppapi_tests.gypi +++ /dev/null @@ -1,705 +0,0 @@ -# Copyright (c) 2012 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. - -{ - 'targets': [ - { - # GN version: //ppapi:ppapi_tests - 'target_name': 'ppapi_tests', - 'type': 'loadable_module', - 'include_dirs': [ - 'lib/gl/include', - ], - 'defines': [ - 'GL_GLEXT_PROTOTYPES', - ], - 'sources': [ - '<@(test_common_source_files)', - '<@(test_trusted_source_files)', - ], - 'dependencies': [ - 'ppapi.gyp:ppapi_cpp', - 'ppapi_internal.gyp:ppapi_shared', - ], - 'copies': [ - { - 'destination': '<(PRODUCT_DIR)', - 'files': [ - # Keep 'test_case.html.mock-http-headers' with 'test_case.html'. - 'tests/test_case.html', - 'tests/test_case.html.mock-http-headers', - 'tests/test_page.css', - 'tests/test_page.css.mock-http-headers', - 'tests/ppapi_nacl_tests_newlib.nmf', - ], - }, - { - 'destination': '<(PRODUCT_DIR)/test_url_loader_data', - 'files': [ - 'tests/test_url_loader_data/hello.txt', - ], - }, - ], - 'run_as': { - 'action': [ - '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)chrome<(EXECUTABLE_SUFFIX)', - '--enable-pepper-testing', - '--register-pepper-plugins=$(TargetPath);application/x-ppapi-tests', - 'file://$(ProjectDir)/tests/test_case.html?testcase=', - ], - }, - 'conditions': [ - ['OS=="win"', { - 'defines': [ - '_CRT_SECURE_NO_DEPRECATE', - '_CRT_NONSTDC_NO_WARNINGS', - '_CRT_NONSTDC_NO_DEPRECATE', - '_SCL_SECURE_NO_DEPRECATE', - ], - }], - ['OS=="mac"', { - 'mac_bundle': 1, - 'product_name': 'ppapi_tests', - 'product_extension': 'plugin', - }], - ], -# TODO(dmichael): Figure out what is wrong with the script on Windows and add -# it as an automated action. -# 'actions': [ -# { -# 'action_name': 'generate_ppapi_include_tests', -# 'inputs': [], -# 'outputs': [ -# 'tests/test_c_includes.c', -# 'tests/test_cc_includes.cc', -# ], -# 'action': [ -# '<!@(python generate_ppapi_include_tests.py)', -# ], -# }, -# ], - }, - { - # GN version: //ppapi:power_saver_test_plugin - 'target_name': 'power_saver_test_plugin', - 'type': 'loadable_module', - 'sources': [ - 'tests/power_saver_test_plugin.cc', - 'tests/test_utils.cc', - ], - 'dependencies': [ - 'ppapi.gyp:ppapi_cpp', - 'ppapi_internal.gyp:ppapi_shared', - ], - 'conditions': [ - ['OS=="mac"', { - 'mac_bundle': 1, - 'product_name': 'power_saver_test_plugin', - 'product_extension': 'plugin', - }], - ], - }, - { - # GN version: //ppapi:blink_deprecated_test_plugin - 'target_name': 'blink_deprecated_test_plugin', - 'type': 'loadable_module', - 'sources': [ - 'tests/blink_deprecated_test_plugin.cc', - ], - 'dependencies': [ - '../base/base.gyp:base', - 'ppapi.gyp:ppapi_cpp', - 'ppapi_internal.gyp:ppapi_shared', - ], - 'conditions': [ - ['OS=="mac"', { - 'mac_bundle': 1, - 'product_name': 'blink_deprecated_test_plugin', - 'product_extension': 'plugin', - }], - ], - }, - { - # GN version: //ppapi:blink_test_plugin - 'target_name': 'blink_test_plugin', - 'type': 'loadable_module', - 'sources': [ - 'tests/blink_test_plugin.cc', - ], - 'dependencies': [ - '../base/base.gyp:base', - 'ppapi.gyp:ppapi_cpp', - 'ppapi_internal.gyp:ppapi_shared', - ], - 'conditions': [ - ['OS=="mac"', { - 'mac_bundle': 1, - 'product_name': 'blink_test_plugin', - 'product_extension': 'plugin', - }], - ], - }, - { - # GN version: //ppapi/proxy:test_support - # //ppapi/shared_impl:test_support - 'target_name': 'ppapi_unittest_shared', - 'type': 'static_library', - 'dependencies': [ - 'ppapi_proxy', - 'ppapi_shared', - '../base/base.gyp:test_support_base', - '../ipc/ipc.gyp:ipc', - '../ipc/ipc.gyp:test_support_ipc', - '../mojo/mojo_edk.gyp:mojo_system_impl', - '../testing/gmock.gyp:gmock', - '../testing/gtest.gyp:gtest', - ], - 'sources': [ - # Note: sources list duplicated in GN build. - 'proxy/ppapi_proxy_test.cc', - 'proxy/ppapi_proxy_test.h', - 'proxy/resource_message_test_sink.cc', - 'proxy/resource_message_test_sink.h', - 'shared_impl/test_globals.cc', - 'shared_impl/test_globals.h', - 'shared_impl/test_utils.cc', - 'shared_impl/test_utils.h', - ], - }, - - { - # GN version: //ppapi:ppapi_perftests - 'target_name': 'ppapi_perftests', - 'type': 'executable', - 'variables': { - 'chromium_code': 1, - }, - 'dependencies': [ - 'ppapi_proxy', - 'ppapi_shared', - 'ppapi_unittest_shared', - '../base/base.gyp:test_support_base', - '../mojo/mojo_edk.gyp:mojo_system_impl', - '../testing/gtest.gyp:gtest', - ], - 'sources': [ - 'proxy/ppapi_perftests.cc', - 'proxy/ppp_messaging_proxy_perftest.cc', - ], - }, - { - # GN version: //ppapi:ppapi_unittests - 'target_name': 'ppapi_unittests', - 'type': 'executable', - 'variables': { - 'chromium_code': 1, - }, - 'dependencies': [ - 'ppapi_host', - 'ppapi_proxy', - 'ppapi_shared', - 'ppapi_unittest_shared', - '../base/base.gyp:test_support_base', - '../gpu/gpu.gyp:gpu_ipc_common', - '../ipc/ipc.gyp:ipc', - '../ipc/ipc.gyp:ipc_run_all_unittests', - '../ipc/ipc.gyp:test_support_ipc', - '../media/media.gyp:shared_memory_support', - '../skia/skia.gyp:skia', - '../testing/gmock.gyp:gmock', - '../testing/gtest.gyp:gtest', - '../ui/surface/surface.gyp:surface', - ], - 'sources': [ - # Note: sources list duplicated in GN build. - 'host/resource_message_filter_unittest.cc', - 'proxy/device_enumeration_resource_helper_unittest.cc', - 'proxy/file_chooser_resource_unittest.cc', - 'proxy/file_system_resource_unittest.cc', - 'proxy/flash_resource_unittest.cc', - 'proxy/interface_list_unittest.cc', - 'proxy/mock_resource.cc', - 'proxy/mock_resource.h', - 'proxy/nacl_message_scanner_unittest.cc', - 'proxy/pdf_resource_unittest.cc', - 'proxy/plugin_dispatcher_unittest.cc', - 'proxy/plugin_resource_tracker_unittest.cc', - 'proxy/plugin_var_tracker_unittest.cc', - 'proxy/ppb_var_unittest.cc', - 'proxy/ppp_instance_private_proxy_unittest.cc', - 'proxy/ppp_instance_proxy_unittest.cc', - 'proxy/ppp_messaging_proxy_unittest.cc', - 'proxy/printing_resource_unittest.cc', - 'proxy/raw_var_data_unittest.cc', - 'proxy/serialized_var_unittest.cc', - 'proxy/tracked_callback_unittest.cc', - 'proxy/video_decoder_resource_unittest.cc', - 'proxy/video_encoder_resource_unittest.cc', - 'proxy/websocket_resource_unittest.cc', - 'shared_impl/media_stream_audio_track_shared_unittest.cc', - 'shared_impl/media_stream_buffer_manager_unittest.cc', - 'shared_impl/media_stream_video_track_shared_unittest.cc', - 'shared_impl/proxy_lock_unittest.cc', - 'shared_impl/resource_tracker_unittest.cc', - 'shared_impl/thread_aware_callback_unittest.cc', - 'shared_impl/time_conversion_unittest.cc', - 'shared_impl/var_tracker_unittest.cc', - ], - }, - { - 'target_name': 'ppapi_example_skeleton', - 'suppress_wildcard': 1, - 'type': 'none', - 'direct_dependent_settings': { - 'product_name': '>(_target_name)', - 'conditions': [ - ['os_posix==1 and OS!="mac"', { - 'cflags': ['-fvisibility=hidden'], - 'type': 'shared_library', - }], - ['OS=="win"', { - 'type': 'shared_library', - }], - ['OS=="mac"', { - 'type': 'loadable_module', - 'mac_bundle': 1, - 'product_extension': 'plugin', - 'xcode_settings': { - 'OTHER_LDFLAGS': [ - # Not to strip important symbols by -Wl,-dead_strip. - '-Wl,-exported_symbol,_PPP_GetInterface', - '-Wl,-exported_symbol,_PPP_InitializeModule', - '-Wl,-exported_symbol,_PPP_ShutdownModule' - ]}, - }], - ], - }, - }, - { - # GN version: //ppapi/examples/mouse_cursor - 'target_name': 'ppapi_example_mouse_cursor', - 'dependencies': [ - 'ppapi_example_skeleton', - 'ppapi.gyp:ppapi_cpp', - ], - 'sources': [ - 'examples/mouse_cursor/mouse_cursor.cc', - ], - }, - { - # GN version: //ppapi/examples/mouse_lock - 'target_name': 'ppapi_example_mouse_lock', - 'dependencies': [ - 'ppapi_example_skeleton', - 'ppapi.gyp:ppapi_cpp', - ], - 'sources': [ - 'examples/mouse_lock/mouse_lock.cc', - ], - }, - - { - # GN version: //ppapi/examples/gamepad - 'target_name': 'ppapi_example_gamepad', - 'dependencies': [ - 'ppapi_example_skeleton', - 'ppapi.gyp:ppapi_cpp', - ], - 'sources': [ - 'examples/gamepad/gamepad.cc', - ], - }, - - { - # GN version: //ppapi/examples/stub:c_stub - 'target_name': 'ppapi_example_c_stub', - 'dependencies': [ - 'ppapi_example_skeleton', - 'ppapi.gyp:ppapi_c', - ], - 'sources': [ - 'examples/stub/stub.c', - ], - }, - { - # GN version: //ppapi/examples/stub:cc_stub - 'target_name': 'ppapi_example_cc_stub', - 'dependencies': [ - 'ppapi_example_skeleton', - 'ppapi.gyp:ppapi_cpp', - ], - 'sources': [ - 'examples/stub/stub.cc', - ], - }, - { - # GN version: //ppapi/examples/crxfs - 'target_name': 'ppapi_example_crxfs', - 'dependencies': [ - 'ppapi_example_skeleton', - 'ppapi.gyp:ppapi_cpp', - ], - 'sources': [ - 'examples/crxfs/crxfs.cc', - ], - }, - { - # GN version: //ppapi/examples/audio - 'target_name': 'ppapi_example_audio', - 'dependencies': [ - 'ppapi_example_skeleton', - 'ppapi.gyp:ppapi_cpp', - ], - 'sources': [ - 'examples/audio/audio.cc', - ], - }, - { - 'target_name': 'ppapi_example_audio_encode', - 'dependencies': [ - 'ppapi_example_skeleton', - 'ppapi.gyp:ppapi_cpp', - ], - 'sources': [ - 'examples/audio_encode/audio_encode.cc', - ], - }, - { - # GN version: //ppapi/examples/audio_input - 'target_name': 'ppapi_example_audio_input', - 'dependencies': [ - 'ppapi_example_skeleton', - 'ppapi.gyp:ppapi_cpp', - ], - 'sources': [ - 'examples/audio_input/audio_input.cc', - ], - }, - { - # GN version: //ppapi/examples/file_chooser - 'target_name': 'ppapi_example_file_chooser', - 'dependencies': [ - 'ppapi_example_skeleton', - 'ppapi.gyp:ppapi_cpp', - ], - 'sources': [ - 'examples/file_chooser/file_chooser.cc', - ], - }, - { - # GN version: //ppapi/examples/2d:graphics_2d - 'target_name': 'ppapi_example_graphics_2d', - 'dependencies': [ - 'ppapi_example_skeleton', - 'ppapi.gyp:ppapi_c', - ], - 'sources': [ - 'examples/2d/graphics_2d_example.c', - ], - }, - { - # GN version: //ppapi/examples/ime - 'target_name': 'ppapi_example_ime', - 'dependencies': [ - 'ppapi_example_skeleton', - 'ppapi.gyp:ppapi_cpp', - ], - 'sources': [ - 'examples/ime/ime.cc', - ], - }, - { - # GN version: //ppapi/examples/2d:paint_manager - 'target_name': 'ppapi_example_paint_manager', - 'dependencies': [ - 'ppapi_example_skeleton', - 'ppapi.gyp:ppapi_cpp', - ], - 'sources': [ - 'examples/2d/paint_manager_example.cc', - ], - }, - { - # GN version: //ppapi/examples/input - 'target_name': 'ppapi_example_input', - 'dependencies': [ - 'ppapi_example_skeleton', - 'ppapi.gyp:ppapi_cpp', - ], - 'sources': [ - 'examples/input/pointer_event_input.cc', - ], - }, - { - # GN version: //ppapi/examples/scripting - 'target_name': 'ppapi_example_post_message', - 'dependencies': [ - 'ppapi_example_skeleton', - 'ppapi.gyp:ppapi_cpp', - ], - 'sources': [ - 'examples/scripting/post_message.cc', - ], - }, - { - # GN version: //ppapi/examples/scaling - 'target_name': 'ppapi_example_scaling', - 'dependencies': [ - 'ppapi_example_skeleton', - 'ppapi.gyp:ppapi_cpp', - ], - 'sources': [ - 'examples/scaling/scaling.cc', - ], - }, - { - # GN version: //ppapi/examples/2d:scroll - 'target_name': 'ppapi_example_scroll', - 'dependencies': [ - 'ppapi_example_skeleton', - 'ppapi.gyp:ppapi_cpp', - ], - 'sources': [ - 'examples/2d/scroll.cc', - ], - }, - { - # GN version: //ppapi/examples/font - 'target_name': 'ppapi_example_simple_font', - 'dependencies': [ - 'ppapi_example_skeleton', - 'ppapi.gyp:ppapi_cpp', - ], - 'sources': [ - 'examples/font/simple_font.cc', - ], - }, - { - # GN version: //ppapi/examples/threading - 'target_name': 'ppapi_example_threading', - 'dependencies': [ - 'ppapi_example_skeleton', - 'ppapi.gyp:ppapi_cpp', - ], - 'sources': [ - 'examples/threading/threading.cc', - ], - }, - { - # GN version: //ppapi/examples/url_loader:streaming - 'target_name': 'ppapi_example_url_loader', - 'dependencies': [ - 'ppapi_example_skeleton', - 'ppapi.gyp:ppapi_cpp', - ], - 'sources': [ - 'examples/url_loader/streaming.cc', - ], - }, - { - # GN version: //ppapi/examples/url_loader:file - 'target_name': 'ppapi_example_url_loader_file', - 'dependencies': [ - 'ppapi_example_skeleton', - 'ppapi.gyp:ppapi_cpp', - ], - 'sources': [ - 'examples/url_loader/stream_to_file.cc', - ], - }, - { - # GN version: //ppapi/examples/gles2 - 'target_name': 'ppapi_example_gles2', - 'dependencies': [ - 'ppapi_example_skeleton', - 'ppapi.gyp:ppapi_cpp', - 'ppapi.gyp:ppapi_gles2', - ], - 'include_dirs': [ - 'lib/gl/include', - ], - 'sources': [ - 'examples/gles2/gles2.cc', - ], - }, - { - # GN version: //ppapi/examples/video_decode:stable - 'target_name': 'ppapi_example_video_decode', - 'dependencies': [ - 'ppapi_example_skeleton', - 'ppapi.gyp:ppapi_cpp', - 'ppapi.gyp:ppapi_gles2', - ], - 'include_dirs': [ - 'lib/gl/include', - ], - 'sources': [ - 'examples/video_decode/testdata.h', - 'examples/video_decode/video_decode.cc', - ], - }, - { - # GN version: //ppapi/examples/video_decode:dev - 'target_name': 'ppapi_example_video_decode_dev', - 'dependencies': [ - 'ppapi_example_skeleton', - 'ppapi.gyp:ppapi_cpp', - 'ppapi.gyp:ppapi_gles2', - ], - 'include_dirs': [ - 'lib/gl/include', - ], - 'sources': [ - 'examples/video_decode/testdata.h', - 'examples/video_decode/video_decode_dev.cc', - ], - }, - { - 'target_name': 'ppapi_example_video_encode', - 'dependencies': [ - 'ppapi_example_skeleton', - 'ppapi.gyp:ppapi_cpp', - ], - 'sources': [ - 'examples/video_encode/video_encode.cc', - ], - }, - { - # GN version: //ppapi/example/video_capture - 'target_name': 'ppapi_example_vc', - 'dependencies': [ - 'ppapi_example_skeleton', - 'ppapi.gyp:ppapi_cpp', - 'ppapi.gyp:ppapi_gles2', - ], - 'include_dirs': [ - 'lib/gl/include', - ], - 'sources': [ - 'examples/video_capture/video_capture.cc', - ], - }, - { - # GN version: //ppapi/examples/video_effects - 'target_name': 'ppapi_example_video_effects', - 'dependencies': [ - 'ppapi_example_skeleton', - 'ppapi.gyp:ppapi_cpp', - ], - 'sources': [ - 'examples/video_effects/video_effects.cc', - ], - }, - { - # GN version: //ppapi/examples/enumerate_devices - 'target_name': 'ppapi_example_enumerate_devices', - 'dependencies': [ - 'ppapi_example_skeleton', - 'ppapi.gyp:ppapi_cpp', - ], - 'sources': [ - 'examples/enumerate_devices/enumerate_devices.cc', - ], - }, - { - # GN version: //ppapi/examples/flash_topmost - 'target_name': 'ppapi_example_flash_topmost', - 'dependencies': [ - 'ppapi_example_skeleton', - 'ppapi.gyp:ppapi_cpp', - ], - 'sources': [ - 'examples/flash_topmost/flash_topmost.cc', - ], - }, - { - # GN version: //ppapi/examples/printing - 'target_name': 'ppapi_example_printing', - 'dependencies': [ - 'ppapi_example_skeleton', - 'ppapi.gyp:ppapi_cpp', - ], - 'sources': [ - 'examples/printing/printing.cc', - ], - }, - { - # GN version: //ppapi/examples/media_stream_audio - 'target_name': 'ppapi_example_media_stream_audio', - 'dependencies': [ - 'ppapi_example_skeleton', - 'ppapi.gyp:ppapi_cpp', - ], - 'sources': [ - 'examples/media_stream_audio/media_stream_audio.cc', - ], - }, - { - # GN version: //ppapi/examples/media_stream_video - 'target_name': 'ppapi_example_media_stream_video', - 'dependencies': [ - 'ppapi_example_skeleton', - 'ppapi.gyp:ppapi_cpp', - 'ppapi.gyp:ppapi_gles2', - ], - 'include_dirs': [ - 'lib/gl/include', - ], - 'sources': [ - 'examples/media_stream_video/media_stream_video.cc', - ], - }, - { - # GN version: //ppapi/examples/gles2_spinning_cube - 'target_name': 'ppapi_example_gles2_spinning_cube', - 'dependencies': [ - 'ppapi_example_skeleton', - 'ppapi.gyp:ppapi_cpp', - 'ppapi.gyp:ppapi_gles2', - ], - 'include_dirs': [ - 'lib/gl/include', - ], - 'sources': [ - 'examples/gles2_spinning_cube/gles2_spinning_cube.cc', - 'examples/gles2_spinning_cube/spinning_cube.cc', - 'examples/gles2_spinning_cube/spinning_cube.h', - ], - }, - { - # GN version: //ppapi/examples/compositor - 'target_name': 'ppapi_example_compositor', - 'dependencies': [ - 'ppapi_example_skeleton', - 'ppapi.gyp:ppapi_cpp', - 'ppapi.gyp:ppapi_gles2', - ], - 'include_dirs': [ - 'lib/gl/include', - ], - 'sources': [ - 'examples/compositor/compositor.cc', - 'examples/compositor/spinning_cube.cc', - 'examples/compositor/spinning_cube.h', - ], - }, - # Adding a new PPAPI example? Don't forget to update the GN build. - # See //ppapi/examples/BUILD.gn - ], - 'conditions': [ - ['test_isolation_mode != "noop"', { - 'targets': [ - { - 'target_name': 'ppapi_unittests_run', - 'type': 'none', - 'dependencies': [ - 'ppapi_unittests', - ], - 'includes': [ '../build/isolate.gypi' ], - 'sources': [ 'ppapi_unittests.isolate' ], - }, - ], - }], - ], -} diff --git a/chromium/ppapi/ppapi_unittests.isolate b/chromium/ppapi/ppapi_unittests.isolate deleted file mode 100644 index c77d6e53053..00000000000 --- a/chromium/ppapi/ppapi_unittests.isolate +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) 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. -{ - 'conditions': [ - ['OS=="linux" or OS=="mac" or OS=="win"', { - 'variables': { - 'command': [ - '<(PRODUCT_DIR)/ppapi_unittests<(EXECUTABLE_SUFFIX)', - ], - }, - }], - ], - 'includes': [ - '../base/base.isolate', - ], -} diff --git a/chromium/ppapi/proxy/BUILD.gn b/chromium/ppapi/proxy/BUILD.gn index fd36af7bf36..140c718aa4d 100644 --- a/chromium/ppapi/proxy/BUILD.gn +++ b/chromium/ppapi/proxy/BUILD.gn @@ -287,6 +287,8 @@ component("proxy") { "//mojo/edk/system", "//ppapi/c", "//ppapi/shared_impl", + "//ui/gfx/geometry", + "//ui/gfx/ipc/geometry", ] if (!is_nacl) { @@ -356,7 +358,7 @@ source_set("ipc_sources") { } } -source_set("test_support") { +static_library("test_support") { testonly = true sources = [ diff --git a/chromium/ppapi/proxy/audio_encoder_resource.cc b/chromium/ppapi/proxy/audio_encoder_resource.cc index a5c2ec02657..0e88c3e8369 100644 --- a/chromium/ppapi/proxy/audio_encoder_resource.cc +++ b/chromium/ppapi/proxy/audio_encoder_resource.cc @@ -232,8 +232,7 @@ void AudioEncoderResource::OnPluginMsgInitializeReply( if (!params.TakeSharedMemoryHandleAtIndex(0, &buffer_handle) || !audio_buffer_manager_.SetBuffers( audio_buffer_count, audio_buffer_size, - base::WrapUnique(new base::SharedMemory(buffer_handle, false)), - true)) { + base::MakeUnique<base::SharedMemory>(buffer_handle, false), true)) { RunCallback(&initialize_callback_, PP_ERROR_NOMEMORY); return; } @@ -242,8 +241,7 @@ void AudioEncoderResource::OnPluginMsgInitializeReply( if (!params.TakeSharedMemoryHandleAtIndex(1, &buffer_handle) || !bitstream_buffer_manager_.SetBuffers( bitstream_buffer_count, bitstream_buffer_size, - base::WrapUnique(new base::SharedMemory(buffer_handle, false)), - false)) { + base::MakeUnique<base::SharedMemory>(buffer_handle, false), false)) { RunCallback(&initialize_callback_, PP_ERROR_NOMEMORY); return; } diff --git a/chromium/ppapi/proxy/file_system_resource.cc b/chromium/ppapi/proxy/file_system_resource.cc index 0be0ea52e5e..37b2cc7275c 100644 --- a/chromium/ppapi/proxy/file_system_resource.cc +++ b/chromium/ppapi/proxy/file_system_resource.cc @@ -95,12 +95,12 @@ PP_FileSystemType FileSystemResource::GetType() { } void FileSystemResource::OpenQuotaFile(PP_Resource file_io) { - DCHECK(!ContainsKey(files_, file_io)); + DCHECK(!base::ContainsKey(files_, file_io)); files_.insert(file_io); } void FileSystemResource::CloseQuotaFile(PP_Resource file_io) { - DCHECK(ContainsKey(files_, file_io)); + DCHECK(base::ContainsKey(files_, file_io)); files_.erase(file_io); } diff --git a/chromium/ppapi/proxy/flash_font_file_resource.cc b/chromium/ppapi/proxy/flash_font_file_resource.cc index 9e2e4724377..7d3b7c4bc14 100644 --- a/chromium/ppapi/proxy/flash_font_file_resource.cc +++ b/chromium/ppapi/proxy/flash_font_file_resource.cc @@ -73,7 +73,7 @@ const std::string* FlashFontFileResource::AddFontTable( uint32_t table, const std::string& contents) { FontTableMap::const_iterator it = - font_tables_.set(table, base::WrapUnique(new std::string(contents))); + font_tables_.set(table, base::MakeUnique<std::string>(contents)); return it->second; } diff --git a/chromium/ppapi/proxy/pdf_resource.cc b/chromium/ppapi/proxy/pdf_resource.cc index 2fdf9e46bcc..565c23ddf86 100644 --- a/chromium/ppapi/proxy/pdf_resource.cc +++ b/chromium/ppapi/proxy/pdf_resource.cc @@ -10,11 +10,13 @@ #include <string.h> #include "base/command_line.h" +#include "base/debug/crash_logging.h" #include "base/metrics/histogram.h" #include "base/strings/utf_string_conversions.h" #include "gin/v8_initializer.h" #include "ppapi/c/pp_errors.h" #include "ppapi/c/private/ppb_pdf.h" +#include "ppapi/proxy/plugin_globals.h" #include "ppapi/proxy/ppapi_messages.h" #include "ppapi/shared_impl/var.h" #include "third_party/icu/source/i18n/unicode/usearch.h" @@ -190,5 +192,12 @@ void PDFResource::SetAccessibilityPageInfo( *page_info, text_run_vector, char_vector)); } +void PDFResource::SetCrashData(const char* pdf_url, const char* top_level_url) { + if (pdf_url) + base::debug::SetCrashKeyValue("subresource_url", pdf_url); + if (top_level_url) + PluginGlobals::Get()->SetActiveURL(top_level_url); +} + } // namespace proxy } // namespace ppapi diff --git a/chromium/ppapi/proxy/pdf_resource.h b/chromium/ppapi/proxy/pdf_resource.h index a08e4404950..36736da928a 100644 --- a/chromium/ppapi/proxy/pdf_resource.h +++ b/chromium/ppapi/proxy/pdf_resource.h @@ -62,6 +62,7 @@ class PPAPI_PROXY_EXPORT PDFResource PP_PrivateAccessibilityPageInfo* page_info, PP_PrivateAccessibilityTextRunInfo text_runs[], PP_PrivateAccessibilityCharInfo chars[]) override; + void SetCrashData(const char* pdf_url, const char* top_level_url) override; private: std::string locale_; diff --git a/chromium/ppapi/proxy/plugin_message_filter.cc b/chromium/ppapi/proxy/plugin_message_filter.cc index a2994c52885..5617185c712 100644 --- a/chromium/ppapi/proxy/plugin_message_filter.cc +++ b/chromium/ppapi/proxy/plugin_message_filter.cc @@ -31,8 +31,8 @@ PluginMessageFilter::PluginMessageFilter( PluginMessageFilter::~PluginMessageFilter() { } -void PluginMessageFilter::OnFilterAdded(IPC::Sender* sender) { - sender_ = sender; +void PluginMessageFilter::OnFilterAdded(IPC::Channel* channel) { + sender_ = channel; } void PluginMessageFilter::OnFilterRemoved() { diff --git a/chromium/ppapi/proxy/plugin_message_filter.h b/chromium/ppapi/proxy/plugin_message_filter.h index b41a71dbd5d..5ffb4a7eda1 100644 --- a/chromium/ppapi/proxy/plugin_message_filter.h +++ b/chromium/ppapi/proxy/plugin_message_filter.h @@ -43,7 +43,7 @@ class PPAPI_PROXY_EXPORT PluginMessageFilter : public IPC::MessageFilter, ~PluginMessageFilter() override; // MessageFilter implementation. - void OnFilterAdded(IPC::Sender* sender) override; + void OnFilterAdded(IPC::Channel* channel) override; void OnFilterRemoved() override; bool OnMessageReceived(const IPC::Message& message) override; diff --git a/chromium/ppapi/proxy/ppapi_command_buffer_proxy.cc b/chromium/ppapi/proxy/ppapi_command_buffer_proxy.cc index b7c526486ef..77ef28217f9 100644 --- a/chromium/ppapi/proxy/ppapi_command_buffer_proxy.cc +++ b/chromium/ppapi/proxy/ppapi_command_buffer_proxy.cc @@ -262,11 +262,6 @@ int32_t PpapiCommandBufferProxy::CreateGpuMemoryBufferImage( return -1; } -int32_t PpapiCommandBufferProxy::GetImageGpuMemoryBufferId(unsigned image_id) { - NOTREACHED(); - return -1; -} - bool PpapiCommandBufferProxy::Send(IPC::Message* msg) { DCHECK(last_state_.error == gpu::error::kNoError); diff --git a/chromium/ppapi/proxy/ppapi_command_buffer_proxy.h b/chromium/ppapi/proxy/ppapi_command_buffer_proxy.h index cc4ef3720ca..3cb7f423250 100644 --- a/chromium/ppapi/proxy/ppapi_command_buffer_proxy.h +++ b/chromium/ppapi/proxy/ppapi_command_buffer_proxy.h @@ -64,7 +64,6 @@ class PPAPI_PROXY_EXPORT PpapiCommandBufferProxy : public gpu::CommandBuffer, size_t height, unsigned internalformat, unsigned usage) override; - int32_t GetImageGpuMemoryBufferId(unsigned image_id) override; void SignalQuery(uint32_t query, const base::Closure& callback) override; void SetLock(base::Lock*) override; void EnsureWorkVisible() override; diff --git a/chromium/ppapi/proxy/ppapi_messages.h b/chromium/ppapi/proxy/ppapi_messages.h index 4c0f0b53b84..968fe57bf36 100644 --- a/chromium/ppapi/proxy/ppapi_messages.h +++ b/chromium/ppapi/proxy/ppapi_messages.h @@ -1045,14 +1045,15 @@ IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBCore_ReleaseResource, ppapi::HostResource) // PPB_Graphics3D. -IPC_SYNC_MESSAGE_ROUTED3_4(PpapiHostMsg_PPBGraphics3D_Create, - PP_Instance /* instance */, - ppapi::HostResource /* share_context */, - std::vector<int32_t> /* attrib_list */, - ppapi::HostResource /* result */, - gpu::Capabilities /* capabilities */, - ppapi::proxy::SerializedHandle /* shared_state */, - gpu::CommandBufferId /* command_buffer_id */) +IPC_SYNC_MESSAGE_ROUTED3_4( + PpapiHostMsg_PPBGraphics3D_Create, + PP_Instance /* instance */, + ppapi::HostResource /* share_context */, + gpu::gles2::ContextCreationAttribHelper /* attrib_helper */, + ppapi::HostResource /* result */, + gpu::Capabilities /* capabilities */, + ppapi::proxy::SerializedHandle /* shared_state */, + gpu::CommandBufferId /* command_buffer_id */) IPC_SYNC_MESSAGE_ROUTED2_0(PpapiHostMsg_PPBGraphics3D_SetGetBuffer, ppapi::HostResource /* context */, int32_t /* transfer_buffer_id */) @@ -1086,9 +1087,10 @@ IPC_SYNC_MESSAGE_ROUTED2_0(PpapiHostMsg_PPBGraphics3D_DestroyTransferBuffer, // after this message is sent. IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBGraphics3D_TakeFrontBuffer, ppapi::HostResource /* graphics_3d */) -IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBGraphics3D_SwapBuffers, +IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBGraphics3D_SwapBuffers, ppapi::HostResource /* graphics_3d */, - gpu::SyncToken /* sync_token */) + gpu::SyncToken /* sync_token */, + gfx::Size /* size */) IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBGraphics3D_EnsureWorkVisible, ppapi::HostResource /* context */) @@ -2028,6 +2030,33 @@ IPC_MESSAGE_CONTROL3(PpapiPluginMsg_VideoSource_GetFrameReply, PP_TimeTicks /* timestamp */) IPC_MESSAGE_CONTROL0(PpapiHostMsg_VideoSource_Close) +// VpnProvider ---------------------------------------------------------------- +IPC_MESSAGE_CONTROL0(PpapiHostMsg_VpnProvider_Create) + +// VpnProvider plugin -> host -> plugin +IPC_MESSAGE_CONTROL2(PpapiHostMsg_VpnProvider_Bind, + std::string /* configuration_id */, + std::string /* configuration_name */) +IPC_MESSAGE_CONTROL3(PpapiPluginMsg_VpnProvider_BindReply, + uint32_t /* queue_size */, + uint32_t /* max_packet_size */, + int32_t /* status */) +IPC_MESSAGE_CONTROL2(PpapiHostMsg_VpnProvider_SendPacket, + uint32_t /* packet_size */, + uint32_t /* id */) +IPC_MESSAGE_CONTROL1(PpapiPluginMsg_VpnProvider_SendPacketReply, + uint32_t /* id */) + +// VpnProvider host -> plugin +IPC_MESSAGE_CONTROL0(PpapiPluginMsg_VpnProvider_OnUnbind) + +// VpnProvider host -> plugin -> host +IPC_MESSAGE_CONTROL2(PpapiPluginMsg_VpnProvider_OnPacketReceived, + uint32_t /* packet_size */, + uint32_t /* id */) +IPC_MESSAGE_CONTROL1(PpapiHostMsg_VpnProvider_OnPacketReceivedReply, + uint32_t /* id */) + // WebSocket ------------------------------------------------------------------- IPC_MESSAGE_CONTROL0(PpapiHostMsg_WebSocket_Create) diff --git a/chromium/ppapi/proxy/ppapi_proxy_test.cc b/chromium/ppapi/proxy/ppapi_proxy_test.cc index 46d7a4ada77..ed70bb575b3 100644 --- a/chromium/ppapi/proxy/ppapi_proxy_test.cc +++ b/chromium/ppapi/proxy/ppapi_proxy_test.cc @@ -4,7 +4,6 @@ #include "ppapi/proxy/ppapi_proxy_test.h" -#include <sstream> #include <tuple> #include "base/bind.h" @@ -550,21 +549,19 @@ void TwoWayTest::SetUp() { io_thread_.StartWithOptions(options); plugin_thread_.Start(); - // Construct the IPC handle name using the process ID so we can safely run - // multiple |TwoWayTest|s concurrently. - std::ostringstream handle_name; - handle_name << "TwoWayTestChannel" << base::GetCurrentProcId(); - IPC::ChannelHandle handle(handle_name.str()); + IPC::ChannelHandle local_handle, remote_handle; + IPC::Channel::GenerateMojoChannelHandlePair("TwoWayTestChannel", + &local_handle, &remote_handle); base::WaitableEvent remote_harness_set_up( base::WaitableEvent::ResetPolicy::MANUAL, base::WaitableEvent::InitialState::NOT_SIGNALED); plugin_thread_.task_runner()->PostTask( - FROM_HERE, base::Bind(&SetUpRemoteHarness, remote_harness_, handle, + FROM_HERE, base::Bind(&SetUpRemoteHarness, remote_harness_, remote_handle, base::RetainedRef(io_thread_.task_runner()), &shutdown_event_, &remote_harness_set_up)); remote_harness_set_up.Wait(); local_harness_->SetUpHarnessWithChannel( - handle, io_thread_.task_runner().get(), &shutdown_event_, + local_handle, io_thread_.task_runner().get(), &shutdown_event_, true); // is_client } diff --git a/chromium/ppapi/proxy/ppb_graphics_3d_proxy.cc b/chromium/ppapi/proxy/ppb_graphics_3d_proxy.cc index 0c21e377733..7725330b63b 100644 --- a/chromium/ppapi/proxy/ppb_graphics_3d_proxy.cc +++ b/chromium/ppapi/proxy/ppb_graphics_3d_proxy.cc @@ -48,8 +48,8 @@ gpu::CommandBuffer::State GetErrorState() { } // namespace -Graphics3D::Graphics3D(const HostResource& resource) - : PPB_Graphics3D_Shared(resource) { +Graphics3D::Graphics3D(const HostResource& resource, const gfx::Size& size) + : PPB_Graphics3D_Shared(resource, size) { } Graphics3D::~Graphics3D() { @@ -117,7 +117,8 @@ gpu::GpuControl* Graphics3D::GetGpuControl() { return command_buffer_.get(); } -int32_t Graphics3D::DoSwapBuffers(const gpu::SyncToken& sync_token) { +int32_t Graphics3D::DoSwapBuffers(const gpu::SyncToken& sync_token, + const gfx::Size& size) { // A valid sync token would indicate a swap buffer already happened somehow. DCHECK(!sync_token.HasData()); @@ -135,7 +136,7 @@ int32_t Graphics3D::DoSwapBuffers(const gpu::SyncToken& sync_token) { gl->GenSyncTokenCHROMIUM(fence_sync, new_sync_token.GetData()); IPC::Message* msg = new PpapiHostMsg_PPBGraphics3D_SwapBuffers( - API_ID_PPB_GRAPHICS_3D, host_resource(), new_sync_token); + API_ID_PPB_GRAPHICS_3D, host_resource(), new_sync_token, size); msg->set_unblock(true); PluginDispatcher::GetForResource(this)->Send(msg); @@ -172,29 +173,48 @@ PP_Resource PPB_Graphics3D_Proxy::CreateProxyResource( share_gles2 = share_graphics->gles2_impl(); } + gpu::gles2::ContextCreationAttribHelper attrib_helper; std::vector<int32_t> attribs; if (attrib_list) { - for (const int32_t* attr = attrib_list; - attr[0] != PP_GRAPHICS3DATTRIB_NONE; + for (const int32_t* attr = attrib_list; attr[0] != PP_GRAPHICS3DATTRIB_NONE; attr += 2) { - attribs.push_back(attr[0]); - attribs.push_back(attr[1]); + switch (attr[0]) { + case PP_GRAPHICS3DATTRIB_WIDTH: + attrib_helper.offscreen_framebuffer_size.set_width(attr[1]); + break; + case PP_GRAPHICS3DATTRIB_HEIGHT: + attrib_helper.offscreen_framebuffer_size.set_height(attr[1]); + break; + case PP_GRAPHICS3DATTRIB_GPU_PREFERENCE: + attrib_helper.gpu_preference = + (attr[1] == PP_GRAPHICS3DATTRIB_GPU_PREFERENCE_LOW_POWER) + ? gl::PreferIntegratedGpu + : gl::PreferDiscreteGpu; + break; + default: + attribs.push_back(attr[0]); + attribs.push_back(attr[1]); + break; + } } + attribs.push_back(PP_GRAPHICS3DATTRIB_NONE); } - attribs.push_back(PP_GRAPHICS3DATTRIB_NONE); + if (!attrib_helper.Parse(attribs)) + return 0; HostResource result; gpu::Capabilities capabilities; ppapi::proxy::SerializedHandle shared_state; gpu::CommandBufferId command_buffer_id; - dispatcher->Send(new PpapiHostMsg_PPBGraphics3D_Create(API_ID_PPB_GRAPHICS_3D, - instance, share_host, attribs, &result, &capabilities, &shared_state, - &command_buffer_id)); + dispatcher->Send(new PpapiHostMsg_PPBGraphics3D_Create( + API_ID_PPB_GRAPHICS_3D, instance, share_host, attrib_helper, &result, + &capabilities, &shared_state, &command_buffer_id)); if (result.is_null()) return 0; - scoped_refptr<Graphics3D> graphics_3d(new Graphics3D(result)); + scoped_refptr<Graphics3D> graphics_3d( + new Graphics3D(result, attrib_helper.offscreen_framebuffer_size)); if (!graphics_3d->Init(share_gles2, capabilities, shared_state, command_buffer_id)) { return 0; @@ -240,16 +260,12 @@ bool PPB_Graphics3D_Proxy::OnMessageReceived(const IPC::Message& msg) { void PPB_Graphics3D_Proxy::OnMsgCreate( PP_Instance instance, HostResource share_context, - const std::vector<int32_t>& attribs, + const gpu::gles2::ContextCreationAttribHelper& attrib_helper, HostResource* result, gpu::Capabilities* capabilities, SerializedHandle* shared_state, gpu::CommandBufferId* command_buffer_id) { shared_state->set_null_shmem(); - if (attribs.empty() || - attribs.back() != PP_GRAPHICS3DATTRIB_NONE || - !(attribs.size() & 1)) - return; // Bad message. thunk::EnterResourceCreation enter(instance); @@ -258,13 +274,9 @@ void PPB_Graphics3D_Proxy::OnMsgCreate( base::SharedMemoryHandle handle = base::SharedMemory::NULLHandle(); result->SetHostResource( - instance, - enter.functions()->CreateGraphics3DRaw(instance, - share_context.host_resource(), - &attribs.front(), - capabilities, - &handle, - command_buffer_id)); + instance, enter.functions()->CreateGraphics3DRaw( + instance, share_context.host_resource(), attrib_helper, + capabilities, &handle, command_buffer_id)); if (!result->is_null()) { shared_state->set_shmem(TransportSHMHandle(dispatcher(), handle), sizeof(gpu::CommandBuffer::State)); @@ -347,13 +359,14 @@ void PPB_Graphics3D_Proxy::OnMsgDestroyTransferBuffer( } void PPB_Graphics3D_Proxy::OnMsgSwapBuffers(const HostResource& context, - const gpu::SyncToken& sync_token) { + const gpu::SyncToken& sync_token, + const gfx::Size& size) { EnterHostFromHostResourceForceCallback<PPB_Graphics3D_API> enter( context, callback_factory_, &PPB_Graphics3D_Proxy::SendSwapBuffersACKToPlugin, context); if (enter.succeeded()) - enter.SetResult( - enter.object()->SwapBuffersWithSyncToken(enter.callback(), sync_token)); + enter.SetResult(enter.object()->SwapBuffersWithSyncToken( + enter.callback(), sync_token, size)); } void PPB_Graphics3D_Proxy::OnMsgTakeFrontBuffer(const HostResource& context) { diff --git a/chromium/ppapi/proxy/ppb_graphics_3d_proxy.h b/chromium/ppapi/proxy/ppb_graphics_3d_proxy.h index 2a28fce80b8..54c4c7a75f9 100644 --- a/chromium/ppapi/proxy/ppb_graphics_3d_proxy.h +++ b/chromium/ppapi/proxy/ppb_graphics_3d_proxy.h @@ -22,6 +22,9 @@ #include "ppapi/utility/completion_callback_factory.h" namespace gpu { +namespace gles2 { +struct ContextCreationAttribHelper; +} struct Capabilities; } @@ -36,7 +39,7 @@ class PpapiCommandBufferProxy; class PPAPI_PROXY_EXPORT Graphics3D : public PPB_Graphics3D_Shared { public: - explicit Graphics3D(const HostResource& resource); + Graphics3D(const HostResource& resource, const gfx::Size& size); ~Graphics3D() override; bool Init(gpu::gles2::GLES2Implementation* share_gles2, @@ -61,7 +64,8 @@ class PPAPI_PROXY_EXPORT Graphics3D : public PPB_Graphics3D_Shared { // PPB_Graphics3D_Shared overrides. gpu::CommandBuffer* GetCommandBuffer() override; gpu::GpuControl* GetGpuControl() override; - int32_t DoSwapBuffers(const gpu::SyncToken& sync_token) override; + int32_t DoSwapBuffers(const gpu::SyncToken& sync_token, + const gfx::Size& size) override; std::unique_ptr<PpapiCommandBufferProxy> command_buffer_; @@ -86,7 +90,7 @@ class PPB_Graphics3D_Proxy : public InterfaceProxy { private: void OnMsgCreate(PP_Instance instance, HostResource share_context, - const std::vector<int32_t>& attribs, + const gpu::gles2::ContextCreationAttribHelper& attrib_helper, HostResource* result, gpu::Capabilities* capabilities, SerializedHandle* handle, @@ -110,7 +114,8 @@ class PPB_Graphics3D_Proxy : public InterfaceProxy { ppapi::proxy::SerializedHandle* transfer_buffer); void OnMsgDestroyTransferBuffer(const HostResource& context, int32_t id); void OnMsgSwapBuffers(const HostResource& context, - const gpu::SyncToken& sync_token); + const gpu::SyncToken& sync_token, + const gfx::Size& size); void OnMsgTakeFrontBuffer(const HostResource& context); void OnMsgEnsureWorkVisible(const HostResource& context); // Renderer->plugin message handlers. diff --git a/chromium/ppapi/proxy/ppb_message_loop_proxy.cc b/chromium/ppapi/proxy/ppb_message_loop_proxy.cc index 7f2fc337849..ac78eb9ad29 100644 --- a/chromium/ppapi/proxy/ppb_message_loop_proxy.cc +++ b/chromium/ppapi/proxy/ppb_message_loop_proxy.cc @@ -9,8 +9,9 @@ #include <vector> #include "base/bind.h" +#include "base/bind_helpers.h" #include "base/compiler_specific.h" -#include "base/location.h" +#include "base/logging.h" #include "base/threading/thread_task_runner_handle.h" #include "ppapi/c/pp_errors.h" #include "ppapi/c/ppb_message_loop.h" @@ -109,11 +110,17 @@ int32_t MessageLoopResource::Run() { if (is_main_thread_loop_) return PP_ERROR_INPROGRESS; + base::RunLoop* previous_run_loop = run_loop_; + base::RunLoop run_loop; + run_loop_ = &run_loop; + nested_invocations_++; CallWhileUnlocked( - base::Bind(&base::MessageLoop::Run, base::Unretained(loop_.get()))); + base::Bind(&base::RunLoop::Run, base::Unretained(run_loop_))); nested_invocations_--; + run_loop_ = previous_run_loop; + if (should_destroy_ && nested_invocations_ == 0) { task_runner_ = NULL; loop_.reset(); @@ -142,10 +149,13 @@ int32_t MessageLoopResource::PostQuit(PP_Bool should_destroy) { if (PP_ToBool(should_destroy)) should_destroy_ = true; - if (IsCurrent() && nested_invocations_ > 0) - loop_->QuitWhenIdle(); - else - PostClosure(FROM_HERE, base::MessageLoop::QuitWhenIdleClosure(), 0); + if (IsCurrent() && nested_invocations_ > 0) { + run_loop_->QuitWhenIdle(); + } else { + PostClosure(FROM_HERE, base::Bind(&MessageLoopResource::QuitRunLoopWhenIdle, + Unretained(this)), + 0); + } return PP_OK; } @@ -201,6 +211,12 @@ bool MessageLoopResource::CurrentlyHandlingBlockingMessage() { return currently_handling_blocking_message_; } +void MessageLoopResource::QuitRunLoopWhenIdle() { + DCHECK(IsCurrent()); + DCHECK(run_loop_); + run_loop_->QuitWhenIdle(); +} + // static void MessageLoopResource::ReleaseMessageLoop(void* value) { static_cast<MessageLoopResource*>(value)->DetachFromThread(); diff --git a/chromium/ppapi/proxy/ppb_message_loop_proxy.h b/chromium/ppapi/proxy/ppb_message_loop_proxy.h index 16139594151..f78c3772254 100644 --- a/chromium/ppapi/proxy/ppb_message_loop_proxy.h +++ b/chromium/ppapi/proxy/ppb_message_loop_proxy.h @@ -13,6 +13,7 @@ #include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/message_loop/message_loop.h" +#include "base/run_loop.h" #include "base/single_thread_task_runner.h" #include "ppapi/proxy/interface_proxy.h" #include "ppapi/proxy/ppapi_proxy_export.h" @@ -78,6 +79,9 @@ class PPAPI_PROXY_EXPORT MessageLoopResource : public MessageLoopShared { base::SingleThreadTaskRunner* GetTaskRunner() override; bool CurrentlyHandlingBlockingMessage() override; + // Quits |run_loop_|. Must be called from the thread that runs the RunLoop. + void QuitRunLoopWhenIdle(); + // TLS destructor function. static void ReleaseMessageLoop(void* value); @@ -88,6 +92,9 @@ class PPAPI_PROXY_EXPORT MessageLoopResource : public MessageLoopShared { std::unique_ptr<base::MessageLoop> loop_; scoped_refptr<base::SingleThreadTaskRunner> task_runner_; + // RunLoop currently on the stack. + base::RunLoop* run_loop_ = nullptr; + // Number of invocations of Run currently on the stack. int nested_invocations_; diff --git a/chromium/ppapi/proxy/ppp_video_decoder_proxy.cc b/chromium/ppapi/proxy/ppp_video_decoder_proxy.cc index 19803187d17..576ba95a5d0 100644 --- a/chromium/ppapi/proxy/ppp_video_decoder_proxy.cc +++ b/chromium/ppapi/proxy/ppp_video_decoder_proxy.cc @@ -25,10 +25,15 @@ void ProvidePictureBuffers(PP_Instance instance, PP_Resource decoder, HostResource decoder_resource; decoder_resource.SetHostResource(instance, decoder); - HostDispatcher::GetForInstance(instance)->Send( - new PpapiMsg_PPPVideoDecoder_ProvidePictureBuffers( - API_ID_PPP_VIDEO_DECODER_DEV, - decoder_resource, req_num_of_bufs, *dimensions, texture_target)); + // This is called by the graphics system in response to a message from the + // GPU process. These messages will not be synchronized with the lifetime + // of the plugin so we need to null-check here. + HostDispatcher* dispatcher = HostDispatcher::GetForInstance(instance); + if (dispatcher) { + dispatcher->Send(new PpapiMsg_PPPVideoDecoder_ProvidePictureBuffers( + API_ID_PPP_VIDEO_DECODER_DEV, + decoder_resource, req_num_of_bufs, *dimensions, texture_target)); + } } void DismissPictureBuffer(PP_Instance instance, PP_Resource decoder, @@ -36,10 +41,13 @@ void DismissPictureBuffer(PP_Instance instance, PP_Resource decoder, HostResource decoder_resource; decoder_resource.SetHostResource(instance, decoder); - HostDispatcher::GetForInstance(instance)->Send( - new PpapiMsg_PPPVideoDecoder_DismissPictureBuffer( - API_ID_PPP_VIDEO_DECODER_DEV, - decoder_resource, picture_buffer_id)); + // Null check as in ProvidePictureBuffers above. + HostDispatcher* dispatcher = HostDispatcher::GetForInstance(instance); + if (dispatcher) { + dispatcher->Send(new PpapiMsg_PPPVideoDecoder_DismissPictureBuffer( + API_ID_PPP_VIDEO_DECODER_DEV, + decoder_resource, picture_buffer_id)); + } } void PictureReady(PP_Instance instance, PP_Resource decoder, @@ -47,9 +55,12 @@ void PictureReady(PP_Instance instance, PP_Resource decoder, HostResource decoder_resource; decoder_resource.SetHostResource(instance, decoder); - HostDispatcher::GetForInstance(instance)->Send( - new PpapiMsg_PPPVideoDecoder_PictureReady( - API_ID_PPP_VIDEO_DECODER_DEV, decoder_resource, *picture)); + // Null check as in ProvidePictureBuffers above. + HostDispatcher* dispatcher = HostDispatcher::GetForInstance(instance); + if (dispatcher) { + dispatcher->Send(new PpapiMsg_PPPVideoDecoder_PictureReady( + API_ID_PPP_VIDEO_DECODER_DEV, decoder_resource, *picture)); + } } void NotifyError(PP_Instance instance, PP_Resource decoder, diff --git a/chromium/ppapi/proxy/resource_creation_proxy.cc b/chromium/ppapi/proxy/resource_creation_proxy.cc index f86ffdbd8aa..1c79bc5cf62 100644 --- a/chromium/ppapi/proxy/resource_creation_proxy.cc +++ b/chromium/ppapi/proxy/resource_creation_proxy.cc @@ -265,7 +265,7 @@ PP_Resource ResourceCreationProxy::CreateGraphics3D( PP_Resource ResourceCreationProxy::CreateGraphics3DRaw( PP_Instance instance, PP_Resource share_context, - const int32_t* attrib_list, + const gpu::gles2::ContextCreationAttribHelper& attrib_helper, gpu::Capabilities* capabilities, base::SharedMemoryHandle* shared_state, gpu::CommandBufferId* command_buffer_id) { diff --git a/chromium/ppapi/proxy/resource_creation_proxy.h b/chromium/ppapi/proxy/resource_creation_proxy.h index 302674566f8..9e7ca263052 100644 --- a/chromium/ppapi/proxy/resource_creation_proxy.h +++ b/chromium/ppapi/proxy/resource_creation_proxy.h @@ -123,7 +123,7 @@ class ResourceCreationProxy : public InterfaceProxy, PP_Resource CreateGraphics3DRaw( PP_Instance instance, PP_Resource share_context, - const int32_t* attrib_list, + const gpu::gles2::ContextCreationAttribHelper& attrib_helper, gpu::Capabilities* capabilities, base::SharedMemoryHandle* shared_state, gpu::CommandBufferId* command_buffer_id) override; diff --git a/chromium/ppapi/proxy/serialized_var.cc b/chromium/ppapi/proxy/serialized_var.cc index abf9fbfd161..083e94f7064 100644 --- a/chromium/ppapi/proxy/serialized_var.cc +++ b/chromium/ppapi/proxy/serialized_var.cc @@ -272,8 +272,8 @@ ReceiveSerializedVarVectorOutParam::ReceiveSerializedVarVectorOutParam( ReceiveSerializedVarVectorOutParam::~ReceiveSerializedVarVectorOutParam() { *output_count_ = static_cast<uint32_t>(vector_.size()); - if (!vector_.size()) { - *output_ = NULL; + if (vector_.empty()) { + *output_ = nullptr; return; } diff --git a/chromium/ppapi/proxy/tracked_callback_unittest.cc b/chromium/ppapi/proxy/tracked_callback_unittest.cc index 52a7723f4c3..30868013105 100644 --- a/chromium/ppapi/proxy/tracked_callback_unittest.cc +++ b/chromium/ppapi/proxy/tracked_callback_unittest.cc @@ -62,7 +62,7 @@ class CallbackThread : public base::SimpleThread { scoped_refptr<MessageLoopResource> message_loop(message_loop_); message_loop->AttachToCurrentThread(); // Note, run releases the lock to run events. - message_loop->Run(); + base::RunLoop().Run(); message_loop->DetachFromThread(); } diff --git a/chromium/ppapi/proxy/video_decoder_resource_unittest.cc b/chromium/ppapi/proxy/video_decoder_resource_unittest.cc index a8e3c4fb787..80c28035d05 100644 --- a/chromium/ppapi/proxy/video_decoder_resource_unittest.cc +++ b/chromium/ppapi/proxy/video_decoder_resource_unittest.cc @@ -109,7 +109,7 @@ class VideoDecoderResourceTest : public PluginProxyTest { HostResource host_resource; host_resource.SetHostResource(pp_instance(), kGraphics3D); scoped_refptr<ppapi::proxy::Graphics3D> graphics_3d( - new ppapi::proxy::Graphics3D(host_resource)); + new ppapi::proxy::Graphics3D(host_resource, gfx::Size(640, 480))); return graphics_3d->GetReference(); } diff --git a/chromium/ppapi/proxy/video_encoder_resource.cc b/chromium/ppapi/proxy/video_encoder_resource.cc index 89dd9f12003..0f7c890a934 100644 --- a/chromium/ppapi/proxy/video_encoder_resource.cc +++ b/chromium/ppapi/proxy/video_encoder_resource.cc @@ -351,8 +351,7 @@ void VideoEncoderResource::OnPluginMsgGetVideoFramesReply( if (!buffer_manager_.SetBuffers( frame_count, frame_length, - base::WrapUnique(new base::SharedMemory(buffer_handle, false)), - true)) { + base::MakeUnique<base::SharedMemory>(buffer_handle, false), true)) { NotifyError(PP_ERROR_FAILED); return; } diff --git a/chromium/ppapi/proxy/vpn_provider_resource.cc b/chromium/ppapi/proxy/vpn_provider_resource.cc index bf960bdf807..95536393dcc 100644 --- a/chromium/ppapi/proxy/vpn_provider_resource.cc +++ b/chromium/ppapi/proxy/vpn_provider_resource.cc @@ -23,7 +23,9 @@ VpnProviderResource::VpnProviderResource(Connection connection, send_packet_callback_(nullptr), receive_packet_callback_(nullptr), receive_packet_callback_var_(nullptr), - bound_(false) {} + bound_(false) { + SendCreate(BROWSER, PpapiHostMsg_VpnProvider_Create()); +} VpnProviderResource::~VpnProviderResource() {} @@ -34,7 +36,15 @@ thunk::PPB_VpnProvider_API* VpnProviderResource::AsPPB_VpnProvider_API() { void VpnProviderResource::OnReplyReceived( const ResourceMessageReplyParams& params, const IPC::Message& msg) { - PluginResource::OnReplyReceived(params, msg); + PPAPI_BEGIN_MESSAGE_MAP(VpnProviderResource, msg) + PPAPI_DISPATCH_PLUGIN_RESOURCE_CALL(PpapiPluginMsg_VpnProvider_OnUnbind, + OnPluginMsgOnUnbindReceived) + PPAPI_DISPATCH_PLUGIN_RESOURCE_CALL( + PpapiPluginMsg_VpnProvider_OnPacketReceived, + OnPluginMsgOnPacketReceived) + PPAPI_DISPATCH_PLUGIN_RESOURCE_CALL_UNHANDLED( + PluginResource::OnReplyReceived(params, msg)) + PPAPI_END_MESSAGE_MAP() } int32_t VpnProviderResource::Bind( @@ -51,7 +61,14 @@ int32_t VpnProviderResource::Bind( if (!configuration_name_var) return PP_ERROR_BADARGUMENT; - return PP_ERROR_NOTSUPPORTED; + bind_callback_ = callback; + + Call<PpapiPluginMsg_VpnProvider_BindReply>( + BROWSER, PpapiHostMsg_VpnProvider_Bind(configuration_id_var->value(), + configuration_name_var->value()), + base::Bind(&VpnProviderResource::OnPluginMsgBindReply, this)); + + return PP_OK_COMPLETIONPENDING; } int32_t VpnProviderResource::SendPacket( @@ -86,11 +103,18 @@ int32_t VpnProviderResource::DoSendPacket(const PP_Var& packet, uint32_t id) { if (!packet_arraybuffer.get()) return PP_ERROR_BADARGUMENT; - char* packet_pointer = static_cast<char*>(packet_arraybuffer->Map()); uint32_t packet_size = packet_arraybuffer->ByteLength(); + if (packet_size > send_packet_buffer_->max_packet_size()) + return PP_ERROR_MESSAGE_TOO_BIG; + + char* packet_pointer = static_cast<char*>(packet_arraybuffer->Map()); memcpy(send_packet_buffer_->GetBuffer(id), packet_pointer, packet_size); packet_arraybuffer->Unmap(); + Call<PpapiPluginMsg_VpnProvider_SendPacketReply>( + BROWSER, PpapiHostMsg_VpnProvider_SendPacket(packet_size, id), + base::Bind(&VpnProviderResource::OnPluginMsgSendPacketReply, this)); + return PP_OK; } @@ -126,23 +150,32 @@ void VpnProviderResource::OnPluginMsgOnUnbindReceived( PpapiGlobals::Get()->GetVarTracker()->ReleaseVar(send_packets_.front()); send_packets_.pop(); } + + send_packet_buffer_.reset(); + recv_packet_buffer_.reset(); } void VpnProviderResource::OnPluginMsgOnPacketReceived( const ResourceMessageReplyParams& params, uint32_t packet_size, uint32_t id) { + DCHECK_LE(packet_size, recv_packet_buffer_->max_packet_size()); if (!bound_) { + // Ignore packet and mark shared memory as available + Post(BROWSER, PpapiHostMsg_VpnProvider_OnPacketReceivedReply(id)); return; } // Append received packet to queue. - void* packet_pointer = receive_packet_buffer_->GetBuffer(id); + void* packet_pointer = recv_packet_buffer_->GetBuffer(id); scoped_refptr<Var> packet_var( PpapiGlobals::Get()->GetVarTracker()->MakeArrayBufferVar(packet_size, packet_pointer)); received_packets_.push(packet_var); + // Mark shared memory as available for next packet + Post(BROWSER, PpapiHostMsg_VpnProvider_OnPacketReceivedReply(id)); + if (!TrackedCallback::IsPending(receive_packet_callback_) || TrackedCallback::IsScheduledToRun(receive_packet_callback_)) { return; @@ -174,11 +207,10 @@ void VpnProviderResource::OnPluginMsgBindReply( NOTREACHED(); return; } - send_packet_buffer_ = base::WrapUnique(new ppapi::VpnProviderSharedBuffer( - queue_size, max_packet_size, std::move(send_shm))); - receive_packet_buffer_ = - base::WrapUnique(new ppapi::VpnProviderSharedBuffer( - queue_size, max_packet_size, std::move(receive_shm))); + send_packet_buffer_ = base::MakeUnique<ppapi::VpnProviderSharedBuffer>( + queue_size, max_packet_size, std::move(send_shm)); + recv_packet_buffer_ = base::MakeUnique<ppapi::VpnProviderSharedBuffer>( + queue_size, max_packet_size, std::move(receive_shm)); bound_ = (result == PP_OK); } @@ -190,7 +222,7 @@ void VpnProviderResource::OnPluginMsgBindReply( void VpnProviderResource::OnPluginMsgSendPacketReply( const ResourceMessageReplyParams& params, - int32_t id) { + uint32_t id) { if (!send_packets_.empty() && bound_) { // Process remaining packets DoSendPacket(send_packets_.front(), id); diff --git a/chromium/ppapi/proxy/vpn_provider_resource.h b/chromium/ppapi/proxy/vpn_provider_resource.h index ac43b62d36b..fd017a37321 100644 --- a/chromium/ppapi/proxy/vpn_provider_resource.h +++ b/chromium/ppapi/proxy/vpn_provider_resource.h @@ -49,7 +49,7 @@ class PPAPI_PROXY_EXPORT VpnProviderResource uint32_t max_packet_size, int32_t result); void OnPluginMsgSendPacketReply(const ResourceMessageReplyParams& params, - int32_t result); + uint32_t id); // Browser callbacks void OnPluginMsgOnUnbindReceived(const ResourceMessageReplyParams& params); @@ -76,7 +76,7 @@ class PPAPI_PROXY_EXPORT VpnProviderResource PP_Var* receive_packet_callback_var_; std::unique_ptr<ppapi::VpnProviderSharedBuffer> send_packet_buffer_; - std::unique_ptr<ppapi::VpnProviderSharedBuffer> receive_packet_buffer_; + std::unique_ptr<ppapi::VpnProviderSharedBuffer> recv_packet_buffer_; std::queue<PP_Var> send_packets_; std::queue<scoped_refptr<Var>> received_packets_; diff --git a/chromium/ppapi/shared_impl/BUILD.gn b/chromium/ppapi/shared_impl/BUILD.gn index 8fc2795ed0f..e049133f099 100644 --- a/chromium/ppapi/shared_impl/BUILD.gn +++ b/chromium/ppapi/shared_impl/BUILD.gn @@ -199,7 +199,7 @@ component("shared_impl") { } } -source_set("test_support") { +static_library("test_support") { testonly = true sources = [ diff --git a/chromium/ppapi/shared_impl/DEPS b/chromium/ppapi/shared_impl/DEPS index 3947af1232e..7f786933dba 100644 --- a/chromium/ppapi/shared_impl/DEPS +++ b/chromium/ppapi/shared_impl/DEPS @@ -4,6 +4,7 @@ include_rules = [ "+media/audio", "+media/base", "+skia", + "+ui/gfx/geometry", "-ppapi/cpp", "-ppapi/proxy", diff --git a/chromium/ppapi/shared_impl/file_ref_util.cc b/chromium/ppapi/shared_impl/file_ref_util.cc index d111f6944b5..a517b3fb2c2 100644 --- a/chromium/ppapi/shared_impl/file_ref_util.cc +++ b/chromium/ppapi/shared_impl/file_ref_util.cc @@ -52,7 +52,7 @@ bool IsValidExternalPath(const base::FilePath& path) { } void NormalizeInternalPath(std::string* path) { - if (path->size() > 1 && path->at(path->size() - 1) == '/') + if (path->size() > 1 && path->back() == '/') path->erase(path->size() - 1, 1); } diff --git a/chromium/ppapi/shared_impl/ppb_gamepad_shared.h b/chromium/ppapi/shared_impl/ppb_gamepad_shared.h index 4628399156c..3a3d6802c09 100644 --- a/chromium/ppapi/shared_impl/ppb_gamepad_shared.h +++ b/chromium/ppapi/shared_impl/ppb_gamepad_shared.h @@ -21,9 +21,40 @@ namespace ppapi { struct WebKitGamepadButton { bool pressed; + bool touched; double value; }; +struct WebKitGamepadVector { + bool notNull; + float x, y, z; +}; + +struct WebKitGamepadQuaternion { + bool notNull; + float x, y, z, w; +}; + +struct WebKitGamepadPose { + bool notNull; + + bool hasOrientation; + bool hasPosition; + + WebKitGamepadQuaternion orientation; + WebKitGamepadVector position; + WebKitGamepadVector angularVelocity; + WebKitGamepadVector linearVelocity; + WebKitGamepadVector angularAcceleration; + WebKitGamepadVector linearAcceleration; +}; + +enum WebKitGamepadHand { + WEBKIT_GAMEPAD_HAND_NONE = 0, + WEBKIT_GAMEPAD_HAND_LEFT = 1, + WEBKIT_GAMEPAD_HAND_RIGHT = 2 +}; + // This must match the definition of blink::Gamepad. The GamepadHost unit test // has some compile asserts to validate this. struct WebKitGamepad { @@ -56,6 +87,13 @@ struct WebKitGamepad { // Mapping type (for example "standard") base::char16 mapping[kMappingLengthCap]; + + WebKitGamepadPose pose; + + WebKitGamepadHand hand; + + // ID of the VRDisplay this gamepad is associated with, if any. + unsigned display_id; }; // This must match the definition of blink::Gamepads. The GamepadHost unit diff --git a/chromium/ppapi/shared_impl/ppb_graphics_3d_shared.cc b/chromium/ppapi/shared_impl/ppb_graphics_3d_shared.cc index af53bfb55c0..4d3a4b0672d 100644 --- a/chromium/ppapi/shared_impl/ppb_graphics_3d_shared.cc +++ b/chromium/ppapi/shared_impl/ppb_graphics_3d_shared.cc @@ -17,8 +17,9 @@ namespace ppapi { PPB_Graphics3D_Shared::PPB_Graphics3D_Shared(PP_Instance instance) : Resource(OBJECT_IS_IMPL, instance) {} -PPB_Graphics3D_Shared::PPB_Graphics3D_Shared(const HostResource& host_resource) - : Resource(OBJECT_IS_PROXY, host_resource) {} +PPB_Graphics3D_Shared::PPB_Graphics3D_Shared(const HostResource& host_resource, + const gfx::Size& size) + : Resource(OBJECT_IS_PROXY, host_resource), size_(size) {} PPB_Graphics3D_Shared::~PPB_Graphics3D_Shared() { // Make sure that GLES2 implementation has already been destroyed. @@ -51,18 +52,20 @@ int32_t PPB_Graphics3D_Shared::ResizeBuffers(int32_t width, int32_t height) { return PP_ERROR_BADARGUMENT; gles2_impl()->ResizeCHROMIUM(width, height, 1.f, true); + size_ = gfx::Size(width, height); // TODO(alokp): Check if resize succeeded and return appropriate error code. return PP_OK; } int32_t PPB_Graphics3D_Shared::SwapBuffers( scoped_refptr<TrackedCallback> callback) { - return SwapBuffersWithSyncToken(callback, gpu::SyncToken()); + return SwapBuffersWithSyncToken(callback, gpu::SyncToken(), size_); } int32_t PPB_Graphics3D_Shared::SwapBuffersWithSyncToken( scoped_refptr<TrackedCallback> callback, - const gpu::SyncToken& sync_token) { + const gpu::SyncToken& sync_token, + const gfx::Size& size) { if (HasPendingSwap()) { Log(PP_LOGLEVEL_ERROR, "PPB_Graphics3D.SwapBuffers: Plugin attempted swap " @@ -72,7 +75,7 @@ int32_t PPB_Graphics3D_Shared::SwapBuffersWithSyncToken( } swap_callback_ = callback; - return DoSwapBuffers(sync_token); + return DoSwapBuffers(sync_token, size); } int32_t PPB_Graphics3D_Shared::GetAttribMaxValue(int32_t attribute, diff --git a/chromium/ppapi/shared_impl/ppb_graphics_3d_shared.h b/chromium/ppapi/shared_impl/ppb_graphics_3d_shared.h index 7e11f6cd526..84bad21d19e 100644 --- a/chromium/ppapi/shared_impl/ppb_graphics_3d_shared.h +++ b/chromium/ppapi/shared_impl/ppb_graphics_3d_shared.h @@ -15,6 +15,7 @@ #include "ppapi/shared_impl/resource.h" #include "ppapi/shared_impl/tracked_callback.h" #include "ppapi/thunk/ppb_graphics_3d_api.h" +#include "ui/gfx/geometry/size.h" namespace gpu { class CommandBuffer; @@ -43,7 +44,8 @@ class PPAPI_SHARED_EXPORT PPB_Graphics3D_Shared int32_t ResizeBuffers(int32_t width, int32_t height) override; int32_t SwapBuffers(scoped_refptr<TrackedCallback> callback) override; int32_t SwapBuffersWithSyncToken(scoped_refptr<TrackedCallback> callback, - const gpu::SyncToken& sync_token) override; + const gpu::SyncToken& sync_token, + const gfx::Size& size) override; int32_t GetAttribMaxValue(int32_t attribute, int32_t* value) override; void* MapTexSubImage2DCHROMIUM(GLenum target, @@ -65,12 +67,14 @@ class PPAPI_SHARED_EXPORT PPB_Graphics3D_Shared protected: PPB_Graphics3D_Shared(PP_Instance instance); - PPB_Graphics3D_Shared(const HostResource& host_resource); + PPB_Graphics3D_Shared(const HostResource& host_resource, + const gfx::Size& size); ~PPB_Graphics3D_Shared() override; virtual gpu::CommandBuffer* GetCommandBuffer() = 0; virtual gpu::GpuControl* GetGpuControl() = 0; - virtual int32_t DoSwapBuffers(const gpu::SyncToken& sync_token) = 0; + virtual int32_t DoSwapBuffers(const gpu::SyncToken& sync_token, + const gfx::Size& size) = 0; bool HasPendingSwap() const; bool CreateGLES2Impl(int32_t command_buffer_size, @@ -83,6 +87,10 @@ class PPAPI_SHARED_EXPORT PPB_Graphics3D_Shared std::unique_ptr<gpu::TransferBuffer> transfer_buffer_; std::unique_ptr<gpu::gles2::GLES2Implementation> gles2_impl_; + // A local cache of the size of the viewport. This is only valid in plugin + // resources. + gfx::Size size_; + // Callback that needs to be executed when swap-buffers is completed. scoped_refptr<TrackedCallback> swap_callback_; diff --git a/chromium/ppapi/shared_impl/test_utils.cc b/chromium/ppapi/shared_impl/test_utils.cc index 2ab8c5a27dc..18bc9e3af32 100644 --- a/chromium/ppapi/shared_impl/test_utils.cc +++ b/chromium/ppapi/shared_impl/test_utils.cc @@ -213,8 +213,11 @@ bool TestEqual(const PP_Var& expected, } std::string StripTestPrefixes(const std::string& test_name) { - if (test_name.find("DISABLED_") == 0) - return test_name.substr(strlen("DISABLED_")); + const char kDisabledPrefix[] = "DISABLED_"; + if (base::StartsWith(test_name, kDisabledPrefix, + base::CompareCase::SENSITIVE)) { + return test_name.substr(sizeof(kDisabledPrefix) - 1); + } return test_name; } diff --git a/chromium/ppapi/shared_impl/time_conversion.cc b/chromium/ppapi/shared_impl/time_conversion.cc index 651274a73cc..76946b2d129 100644 --- a/chromium/ppapi/shared_impl/time_conversion.cc +++ b/chromium/ppapi/shared_impl/time_conversion.cc @@ -32,9 +32,12 @@ double PPGetLocalTimeZoneOffset(const base::Time& time) { time.LocalExplode(&exploded); time.UTCExplode(&utc_exploded); if (exploded.HasValidValues() && utc_exploded.HasValidValues()) { - base::Time adj_time = base::Time::FromUTCExploded(exploded); - base::Time cur = base::Time::FromUTCExploded(utc_exploded); - return (adj_time - cur).InSecondsF(); + base::Time adj_time; + if (base::Time::FromUTCExploded(exploded, &adj_time)) { + base::Time cur; + if (base::Time::FromUTCExploded(utc_exploded, &cur)) + return (adj_time - cur).InSecondsF(); + } } return 0.0; } diff --git a/chromium/ppapi/shared_impl/vpn_provider_util.cc b/chromium/ppapi/shared_impl/vpn_provider_util.cc index 10da28aac4a..8241aa42ed7 100644 --- a/chromium/ppapi/shared_impl/vpn_provider_util.cc +++ b/chromium/ppapi/shared_impl/vpn_provider_util.cc @@ -11,7 +11,7 @@ VpnProviderSharedBuffer::VpnProviderSharedBuffer( uint32_t packet_size, std::unique_ptr<base::SharedMemory> shm) : capacity_(capacity), - packet_size_(packet_size), + max_packet_size_(packet_size), shm_(std::move(shm)), available_(capacity, true) { DCHECK(this->shm_); @@ -44,11 +44,11 @@ void* VpnProviderSharedBuffer::GetBuffer(uint32_t id) { NOTREACHED(); return nullptr; } - return reinterpret_cast<char*>(shm_->memory()) + packet_size_ * id; + return reinterpret_cast<char*>(shm_->memory()) + max_packet_size_ * id; } base::SharedMemoryHandle VpnProviderSharedBuffer::GetHandle() { return shm_->handle(); } -} // namespace ppapi
\ No newline at end of file +} // namespace ppapi diff --git a/chromium/ppapi/shared_impl/vpn_provider_util.h b/chromium/ppapi/shared_impl/vpn_provider_util.h index 889bfaa7afc..e5f9d3d8468 100644 --- a/chromium/ppapi/shared_impl/vpn_provider_util.h +++ b/chromium/ppapi/shared_impl/vpn_provider_util.h @@ -23,14 +23,17 @@ class PPAPI_SHARED_EXPORT VpnProviderSharedBuffer { void SetAvailable(uint32_t id, bool value); void* GetBuffer(uint32_t id); base::SharedMemoryHandle GetHandle(); + uint32_t max_packet_size() { return max_packet_size_; } private: uint32_t capacity_; - uint32_t packet_size_; + uint32_t max_packet_size_; std::unique_ptr<base::SharedMemory> shm_; std::vector<bool> available_; + + DISALLOW_COPY_AND_ASSIGN(VpnProviderSharedBuffer); }; } // namespace ppapi -#endif // PPAPI_SHAERD_IMPL_VPN_PROVIDER_UTIL_H_
\ No newline at end of file +#endif // PPAPI_SHAERD_IMPL_VPN_PROVIDER_UTIL_H_ diff --git a/chromium/ppapi/tests/extensions/BUILD.gn b/chromium/ppapi/tests/extensions/BUILD.gn index 3d700654149..b8363ab28bb 100644 --- a/chromium/ppapi/tests/extensions/BUILD.gn +++ b/chromium/ppapi/tests/extensions/BUILD.gn @@ -2,6 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import("//build/config/features.gni") import("//build/config/nacl/config.gni") import("//ppapi/native_client/nacl_test_data.gni") @@ -19,7 +20,8 @@ group("extensions") { ":ppapi_tests_extensions_popup($newlib)", ":ppapi_tests_extensions_socket_permissions($newlib)", ] - if ((target_cpu == "x86" || target_cpu == "x64") && is_linux) { + if ((target_cpu == "x86" || target_cpu == "x64") && is_linux && + enable_nacl_nonsfi) { nonsfi = "//build/toolchain/nacl:newlib_pnacl_nonsfi" data_deps += [ ":ppapi_tests_extensions_packaged_app($nonsfi)" ] } @@ -31,7 +33,7 @@ if (is_nacl && !is_nacl_nonsfi) { "background_keepalive/background.cc", ] deps = [ - "//ppapi:ppapi_cpp_lib", + "//ppapi/cpp", ] destination_dir = "test_data/ppapi/tests/extensions/background_keepalive" test_files = [ @@ -45,7 +47,7 @@ if (is_nacl && !is_nacl_nonsfi) { "load_unload/load_unload.cc", ] deps = [ - "//ppapi:ppapi_cpp_lib", + "//ppapi/cpp", ] destination_dir = "test_data/ppapi/tests/extensions/load_unload" test_files = [ @@ -62,7 +64,7 @@ if (is_nacl && !is_nacl_nonsfi) { "media_galleries/test_galleries.cc", ] deps = [ - "//ppapi:ppapi_cpp_lib", + "//ppapi/cpp", ] destination_dir = "test_data/ppapi/tests/extensions/media_galleries" test_files = [ @@ -78,7 +80,7 @@ if (is_nacl && !is_nacl_nonsfi) { "multicast_permissions/test_multicast_permissions.cc", ] deps = [ - "//ppapi:ppapi_cpp_lib", + "//ppapi/cpp", ] destination_dir = "test_data/ppapi/tests/extensions/multicast_permissions" test_files = [ @@ -94,7 +96,7 @@ if (is_nacl && !is_nacl_nonsfi) { "no_socket_permissions/test_no_socket_permissions.cc", ] deps = [ - "//ppapi:ppapi_cpp_lib", + "//ppapi/cpp", ] destination_dir = "test_data/ppapi/tests/extensions/no_socket_permissions" test_files = [ @@ -110,7 +112,7 @@ if (is_nacl && !is_nacl_nonsfi) { "popup/module.cc", ] deps = [ - "//ppapi:ppapi_cpp_lib", + "//ppapi/cpp", ] destination_dir = "test_data/ppapi/tests/extensions/popup" test_files = [ @@ -126,7 +128,7 @@ if (is_nacl && !is_nacl_nonsfi) { "socket_permissions/test_socket_permissions.cc", ] deps = [ - "//ppapi:ppapi_cpp_lib", + "//ppapi/cpp", ] destination_dir = "test_data/ppapi/tests/extensions/socket_permissions" test_files = [ @@ -144,7 +146,7 @@ if (is_nacl) { "packaged_app/test_packaged_app.cc", ] deps = [ - "//ppapi:ppapi_cpp_lib", + "//ppapi/cpp", ] destination_dir = "test_data/ppapi/tests/extensions/packaged_app" test_files = [ diff --git a/chromium/ppapi/tests/extensions/extensions.gyp b/chromium/ppapi/tests/extensions/extensions.gyp deleted file mode 100644 index aff088781fc..00000000000 --- a/chromium/ppapi/tests/extensions/extensions.gyp +++ /dev/null @@ -1,327 +0,0 @@ -# Copyright (c) 2013 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. - -{ - 'includes': [ - '../../../ppapi/ppapi_nacl_test_common.gypi', - ], - 'targets': [ - { - 'target_name': 'ppapi_tests_extensions_background_keepalive', - 'type': 'none', - 'variables': { - 'nexe_target': 'ppapi_tests_extensions_background_keepalive', - # Only newlib build is used in tests, no need to build others. - 'build_newlib': 1, - 'build_glibc': 0, - 'build_pnacl_newlib': 0, - 'nexe_destination_dir': 'test_data/ppapi/tests/extensions/background_keepalive', - 'sources': [ - 'background_keepalive/background.cc', - ], - 'test_files': [ - 'background_keepalive/background.js', - 'background_keepalive/manifest.json', - ], - }, - }, - { - 'target_name': 'ppapi_tests_extensions_load_unload', - 'type': 'none', - 'variables': { - 'nexe_target': 'ppapi_tests_extensions_load_unload', - # Only newlib build is used in tests, no need to build others. - 'build_newlib': 1, - 'build_glibc': 0, - 'build_pnacl_newlib': 0, - 'nexe_destination_dir': 'test_data/ppapi/tests/extensions/load_unload', - 'sources': [ - 'load_unload/load_unload.cc', - ], - 'test_files': [ - 'load_unload/background.js', - 'load_unload/ext_icon.png', - 'load_unload/manifest.json', - ], - }, - }, - { - 'target_name': 'ppapi_tests_extensions_media_galleries', - 'type': 'none', - 'variables': { - 'nexe_target': 'ppapi_tests_extensions_media_galleries', - # Only newlib build is used in tests, no need to build others. - 'build_newlib': 1, - 'build_glibc': 0, - 'build_pnacl_newlib': 0, - 'nexe_destination_dir': 'test_data/ppapi/tests/extensions/media_galleries', - 'sources': [ - '<(DEPTH)/ppapi/tests/test_utils.cc', - '<(DEPTH)/ppapi/tests/test_utils.h', - 'media_galleries/test_galleries.cc', - ], - 'test_files': [ - 'media_galleries/background.js', - 'media_galleries/index.html', - 'media_galleries/manifest.json', - 'media_galleries/test.js', - ], - }, - }, - { - 'target_name': 'ppapi_tests_extensions_multicast_permissions', - 'type': 'none', - 'variables': { - 'nexe_target': 'ppapi_tests_extensions_multicast_permissions', - # Only newlib build is used in tests, no need to build others. - 'build_newlib': 1, - 'build_glibc': 0, - 'build_pnacl_newlib': 0, - 'nexe_destination_dir': 'test_data/ppapi/tests/extensions/multicast_permissions', - 'sources': [ - 'multicast_permissions/test_multicast_permissions.cc', - ], - 'test_files': [ - 'multicast_permissions/controller.js', - 'multicast_permissions/index.html', - 'multicast_permissions/main.js', - 'multicast_permissions/manifest.json', - ], - }, - }, - { - 'target_name': 'ppapi_tests_extensions_no_socket_permissions', - 'type': 'none', - 'variables': { - 'nexe_target': 'ppapi_tests_extensions_no_socket_permissions', - # Only newlib build is used in tests, no need to build others. - 'build_newlib': 1, - 'build_glibc': 0, - 'build_pnacl_newlib': 0, - 'nexe_destination_dir': 'test_data/ppapi/tests/extensions/no_socket_permissions', - 'sources': [ - 'no_socket_permissions/test_no_socket_permissions.cc', - ], - 'test_files': [ - 'no_socket_permissions/controller.js', - 'no_socket_permissions/index.html', - 'no_socket_permissions/main.js', - 'no_socket_permissions/manifest.json', - ], - }, - }, - { - 'target_name': 'ppapi_tests_extensions_packaged_app', - 'type': 'none', - 'variables': { - 'nexe_target': 'ppapi_tests_extensions_packaged_app', - 'build_newlib': 1, - 'build_glibc': 0, - 'nexe_destination_dir': 'test_data/ppapi/tests/extensions/packaged_app', - 'sources': [ - 'packaged_app/test_packaged_app.cc' - ], - 'test_files': [ - 'packaged_app/controller.js', - 'packaged_app/index.html', - 'packaged_app/main.js', - 'packaged_app/manifest.json', - 'packaged_app/test_file.txt', - 'packaged_app/test_file2.txt', - ], - 'create_nmf_args_portable': [ - # Add 129 "files" entries to make sure that open_resource can handle - # more files than IPC::MessageAttachmentSet::kMaxDescriptorsPerMessage - # which is currently 128. - '-xtest_file0:test_file.txt', - '-xtest_file1:test_file2.txt', - '-xtest_file2:test_file.txt', - '-xtest_file3:test_file2.txt', - '-xtest_file4:test_file.txt', - '-xtest_file5:test_file2.txt', - '-xtest_file6:test_file.txt', - '-xtest_file7:test_file2.txt', - '-xtest_file8:test_file.txt', - '-xtest_file9:test_file2.txt', - '-xtest_file10:test_file.txt', - '-xtest_file11:test_file2.txt', - '-xtest_file12:test_file.txt', - '-xtest_file13:test_file2.txt', - '-xtest_file14:test_file.txt', - '-xtest_file15:test_file2.txt', - '-xtest_file16:test_file.txt', - '-xtest_file17:test_file2.txt', - '-xtest_file18:test_file.txt', - '-xtest_file19:test_file2.txt', - '-xtest_file20:test_file.txt', - '-xtest_file21:test_file2.txt', - '-xtest_file22:test_file.txt', - '-xtest_file23:test_file2.txt', - '-xtest_file24:test_file.txt', - '-xtest_file25:test_file2.txt', - '-xtest_file26:test_file.txt', - '-xtest_file27:test_file2.txt', - '-xtest_file28:test_file.txt', - '-xtest_file29:test_file2.txt', - '-xtest_file30:test_file.txt', - '-xtest_file31:test_file2.txt', - '-xtest_file32:test_file.txt', - '-xtest_file33:test_file2.txt', - '-xtest_file34:test_file.txt', - '-xtest_file35:test_file2.txt', - '-xtest_file36:test_file.txt', - '-xtest_file37:test_file2.txt', - '-xtest_file38:test_file.txt', - '-xtest_file39:test_file2.txt', - '-xtest_file40:test_file.txt', - '-xtest_file41:test_file2.txt', - '-xtest_file42:test_file.txt', - '-xtest_file43:test_file2.txt', - '-xtest_file44:test_file.txt', - '-xtest_file45:test_file2.txt', - '-xtest_file46:test_file.txt', - '-xtest_file47:test_file2.txt', - '-xtest_file48:test_file.txt', - '-xtest_file49:test_file2.txt', - '-xtest_file50:test_file.txt', - '-xtest_file51:test_file2.txt', - '-xtest_file52:test_file.txt', - '-xtest_file53:test_file2.txt', - '-xtest_file54:test_file.txt', - '-xtest_file55:test_file2.txt', - '-xtest_file56:test_file.txt', - '-xtest_file57:test_file2.txt', - '-xtest_file58:test_file.txt', - '-xtest_file59:test_file2.txt', - '-xtest_file60:test_file.txt', - '-xtest_file61:test_file2.txt', - '-xtest_file62:test_file.txt', - '-xtest_file63:test_file2.txt', - '-xtest_file64:test_file.txt', - '-xtest_file65:test_file2.txt', - '-xtest_file66:test_file.txt', - '-xtest_file67:test_file2.txt', - '-xtest_file68:test_file.txt', - '-xtest_file69:test_file2.txt', - '-xtest_file70:test_file.txt', - '-xtest_file71:test_file2.txt', - '-xtest_file72:test_file.txt', - '-xtest_file73:test_file2.txt', - '-xtest_file74:test_file.txt', - '-xtest_file75:test_file2.txt', - '-xtest_file76:test_file.txt', - '-xtest_file77:test_file2.txt', - '-xtest_file78:test_file.txt', - '-xtest_file79:test_file2.txt', - '-xtest_file80:test_file.txt', - '-xtest_file81:test_file2.txt', - '-xtest_file82:test_file.txt', - '-xtest_file83:test_file2.txt', - '-xtest_file84:test_file.txt', - '-xtest_file85:test_file2.txt', - '-xtest_file86:test_file.txt', - '-xtest_file87:test_file2.txt', - '-xtest_file88:test_file.txt', - '-xtest_file89:test_file2.txt', - '-xtest_file90:test_file.txt', - '-xtest_file91:test_file2.txt', - '-xtest_file92:test_file.txt', - '-xtest_file93:test_file2.txt', - '-xtest_file94:test_file.txt', - '-xtest_file95:test_file2.txt', - '-xtest_file96:test_file.txt', - '-xtest_file97:test_file2.txt', - '-xtest_file98:test_file.txt', - '-xtest_file99:test_file2.txt', - '-xtest_file100:test_file.txt', - '-xtest_file101:test_file2.txt', - '-xtest_file102:test_file.txt', - '-xtest_file103:test_file2.txt', - '-xtest_file104:test_file.txt', - '-xtest_file105:test_file2.txt', - '-xtest_file106:test_file.txt', - '-xtest_file107:test_file2.txt', - '-xtest_file108:test_file.txt', - '-xtest_file109:test_file2.txt', - '-xtest_file110:test_file.txt', - '-xtest_file111:test_file2.txt', - '-xtest_file112:test_file.txt', - '-xtest_file113:test_file2.txt', - '-xtest_file114:test_file.txt', - '-xtest_file115:test_file2.txt', - '-xtest_file116:test_file.txt', - '-xtest_file117:test_file2.txt', - '-xtest_file118:test_file.txt', - '-xtest_file119:test_file2.txt', - '-xtest_file120:test_file.txt', - '-xtest_file121:test_file2.txt', - '-xtest_file122:test_file.txt', - '-xtest_file123:test_file2.txt', - '-xtest_file124:test_file.txt', - '-xtest_file125:test_file2.txt', - '-xtest_file126:test_file.txt', - '-xtest_file127:test_file2.txt', - '-xtest_file128:test_file.txt', - ], - }, - 'conditions': [ - ['(target_arch=="ia32" or target_arch=="x64") and OS=="linux"', { - # Enable nonsfi testing only on ia32-linux environment. - # See chrome/test/data/nacl/nacl_test_data.gyp for more info. - 'variables': { - 'build_pnacl_newlib': 1, - 'translate_pexe_with_build': 1, - 'enable_x86_32_nonsfi': 1, - }, - }], - ], - # Shim is a dependency for the nexe because we pre-translate. - 'dependencies': [ - '<(DEPTH)/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_irt_shim.gyp:aot', - ], - }, - { - 'target_name': 'ppapi_tests_extensions_popup', - 'type': 'none', - 'variables': { - 'nexe_target': 'ppapi_tests_extensions_popup', - # Only newlib build is used in tests, no need to build others. - 'build_newlib': 1, - 'build_glibc': 0, - 'build_pnacl_newlib': 0, - 'nexe_destination_dir': 'test_data/ppapi/tests/extensions/popup', - 'sources': [ - 'popup/module.cc', - ], - 'test_files': [ - 'popup/background.js', - 'popup/popup.html', - 'popup/popup.js', - 'popup/manifest.json', - ], - }, - }, - { - 'target_name': 'ppapi_tests_extensions_socket_permissions', - 'type': 'none', - 'variables': { - 'nexe_target': 'ppapi_tests_extensions_socket_permissions', - # Only newlib build is used in tests, no need to build others. - 'build_newlib': 1, - 'build_glibc': 0, - 'build_pnacl_newlib': 0, - 'nexe_destination_dir': 'test_data/ppapi/tests/extensions/socket_permissions', - 'sources': [ - 'socket_permissions/test_socket_permissions.cc', - ], - 'test_files': [ - 'socket_permissions/controller.js', - 'socket_permissions/index.html', - 'socket_permissions/main.js', - 'socket_permissions/manifest.json', - ], - }, - }, - ], -} diff --git a/chromium/ppapi/thunk/ppb_graphics_3d_api.h b/chromium/ppapi/thunk/ppb_graphics_3d_api.h index 845b35f5f4f..8d590ec9e64 100644 --- a/chromium/ppapi/thunk/ppb_graphics_3d_api.h +++ b/chromium/ppapi/thunk/ppb_graphics_3d_api.h @@ -13,6 +13,10 @@ #include "ppapi/c/ppb_graphics_3d.h" #include "ppapi/thunk/ppapi_thunk_export.h" +namespace gfx { +class Size; +} + namespace gpu { struct SyncToken; } @@ -35,7 +39,8 @@ class PPAPI_THUNK_EXPORT PPB_Graphics3D_API { virtual int32_t SwapBuffers(scoped_refptr<TrackedCallback> callback) = 0; virtual int32_t SwapBuffersWithSyncToken( scoped_refptr<TrackedCallback> callback, - const gpu::SyncToken& sync_token) = 0; + const gpu::SyncToken& sync_token, + const gfx::Size& size) = 0; virtual int32_t GetAttribMaxValue(int32_t attribute, int32_t* value) = 0; // Graphics3DTrusted API. diff --git a/chromium/ppapi/thunk/ppb_pdf_api.h b/chromium/ppapi/thunk/ppb_pdf_api.h index 4f24d52327b..f917f0e9a83 100644 --- a/chromium/ppapi/thunk/ppb_pdf_api.h +++ b/chromium/ppapi/thunk/ppb_pdf_api.h @@ -40,6 +40,8 @@ class PPB_PDF_API { PP_PrivateAccessibilityPageInfo* page_info, PP_PrivateAccessibilityTextRunInfo text_runs[], PP_PrivateAccessibilityCharInfo chars[]) = 0; + virtual void SetCrashData(const char* pdf_url, const char* top_level_url) = 0; + static const SingletonResourceID kSingletonResourceID = PDF_SINGLETON_ID; }; diff --git a/chromium/ppapi/thunk/ppb_pdf_thunk.cc b/chromium/ppapi/thunk/ppb_pdf_thunk.cc index fbf154a5dc5..d291b0211ac 100644 --- a/chromium/ppapi/thunk/ppb_pdf_thunk.cc +++ b/chromium/ppapi/thunk/ppb_pdf_thunk.cc @@ -160,24 +160,34 @@ void SetAccessibilityPageInfo( enter.functions()->SetAccessibilityPageInfo(page_info, text_runs, chars); } +void SetCrashData(PP_Instance instance, + const char* pdf_url, + const char* top_level_url) { + EnterInstanceAPI<PPB_PDF_API> enter(instance); + if (enter.failed()) + return; + enter.functions()->SetCrashData(pdf_url, top_level_url); +} + const PPB_PDF g_ppb_pdf_thunk = { - &GetFontFileWithFallback, - &GetFontTableForPrivateFontFile, - &SearchString, - &DidStartLoading, - &DidStopLoading, - &SetContentRestriction, - &UserMetricsRecordAction, - &HasUnsupportedFeature, - &SaveAs, - &Print, - &IsFeatureEnabled, - &SetSelectedText, - &SetLinkUnderCursor, - &GetV8ExternalSnapshotData, - &SetAccessibilityViewportInfo, - &SetAccessibilityDocInfo, - &SetAccessibilityPageInfo + &GetFontFileWithFallback, + &GetFontTableForPrivateFontFile, + &SearchString, + &DidStartLoading, + &DidStopLoading, + &SetContentRestriction, + &UserMetricsRecordAction, + &HasUnsupportedFeature, + &SaveAs, + &Print, + &IsFeatureEnabled, + &SetSelectedText, + &SetLinkUnderCursor, + &GetV8ExternalSnapshotData, + &SetAccessibilityViewportInfo, + &SetAccessibilityDocInfo, + &SetAccessibilityPageInfo, + &SetCrashData, }; } // namespace diff --git a/chromium/ppapi/thunk/resource_creation_api.h b/chromium/ppapi/thunk/resource_creation_api.h index 5636b5f4315..ae6dae6dd2a 100644 --- a/chromium/ppapi/thunk/resource_creation_api.h +++ b/chromium/ppapi/thunk/resource_creation_api.h @@ -36,6 +36,9 @@ struct PP_NetAddress_Private; struct PP_Size; namespace gpu { +namespace gles2 { +struct ContextCreationAttribHelper; +} struct Capabilities; } @@ -142,7 +145,7 @@ class ResourceCreationAPI { virtual PP_Resource CreateGraphics3DRaw( PP_Instance instance, PP_Resource share_context, - const int32_t* attrib_list, + const gpu::gles2::ContextCreationAttribHelper& attrib_helper, gpu::Capabilities* capabilities, base::SharedMemoryHandle* shared_state, gpu::CommandBufferId* command_buffer_id) = 0; diff --git a/chromium/ppapi/tools/ppapi_tools.gyp b/chromium/ppapi/tools/ppapi_tools.gyp deleted file mode 100644 index 67986ff19a2..00000000000 --- a/chromium/ppapi/tools/ppapi_tools.gyp +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (c) 2014 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. - -{ - 'targets': [ - { - 'target_name': 'pepper_hash_for_uma', - 'type': 'executable', - 'dependencies': [ - '../../base/base.gyp:base' - ], - 'sources': [ - 'pepper_hash_for_uma.cc', - ], - } - ] -} diff --git a/chromium/ppapi/utility/graphics/paint_aggregator.cc b/chromium/ppapi/utility/graphics/paint_aggregator.cc index c95b3aec9c1..847ce97be04 100644 --- a/chromium/ppapi/utility/graphics/paint_aggregator.cc +++ b/chromium/ppapi/utility/graphics/paint_aggregator.cc @@ -140,10 +140,9 @@ void PaintAggregator::InvalidateRect(const Rect& rect) { if (ShouldInvalidateScrollRect(rect)) { InvalidateScrollRect(); } else if (update_.scroll_rect.Contains(rect)) { - update_.paint_rects[update_.paint_rects.size() - 1] = - rect.Subtract(update_.GetScrollDamage()); - if (update_.paint_rects[update_.paint_rects.size() - 1].IsEmpty()) - update_.paint_rects.erase(update_.paint_rects.end() - 1); + update_.paint_rects.back() = rect.Subtract(update_.GetScrollDamage()); + if (update_.paint_rects.back().IsEmpty()) + update_.paint_rects.pop_back(); } } @@ -235,10 +234,8 @@ bool PaintAggregator::ShouldInvalidateScrollRect(const Rect& rect) const { paint_area += existing_rect.size().GetArea(); } int scroll_area = update_.scroll_rect.size().GetArea(); - if (float(paint_area) / float(scroll_area) > max_redundant_paint_to_scroll_area_) - return true; - - return false; + return static_cast<float>(paint_area) / static_cast<float>(scroll_area) > + max_redundant_paint_to_scroll_area_; } void PaintAggregator::InvalidateScrollRect() { |