diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-09-18 14:34:04 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-10-04 11:15:27 +0000 |
commit | e6430e577f105ad8813c92e75c54660c4985026e (patch) | |
tree | 88115e5d1fb471fea807111924dcccbeadbf9e4f /chromium/ppapi | |
parent | 53d399fe6415a96ea6986ec0d402a9c07da72453 (diff) | |
download | qtwebengine-chromium-e6430e577f105ad8813c92e75c54660c4985026e.tar.gz |
BASELINE: Update Chromium to 61.0.3163.99
Change-Id: I8452f34574d88ca2b27af9bd56fc9ff3f16b1367
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'chromium/ppapi')
36 files changed, 502 insertions, 135 deletions
diff --git a/chromium/ppapi/api/pp_graphics_3d.idl b/chromium/ppapi/api/pp_graphics_3d.idl index 86dc6ae5d69..43b854d863c 100644 --- a/chromium/ppapi/api/pp_graphics_3d.idl +++ b/chromium/ppapi/api/pp_graphics_3d.idl @@ -79,5 +79,10 @@ /** * The context may be high-power and may be created on a discrete gpu. */ - PP_GRAPHICS3DATTRIB_GPU_PREFERENCE_PERFORMANCE = 0x11002 + PP_GRAPHICS3DATTRIB_GPU_PREFERENCE_PERFORMANCE = 0x11002, + /** + * Whether or not offscreen color buffers exist in front/back pairs that + * can be swapped. + */ + PP_GRAPHICS3DATTRIB_SINGLE_BUFFER = 0x3085 }; diff --git a/chromium/ppapi/api/ppb_input_event.idl b/chromium/ppapi/api/ppb_input_event.idl index 25d2afb4f1c..43dd1345a6e 100644 --- a/chromium/ppapi/api/ppb_input_event.idl +++ b/chromium/ppapi/api/ppb_input_event.idl @@ -11,7 +11,8 @@ label Chrome { M13 = 1.0, M14 = 1.1, M34 = 1.2, - M55 = 1.3 + M55 = 1.3, + M60 = 1.4 }; /** @@ -962,6 +963,42 @@ interface PPB_TouchInputEvent { PP_TouchPoint GetTouchById([in] PP_Resource resource, [in] PP_TouchListType list, [in] uint32_t touch_id); + + /** + * Returns the touch-tilt with the specified index in the specified list. + * + * @param[in] resource A <code>PP_Resource</code> corresponding to a touch + * event. + * + * @param[in] list The list. + * + * @param[in] index The index. + * + * @return A <code>PP_FloatPoint</code> representing the tilt of the + * touch-point. + */ + [version=1.4] + PP_FloatPoint GetTouchTiltByIndex([in] PP_Resource resource, + [in] PP_TouchListType list, + [in] uint32_t index); + + /** + * Returns the touch-tilt with the specified touch-id in the specified list. + * + * @param[in] resource A <code>PP_Resource</code> corresponding to a touch + * event. + * + * @param[in] list The list. + * + * @param[in] touch_id The id of the touch-point. + * + * @return A <code>PP_FloatPoint</code> representing the tilt of the + * touch-point. + */ + [version=1.4] + PP_FloatPoint GetTouchTiltById([in] PP_Resource resource, + [in] PP_TouchListType list, + [in] uint32_t touch_id); }; [macro="PPB_IME_INPUT_EVENT_INTERFACE"] diff --git a/chromium/ppapi/api/private/ppb_platform_verification_private.idl b/chromium/ppapi/api/private/ppb_platform_verification_private.idl index 87df6af7e22..afd41bdf15e 100644 --- a/chromium/ppapi/api/private/ppb_platform_verification_private.idl +++ b/chromium/ppapi/api/private/ppb_platform_verification_private.idl @@ -11,7 +11,7 @@ [generate_thunk] label Chrome { - M32 = 0.2 + M61 = 0.3 }; /** @@ -82,4 +82,21 @@ interface PPB_PlatformVerification_Private { [out] PP_Var signed_data_signature, [out] PP_Var platform_key_certificate, [in] PP_CompletionCallback callback); + + /** + * Requests the device's storage ID. + * + * @param[out] storage_id A <code>PP_Var</code> of type + * <code>PP_VARTYPE_STRING</code> that contains the storage ID. + * + * @param[in] callback A <code>PP_CompletionCallback</code> to be called after + * the storage ID has been obtained. This callback will only run if + * the return code is <code>PP_OK_COMPLETIONPENDING</code>. + * + * @return An int32_t containing an error code from <code>pp_errors.h</code>. + */ + int32_t GetStorageId( + [in] PP_Resource instance, + [out] PP_Var storage_id, + [in] PP_CompletionCallback callback); }; diff --git a/chromium/ppapi/c/pp_graphics_3d.h b/chromium/ppapi/c/pp_graphics_3d.h index 77b20aae230..dfe76ac53d8 100644 --- a/chromium/ppapi/c/pp_graphics_3d.h +++ b/chromium/ppapi/c/pp_graphics_3d.h @@ -3,7 +3,7 @@ * found in the LICENSE file. */ -/* From pp_graphics_3d.idl modified Wed Oct 3 15:55:01 2012. */ +/* From pp_graphics_3d.idl modified Fri Jun 9 15:44:15 2017. */ #ifndef PPAPI_C_PP_GRAPHICS_3D_H_ #define PPAPI_C_PP_GRAPHICS_3D_H_ @@ -92,7 +92,12 @@ typedef enum { /** * The context may be high-power and may be created on a discrete gpu. */ - PP_GRAPHICS3DATTRIB_GPU_PREFERENCE_PERFORMANCE = 0x11002 + PP_GRAPHICS3DATTRIB_GPU_PREFERENCE_PERFORMANCE = 0x11002, + /** + * Whether or not offscreen color buffers exist in front/back pairs that + * can be swapped. + */ + PP_GRAPHICS3DATTRIB_SINGLE_BUFFER = 0x3085 } PP_Graphics3DAttrib; PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_Graphics3DAttrib, 4); /** diff --git a/chromium/ppapi/c/pp_macros.h b/chromium/ppapi/c/pp_macros.h index 291d2d6c484..0381e170774 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 Sat Dec 6 22:11:47 2014. */ +/* From pp_macros.idl modified Fri Oct 9 11:08:46 2015. */ #ifndef PPAPI_C_PP_MACROS_H_ #define PPAPI_C_PP_MACROS_H_ -#define PPAPI_RELEASE 59 +#define PPAPI_RELEASE 61 /** * @file diff --git a/chromium/ppapi/c/ppb_input_event.h b/chromium/ppapi/c/ppb_input_event.h index 75e66e423b8..bcf23c517ef 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 Wed Apr 26 13:40:13 2017. */ +/* From ppb_input_event.idl modified Wed May 24 10:14:53 2017. */ #ifndef PPAPI_C_PPB_INPUT_EVENT_H_ #define PPAPI_C_PPB_INPUT_EVENT_H_ @@ -34,7 +34,8 @@ PPB_KEYBOARD_INPUT_EVENT_INTERFACE_1_2 #define PPB_TOUCH_INPUT_EVENT_INTERFACE_1_0 "PPB_TouchInputEvent;1.0" -#define PPB_TOUCH_INPUT_EVENT_INTERFACE PPB_TOUCH_INPUT_EVENT_INTERFACE_1_0 +#define PPB_TOUCH_INPUT_EVENT_INTERFACE_1_4 "PPB_TouchInputEvent;1.4" +#define PPB_TOUCH_INPUT_EVENT_INTERFACE PPB_TOUCH_INPUT_EVENT_INTERFACE_1_4 #define PPB_IME_INPUT_EVENT_INTERFACE_1_0 "PPB_IMEInputEvent;1.0" #define PPB_IME_INPUT_EVENT_INTERFACE PPB_IME_INPUT_EVENT_INTERFACE_1_0 @@ -828,7 +829,7 @@ PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_TouchListType, 4); * The <code>PPB_TouchInputEvent</code> interface contains pointers to several * functions related to touch events. */ -struct PPB_TouchInputEvent_1_0 { +struct PPB_TouchInputEvent_1_4 { /** * Creates a touch input event with the given parameters. Normally you * will get a touch event passed through the HandleInputEvent and will not @@ -918,9 +919,59 @@ struct PPB_TouchInputEvent_1_0 { struct PP_TouchPoint (*GetTouchById)(PP_Resource resource, PP_TouchListType list, uint32_t touch_id); + /** + * Returns the touch-tilt with the specified index in the specified list. + * + * @param[in] resource A <code>PP_Resource</code> corresponding to a touch + * event. + * + * @param[in] list The list. + * + * @param[in] index The index. + * + * @return A <code>PP_FloatPoint</code> representing the tilt of the + * touch-point. + */ + struct PP_FloatPoint (*GetTouchTiltByIndex)(PP_Resource resource, + PP_TouchListType list, + uint32_t index); + /** + * Returns the touch-tilt with the specified touch-id in the specified list. + * + * @param[in] resource A <code>PP_Resource</code> corresponding to a touch + * event. + * + * @param[in] list The list. + * + * @param[in] touch_id The id of the touch-point. + * + * @return A <code>PP_FloatPoint</code> representing the tilt of the + * touch-point. + */ + struct PP_FloatPoint (*GetTouchTiltById)(PP_Resource resource, + PP_TouchListType list, + uint32_t touch_id); }; -typedef struct PPB_TouchInputEvent_1_0 PPB_TouchInputEvent; +typedef struct PPB_TouchInputEvent_1_4 PPB_TouchInputEvent; + +struct PPB_TouchInputEvent_1_0 { + PP_Resource (*Create)(PP_Instance instance, + PP_InputEvent_Type type, + PP_TimeTicks time_stamp, + uint32_t modifiers); + void (*AddTouchPoint)(PP_Resource touch_event, + PP_TouchListType list, + const struct PP_TouchPoint* point); + PP_Bool (*IsTouchInputEvent)(PP_Resource resource); + uint32_t (*GetTouchCount)(PP_Resource resource, PP_TouchListType list); + struct PP_TouchPoint (*GetTouchByIndex)(PP_Resource resource, + PP_TouchListType list, + uint32_t index); + struct PP_TouchPoint (*GetTouchById)(PP_Resource resource, + PP_TouchListType list, + uint32_t touch_id); +}; struct PPB_IMEInputEvent_1_0 { /** diff --git a/chromium/ppapi/c/private/ppb_platform_verification_private.h b/chromium/ppapi/c/private/ppb_platform_verification_private.h index 17ff1e82927..83f6860fe6c 100644 --- a/chromium/ppapi/c/private/ppb_platform_verification_private.h +++ b/chromium/ppapi/c/private/ppb_platform_verification_private.h @@ -4,7 +4,7 @@ */ /* From private/ppb_platform_verification_private.idl, - * modified Fri Oct 18 15:02:09 2013. + * modified Tue Jun 13 15:47:24 2017. */ #ifndef PPAPI_C_PRIVATE_PPB_PLATFORM_VERIFICATION_PRIVATE_H_ @@ -18,10 +18,10 @@ #include "ppapi/c/pp_stdint.h" #include "ppapi/c/pp_var.h" -#define PPB_PLATFORMVERIFICATION_PRIVATE_INTERFACE_0_2 \ - "PPB_PlatformVerification_Private;0.2" +#define PPB_PLATFORMVERIFICATION_PRIVATE_INTERFACE_0_3 \ + "PPB_PlatformVerification_Private;0.3" #define PPB_PLATFORMVERIFICATION_PRIVATE_INTERFACE \ - PPB_PLATFORMVERIFICATION_PRIVATE_INTERFACE_0_2 + PPB_PLATFORMVERIFICATION_PRIVATE_INTERFACE_0_3 /** * @file @@ -39,7 +39,7 @@ * services to verify that the underlying platform is trusted. An example of a * trusted platform is a Chrome OS device in verified boot mode. */ -struct PPB_PlatformVerification_Private_0_2 { +struct PPB_PlatformVerification_Private_0_3 { /** * Create() creates a <code>PPB_PlatformVerification_Private</code> object. * @@ -98,9 +98,24 @@ struct PPB_PlatformVerification_Private_0_2 { struct PP_Var* signed_data_signature, struct PP_Var* platform_key_certificate, struct PP_CompletionCallback callback); + /** + * Requests the device's storage ID. + * + * @param[out] storage_id A <code>PP_Var</code> of type + * <code>PP_VARTYPE_STRING</code> that contains the storage ID. + * + * @param[in] callback A <code>PP_CompletionCallback</code> to be called after + * the storage ID has been obtained. This callback will only run if + * the return code is <code>PP_OK_COMPLETIONPENDING</code>. + * + * @return An int32_t containing an error code from <code>pp_errors.h</code>. + */ + int32_t (*GetStorageId)(PP_Resource instance, + struct PP_Var* storage_id, + struct PP_CompletionCallback callback); }; -typedef struct PPB_PlatformVerification_Private_0_2 +typedef struct PPB_PlatformVerification_Private_0_3 PPB_PlatformVerification_Private; /** * @} diff --git a/chromium/ppapi/cpp/input_event.cc b/chromium/ppapi/cpp/input_event.cc index 90f41fa2b8f..2bd3ec71c6b 100644 --- a/chromium/ppapi/cpp/input_event.cc +++ b/chromium/ppapi/cpp/input_event.cc @@ -39,6 +39,11 @@ template <> const char* interface_name<PPB_TouchInputEvent_1_0>() { return PPB_TOUCH_INPUT_EVENT_INTERFACE_1_0; } +template <> +const char* interface_name<PPB_TouchInputEvent_1_4>() { + return PPB_TOUCH_INPUT_EVENT_INTERFACE_1_4; +} + template <> const char* interface_name<PPB_IMEInputEvent_1_0>() { return PPB_IME_INPUT_EVENT_INTERFACE_1_0; } @@ -324,14 +329,32 @@ TouchPoint TouchInputEvent::GetTouchById(PP_TouchListType list, uint32_t id) const { if (!has_interface<PPB_TouchInputEvent_1_0>()) return TouchPoint(); - return TouchPoint(get_interface<PPB_TouchInputEvent_1_0>()-> - GetTouchById(pp_resource(), list, id)); + + if (has_interface<PPB_TouchInputEvent_1_4>()) { + return TouchPoint( + get_interface<PPB_TouchInputEvent_1_4>()->GetTouchById(pp_resource(), + list, id), + get_interface<PPB_TouchInputEvent_1_4>()->GetTouchTiltById( + pp_resource(), list, id)); + } + + return TouchPoint(get_interface<PPB_TouchInputEvent_1_0>()->GetTouchById( + pp_resource(), list, id)); } TouchPoint TouchInputEvent::GetTouchByIndex(PP_TouchListType list, uint32_t index) const { if (!has_interface<PPB_TouchInputEvent_1_0>()) return TouchPoint(); + + if (has_interface<PPB_TouchInputEvent_1_4>()) { + return TouchPoint( + get_interface<PPB_TouchInputEvent_1_4>()->GetTouchByIndex(pp_resource(), + list, index), + get_interface<PPB_TouchInputEvent_1_4>()->GetTouchTiltByIndex( + pp_resource(), list, index)); + } + return TouchPoint(get_interface<PPB_TouchInputEvent_1_0>()-> GetTouchByIndex(pp_resource(), list, index)); } diff --git a/chromium/ppapi/cpp/private/platform_verification.cc b/chromium/ppapi/cpp/private/platform_verification.cc index e199a7199d1..e3c29563a3f 100644 --- a/chromium/ppapi/cpp/private/platform_verification.cc +++ b/chromium/ppapi/cpp/private/platform_verification.cc @@ -15,16 +15,17 @@ namespace pp { namespace { -template <> const char* interface_name<PPB_PlatformVerification_Private_0_2>() { - return PPB_PLATFORMVERIFICATION_PRIVATE_INTERFACE_0_2; +template <> +const char* interface_name<PPB_PlatformVerification_Private_0_3>() { + return PPB_PLATFORMVERIFICATION_PRIVATE_INTERFACE_0_3; } inline bool HasInterface() { - return has_interface<PPB_PlatformVerification_Private_0_2>(); + return has_interface<PPB_PlatformVerification_Private_0_3>(); } -inline const PPB_PlatformVerification_Private_0_2* GetInterface() { - return get_interface<PPB_PlatformVerification_Private_0_2>(); +inline const PPB_PlatformVerification_Private_0_3* GetInterface() { + return get_interface<PPB_PlatformVerification_Private_0_3>(); } } // namespace @@ -54,4 +55,14 @@ int32_t PlatformVerification::ChallengePlatform( callback.pp_completion_callback()); } +int32_t PlatformVerification::GetStorageId(Var* storage_id, + const CompletionCallback& callback) { + if (!HasInterface()) + return callback.MayForce(PP_ERROR_NOINTERFACE); + + return GetInterface()->GetStorageId( + pp_resource(), const_cast<PP_Var*>(&storage_id->pp_var()), + callback.pp_completion_callback()); +} + } // namespace pp diff --git a/chromium/ppapi/cpp/private/platform_verification.h b/chromium/ppapi/cpp/private/platform_verification.h index a9f73fa2472..ac97a0e1fd3 100644 --- a/chromium/ppapi/cpp/private/platform_verification.h +++ b/chromium/ppapi/cpp/private/platform_verification.h @@ -26,6 +26,7 @@ class PlatformVerification : public Resource { Var* signed_data_signature, Var* platform_key_certificate, const CompletionCallback& callback); + int32_t GetStorageId(Var* storage_id, const CompletionCallback& callback); }; } // namespace pp diff --git a/chromium/ppapi/cpp/touch_point.h b/chromium/ppapi/cpp/touch_point.h index 66c512ba7d5..2dc8951563a 100644 --- a/chromium/ppapi/cpp/touch_point.h +++ b/chromium/ppapi/cpp/touch_point.h @@ -18,7 +18,11 @@ class TouchPoint { public: TouchPoint() : touch_point_(PP_MakeTouchPoint()) {} - TouchPoint(const PP_TouchPoint& point) : touch_point_(point) {} + TouchPoint(const PP_TouchPoint& point) + : touch_point_(point), tilt_(PP_MakeFloatPoint(0, 0)) {} + + TouchPoint(const PP_TouchPoint& point, const PP_FloatPoint& tilt) + : touch_point_(point), tilt_(tilt) {} /// @return The identifier for this TouchPoint. This corresponds to the order /// in which the points were pressed. For example, the first point to be @@ -47,8 +51,14 @@ class TouchPoint { /// the value is not guaranteed to stay within that range. float pressure() const { return touch_point_.pressure; } + /// @return The tilt of this touchpoint. This is a float point. Values of x + /// and y are between 0 and 90, with 0 indicating 0 degrees and 90 indicating + // 90 degrees. + PP_FloatPoint tilt() const { return tilt_; } + private: PP_TouchPoint touch_point_; + PP_FloatPoint tilt_; }; } // namespace pp diff --git a/chromium/ppapi/examples/ppapi_example.gni b/chromium/ppapi/examples/ppapi_example.gni index 3cedcc027dc..cb24dcf4667 100644 --- a/chromium/ppapi/examples/ppapi_example.gni +++ b/chromium/ppapi/examples/ppapi_example.gni @@ -18,7 +18,7 @@ template("ppapi_example") { } sources = invoker.sources - deps = invoker.deps + deps = invoker.deps + [ "//build/config:exe_and_shlib_deps" ] } } else { mac_plugin_bundle(target_name) { diff --git a/chromium/ppapi/generators/OWNERS b/chromium/ppapi/generators/OWNERS index 18a906139f1..48148d6d397 100644 --- a/chromium/ppapi/generators/OWNERS +++ b/chromium/ppapi/generators/OWNERS @@ -1,8 +1,4 @@ bradnelson@chromium.org -noelallen@chromium.org -noelallen@google.com -sehr@chromium.org -sehr@google.com yzshen@chromium.org # COMPONENT: Internals>Plugins>Pepper diff --git a/chromium/ppapi/native_client/BUILD.gn b/chromium/ppapi/native_client/BUILD.gn index eef25a26d78..e06e4fadafd 100644 --- a/chromium/ppapi/native_client/BUILD.gn +++ b/chromium/ppapi/native_client/BUILD.gn @@ -95,10 +95,10 @@ if (is_nacl) { script = "irt_debuglink.py" args = [ - rebase_path(objcopy), - rebase_path(irt_debug), - rebase_path(irt_stripped), - rebase_path(irt_final), + rebase_path(objcopy, root_build_dir), + rebase_path(irt_debug, root_build_dir), + rebase_path(irt_stripped, root_build_dir), + rebase_path(irt_final, root_build_dir), ] } } diff --git a/chromium/ppapi/native_client/OWNERS b/chromium/ppapi/native_client/OWNERS index 4021febf069..0f846bfcf8c 100644 --- a/chromium/ppapi/native_client/OWNERS +++ b/chromium/ppapi/native_client/OWNERS @@ -1,6 +1,5 @@ bbudge@chromium.org bradnelson@chromium.org mseaborn@chromium.org -sehr@chromium.org -# COMPONENT: Internals>Plugins>Pepper
\ No newline at end of file +# COMPONENT: Internals>Plugins>Pepper diff --git a/chromium/ppapi/native_client/nacl_test_data.gni b/chromium/ppapi/native_client/nacl_test_data.gni index 67b8041fa14..823b732e0a8 100644 --- a/chromium/ppapi/native_client/nacl_test_data.gni +++ b/chromium/ppapi/native_client/nacl_test_data.gni @@ -251,7 +251,8 @@ template("nacl_test_data") { "-arch", arch, "-Wl,-L" + - rebase_path(get_label_info(pnacl_irt_shim, "target_out_dir")), + rebase_path(get_label_info(pnacl_irt_shim, "target_out_dir"), + root_build_dir), ] deps = [ ":$nexe_target_name(//build/toolchain/nacl:newlib_pnacl)", diff --git a/chromium/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c b/chromium/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c index 6e8a8aa7cde..ee11545cf84 100644 --- a/chromium/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c +++ b/chromium/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c @@ -118,6 +118,7 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_WheelInputEvent_1_0; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_KeyboardInputEvent_1_0; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_KeyboardInputEvent_1_2; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_TouchInputEvent_1_0; +static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_TouchInputEvent_1_4; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_IMEInputEvent_1_0; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_MediaStreamAudioTrack_0_1; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_MediaStreamVideoTrack_0_1; @@ -193,7 +194,7 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_NetAddress_Private_0_1; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_NetAddress_Private_1_0; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_NetAddress_Private_1_1; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_OutputProtection_Private_0_1; -static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_PlatformVerification_Private_0_2; +static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_PlatformVerification_Private_0_3; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_TCPServerSocket_Private_0_1; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_TCPServerSocket_Private_0_2; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_TCPSocket_Private_0_3; @@ -1191,6 +1192,50 @@ static void Pnacl_M13_PPB_TouchInputEvent_GetTouchById(struct PP_TouchPoint* _st /* End wrapper methods for PPB_TouchInputEvent_1_0 */ +/* Begin wrapper methods for PPB_TouchInputEvent_1_4 */ + +static PP_Resource Pnacl_M60_PPB_TouchInputEvent_Create(PP_Instance instance, PP_InputEvent_Type type, PP_TimeTicks time_stamp, uint32_t modifiers) { + const struct PPB_TouchInputEvent_1_4 *iface = Pnacl_WrapperInfo_PPB_TouchInputEvent_1_4.real_iface; + return iface->Create(instance, type, time_stamp, modifiers); +} + +static void Pnacl_M60_PPB_TouchInputEvent_AddTouchPoint(PP_Resource touch_event, PP_TouchListType list, const struct PP_TouchPoint* point) { + const struct PPB_TouchInputEvent_1_4 *iface = Pnacl_WrapperInfo_PPB_TouchInputEvent_1_4.real_iface; + iface->AddTouchPoint(touch_event, list, point); +} + +static PP_Bool Pnacl_M60_PPB_TouchInputEvent_IsTouchInputEvent(PP_Resource resource) { + const struct PPB_TouchInputEvent_1_4 *iface = Pnacl_WrapperInfo_PPB_TouchInputEvent_1_4.real_iface; + return iface->IsTouchInputEvent(resource); +} + +static uint32_t Pnacl_M60_PPB_TouchInputEvent_GetTouchCount(PP_Resource resource, PP_TouchListType list) { + const struct PPB_TouchInputEvent_1_4 *iface = Pnacl_WrapperInfo_PPB_TouchInputEvent_1_4.real_iface; + return iface->GetTouchCount(resource, list); +} + +static void Pnacl_M60_PPB_TouchInputEvent_GetTouchByIndex(struct PP_TouchPoint* _struct_result, PP_Resource resource, PP_TouchListType list, uint32_t index) { + const struct PPB_TouchInputEvent_1_4 *iface = Pnacl_WrapperInfo_PPB_TouchInputEvent_1_4.real_iface; + *_struct_result = iface->GetTouchByIndex(resource, list, index); +} + +static void Pnacl_M60_PPB_TouchInputEvent_GetTouchById(struct PP_TouchPoint* _struct_result, PP_Resource resource, PP_TouchListType list, uint32_t touch_id) { + const struct PPB_TouchInputEvent_1_4 *iface = Pnacl_WrapperInfo_PPB_TouchInputEvent_1_4.real_iface; + *_struct_result = iface->GetTouchById(resource, list, touch_id); +} + +static void Pnacl_M60_PPB_TouchInputEvent_GetTouchTiltByIndex(struct PP_FloatPoint* _struct_result, PP_Resource resource, PP_TouchListType list, uint32_t index) { + const struct PPB_TouchInputEvent_1_4 *iface = Pnacl_WrapperInfo_PPB_TouchInputEvent_1_4.real_iface; + *_struct_result = iface->GetTouchTiltByIndex(resource, list, index); +} + +static void Pnacl_M60_PPB_TouchInputEvent_GetTouchTiltById(struct PP_FloatPoint* _struct_result, PP_Resource resource, PP_TouchListType list, uint32_t touch_id) { + const struct PPB_TouchInputEvent_1_4 *iface = Pnacl_WrapperInfo_PPB_TouchInputEvent_1_4.real_iface; + *_struct_result = iface->GetTouchTiltById(resource, list, touch_id); +} + +/* End wrapper methods for PPB_TouchInputEvent_1_4 */ + /* Begin wrapper methods for PPB_IMEInputEvent_1_0 */ static PP_Resource Pnacl_M13_PPB_IMEInputEvent_Create(PP_Instance instance, PP_InputEvent_Type type, PP_TimeTicks time_stamp, struct PP_Var* text, uint32_t segment_number, const uint32_t segment_offsets[], int32_t target_segment, uint32_t selection_start, uint32_t selection_end) { @@ -4068,24 +4113,29 @@ static int32_t Pnacl_M31_PPB_OutputProtection_Private_EnableProtection(PP_Resour /* End wrapper methods for PPB_OutputProtection_Private_0_1 */ -/* Begin wrapper methods for PPB_PlatformVerification_Private_0_2 */ +/* Begin wrapper methods for PPB_PlatformVerification_Private_0_3 */ -static PP_Resource Pnacl_M32_PPB_PlatformVerification_Private_Create(PP_Instance instance) { - const struct PPB_PlatformVerification_Private_0_2 *iface = Pnacl_WrapperInfo_PPB_PlatformVerification_Private_0_2.real_iface; +static PP_Resource Pnacl_M61_PPB_PlatformVerification_Private_Create(PP_Instance instance) { + const struct PPB_PlatformVerification_Private_0_3 *iface = Pnacl_WrapperInfo_PPB_PlatformVerification_Private_0_3.real_iface; return iface->Create(instance); } -static PP_Bool Pnacl_M32_PPB_PlatformVerification_Private_IsPlatformVerification(PP_Resource resource) { - const struct PPB_PlatformVerification_Private_0_2 *iface = Pnacl_WrapperInfo_PPB_PlatformVerification_Private_0_2.real_iface; +static PP_Bool Pnacl_M61_PPB_PlatformVerification_Private_IsPlatformVerification(PP_Resource resource) { + const struct PPB_PlatformVerification_Private_0_3 *iface = Pnacl_WrapperInfo_PPB_PlatformVerification_Private_0_3.real_iface; return iface->IsPlatformVerification(resource); } -static int32_t Pnacl_M32_PPB_PlatformVerification_Private_ChallengePlatform(PP_Resource instance, struct PP_Var* service_id, struct PP_Var* challenge, struct PP_Var* signed_data, struct PP_Var* signed_data_signature, struct PP_Var* platform_key_certificate, struct PP_CompletionCallback* callback) { - const struct PPB_PlatformVerification_Private_0_2 *iface = Pnacl_WrapperInfo_PPB_PlatformVerification_Private_0_2.real_iface; +static int32_t Pnacl_M61_PPB_PlatformVerification_Private_ChallengePlatform(PP_Resource instance, struct PP_Var* service_id, struct PP_Var* challenge, struct PP_Var* signed_data, struct PP_Var* signed_data_signature, struct PP_Var* platform_key_certificate, struct PP_CompletionCallback* callback) { + const struct PPB_PlatformVerification_Private_0_3 *iface = Pnacl_WrapperInfo_PPB_PlatformVerification_Private_0_3.real_iface; return iface->ChallengePlatform(instance, *service_id, *challenge, signed_data, signed_data_signature, platform_key_certificate, *callback); } -/* End wrapper methods for PPB_PlatformVerification_Private_0_2 */ +static int32_t Pnacl_M61_PPB_PlatformVerification_Private_GetStorageId(PP_Resource instance, struct PP_Var* storage_id, struct PP_CompletionCallback* callback) { + const struct PPB_PlatformVerification_Private_0_3 *iface = Pnacl_WrapperInfo_PPB_PlatformVerification_Private_0_3.real_iface; + return iface->GetStorageId(instance, storage_id, *callback); +} + +/* End wrapper methods for PPB_PlatformVerification_Private_0_3 */ /* Begin wrapper methods for PPB_TCPServerSocket_Private_0_1 */ @@ -5018,6 +5068,17 @@ static const struct PPB_TouchInputEvent_1_0 Pnacl_Wrappers_PPB_TouchInputEvent_1 .GetTouchById = (struct PP_TouchPoint (*)(PP_Resource resource, PP_TouchListType list, uint32_t touch_id))&Pnacl_M13_PPB_TouchInputEvent_GetTouchById }; +static const struct PPB_TouchInputEvent_1_4 Pnacl_Wrappers_PPB_TouchInputEvent_1_4 = { + .Create = (PP_Resource (*)(PP_Instance instance, PP_InputEvent_Type type, PP_TimeTicks time_stamp, uint32_t modifiers))&Pnacl_M60_PPB_TouchInputEvent_Create, + .AddTouchPoint = (void (*)(PP_Resource touch_event, PP_TouchListType list, const struct PP_TouchPoint* point))&Pnacl_M60_PPB_TouchInputEvent_AddTouchPoint, + .IsTouchInputEvent = (PP_Bool (*)(PP_Resource resource))&Pnacl_M60_PPB_TouchInputEvent_IsTouchInputEvent, + .GetTouchCount = (uint32_t (*)(PP_Resource resource, PP_TouchListType list))&Pnacl_M60_PPB_TouchInputEvent_GetTouchCount, + .GetTouchByIndex = (struct PP_TouchPoint (*)(PP_Resource resource, PP_TouchListType list, uint32_t index))&Pnacl_M60_PPB_TouchInputEvent_GetTouchByIndex, + .GetTouchById = (struct PP_TouchPoint (*)(PP_Resource resource, PP_TouchListType list, uint32_t touch_id))&Pnacl_M60_PPB_TouchInputEvent_GetTouchById, + .GetTouchTiltByIndex = (struct PP_FloatPoint (*)(PP_Resource resource, PP_TouchListType list, uint32_t index))&Pnacl_M60_PPB_TouchInputEvent_GetTouchTiltByIndex, + .GetTouchTiltById = (struct PP_FloatPoint (*)(PP_Resource resource, PP_TouchListType list, uint32_t touch_id))&Pnacl_M60_PPB_TouchInputEvent_GetTouchTiltById +}; + static const struct PPB_IMEInputEvent_1_0 Pnacl_Wrappers_PPB_IMEInputEvent_1_0 = { .Create = (PP_Resource (*)(PP_Instance instance, PP_InputEvent_Type type, PP_TimeTicks time_stamp, struct PP_Var text, uint32_t segment_number, const uint32_t segment_offsets[], int32_t target_segment, uint32_t selection_start, uint32_t selection_end))&Pnacl_M13_PPB_IMEInputEvent_Create, .IsIMEInputEvent = (PP_Bool (*)(PP_Resource resource))&Pnacl_M13_PPB_IMEInputEvent_IsIMEInputEvent, @@ -5838,10 +5899,11 @@ static const struct PPB_OutputProtection_Private_0_1 Pnacl_Wrappers_PPB_OutputPr .EnableProtection = (int32_t (*)(PP_Resource resource, uint32_t desired_protection_mask, struct PP_CompletionCallback callback))&Pnacl_M31_PPB_OutputProtection_Private_EnableProtection }; -static const struct PPB_PlatformVerification_Private_0_2 Pnacl_Wrappers_PPB_PlatformVerification_Private_0_2 = { - .Create = (PP_Resource (*)(PP_Instance instance))&Pnacl_M32_PPB_PlatformVerification_Private_Create, - .IsPlatformVerification = (PP_Bool (*)(PP_Resource resource))&Pnacl_M32_PPB_PlatformVerification_Private_IsPlatformVerification, - .ChallengePlatform = (int32_t (*)(PP_Resource instance, struct PP_Var service_id, struct PP_Var challenge, struct PP_Var* signed_data, struct PP_Var* signed_data_signature, struct PP_Var* platform_key_certificate, struct PP_CompletionCallback callback))&Pnacl_M32_PPB_PlatformVerification_Private_ChallengePlatform +static const struct PPB_PlatformVerification_Private_0_3 Pnacl_Wrappers_PPB_PlatformVerification_Private_0_3 = { + .Create = (PP_Resource (*)(PP_Instance instance))&Pnacl_M61_PPB_PlatformVerification_Private_Create, + .IsPlatformVerification = (PP_Bool (*)(PP_Resource resource))&Pnacl_M61_PPB_PlatformVerification_Private_IsPlatformVerification, + .ChallengePlatform = (int32_t (*)(PP_Resource instance, struct PP_Var service_id, struct PP_Var challenge, struct PP_Var* signed_data, struct PP_Var* signed_data_signature, struct PP_Var* platform_key_certificate, struct PP_CompletionCallback callback))&Pnacl_M61_PPB_PlatformVerification_Private_ChallengePlatform, + .GetStorageId = (int32_t (*)(PP_Resource instance, struct PP_Var* storage_id, struct PP_CompletionCallback callback))&Pnacl_M61_PPB_PlatformVerification_Private_GetStorageId }; static const struct PPB_TCPServerSocket_Private_0_1 Pnacl_Wrappers_PPB_TCPServerSocket_Private_0_1 = { @@ -6151,6 +6213,12 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_TouchInputEvent_1_0 = { .real_iface = NULL }; +static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_TouchInputEvent_1_4 = { + .iface_macro = PPB_TOUCH_INPUT_EVENT_INTERFACE_1_4, + .wrapped_iface = (const void *) &Pnacl_Wrappers_PPB_TouchInputEvent_1_4, + .real_iface = NULL +}; + static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_IMEInputEvent_1_0 = { .iface_macro = PPB_IME_INPUT_EVENT_INTERFACE_1_0, .wrapped_iface = (const void *) &Pnacl_Wrappers_PPB_IMEInputEvent_1_0, @@ -6601,9 +6669,9 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_OutputProtection_Private_ .real_iface = NULL }; -static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_PlatformVerification_Private_0_2 = { - .iface_macro = PPB_PLATFORMVERIFICATION_PRIVATE_INTERFACE_0_2, - .wrapped_iface = (const void *) &Pnacl_Wrappers_PPB_PlatformVerification_Private_0_2, +static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_PlatformVerification_Private_0_3 = { + .iface_macro = PPB_PLATFORMVERIFICATION_PRIVATE_INTERFACE_0_3, + .wrapped_iface = (const void *) &Pnacl_Wrappers_PPB_PlatformVerification_Private_0_3, .real_iface = NULL }; @@ -6721,6 +6789,7 @@ static struct __PnaclWrapperInfo *s_ppb_wrappers[] = { &Pnacl_WrapperInfo_PPB_KeyboardInputEvent_1_0, &Pnacl_WrapperInfo_PPB_KeyboardInputEvent_1_2, &Pnacl_WrapperInfo_PPB_TouchInputEvent_1_0, + &Pnacl_WrapperInfo_PPB_TouchInputEvent_1_4, &Pnacl_WrapperInfo_PPB_IMEInputEvent_1_0, &Pnacl_WrapperInfo_PPB_MediaStreamAudioTrack_0_1, &Pnacl_WrapperInfo_PPB_MediaStreamVideoTrack_0_1, @@ -6795,7 +6864,7 @@ static struct __PnaclWrapperInfo *s_ppb_wrappers[] = { &Pnacl_WrapperInfo_PPB_NetAddress_Private_1_0, &Pnacl_WrapperInfo_PPB_NetAddress_Private_1_1, &Pnacl_WrapperInfo_PPB_OutputProtection_Private_0_1, - &Pnacl_WrapperInfo_PPB_PlatformVerification_Private_0_2, + &Pnacl_WrapperInfo_PPB_PlatformVerification_Private_0_3, &Pnacl_WrapperInfo_PPB_TCPServerSocket_Private_0_1, &Pnacl_WrapperInfo_PPB_TCPServerSocket_Private_0_2, &Pnacl_WrapperInfo_PPB_TCPSocket_Private_0_3, diff --git a/chromium/ppapi/native_client/tools/browser_tester/browserdata/nacltest.js b/chromium/ppapi/native_client/tools/browser_tester/browserdata/nacltest.js index f5e7c971daa..0378563b1de 100644 --- a/chromium/ppapi/native_client/tools/browser_tester/browserdata/nacltest.js +++ b/chromium/ppapi/native_client/tools/browser_tester/browserdata/nacltest.js @@ -123,7 +123,6 @@ function RPCWrapper() { for (var pname in params) { msg[pname] = params[pname]; } - domAutomationController.setAutomationId(0); domAutomationController.send(JSON.stringify(msg)); } else if (this_.rpc_available) { // Construct the URL for the RPC request. diff --git a/chromium/ppapi/proxy/audio_encoder_resource.h b/chromium/ppapi/proxy/audio_encoder_resource.h index 0290d21be50..acdd774b973 100644 --- a/chromium/ppapi/proxy/audio_encoder_resource.h +++ b/chromium/ppapi/proxy/audio_encoder_resource.h @@ -9,7 +9,6 @@ #include "base/macros.h" #include "base/memory/ref_counted.h" -#include "base/memory/scoped_vector.h" #include "ppapi/proxy/connection.h" #include "ppapi/proxy/plugin_resource.h" #include "ppapi/shared_impl/media_stream_buffer_manager.h" diff --git a/chromium/ppapi/proxy/platform_verification_private_resource.cc b/chromium/ppapi/proxy/platform_verification_private_resource.cc index ac709c24561..d9fbf9986ea 100644 --- a/chromium/ppapi/proxy/platform_verification_private_resource.cc +++ b/chromium/ppapi/proxy/platform_verification_private_resource.cc @@ -100,5 +100,38 @@ void PlatformVerificationPrivateResource::OnChallengePlatformReply( output_params.callback->Run(params.result()); } +int32_t PlatformVerificationPrivateResource::GetStorageId( + PP_Var* storage_id, + const scoped_refptr<TrackedCallback>& callback) { + // Prevent null types for obvious reasons, but also ref-counted types to + // avoid leaks on failures (since they're only written to on success). + if (!storage_id || VarTracker::IsVarTypeRefcounted(storage_id->type)) { + return PP_ERROR_BADARGUMENT; + } + + GetStorageIdParams output_params = {storage_id, callback}; + + Call<PpapiHostMsg_PlatformVerification_GetStorageIdReply>( + BROWSER, PpapiHostMsg_PlatformVerification_GetStorageId(), + base::Bind(&PlatformVerificationPrivateResource::OnGetStorageIdReply, + base::Unretained(this), output_params)); + return PP_OK_COMPLETIONPENDING; +} + +void PlatformVerificationPrivateResource::OnGetStorageIdReply( + GetStorageIdParams output_params, + const ResourceMessageReplyParams& params, + const std::string& storage_id) { + if (!TrackedCallback::IsPending(output_params.callback) || + TrackedCallback::IsScheduledToRun(output_params.callback)) { + return; + } + + if (params.result() == PP_OK) { + *(output_params.storage_id) = (new StringVar(storage_id))->GetPPVar(); + } + output_params.callback->Run(params.result()); +} + } // namespace proxy } // namespace ppapi diff --git a/chromium/ppapi/proxy/platform_verification_private_resource.h b/chromium/ppapi/proxy/platform_verification_private_resource.h index ae3cd13ed07..031e9ef704a 100644 --- a/chromium/ppapi/proxy/platform_verification_private_resource.h +++ b/chromium/ppapi/proxy/platform_verification_private_resource.h @@ -29,6 +29,10 @@ class PPAPI_PROXY_EXPORT PlatformVerificationPrivateResource PP_Var* platform_key_certificate; scoped_refptr<TrackedCallback> callback; }; + struct GetStorageIdParams { + PP_Var* storage_id; + scoped_refptr<TrackedCallback> callback; + }; ~PlatformVerificationPrivateResource() override; @@ -50,6 +54,11 @@ class PPAPI_PROXY_EXPORT PlatformVerificationPrivateResource const std::vector<uint8_t>& raw_signed_data, const std::vector<uint8_t>& raw_signed_data_signature, const std::string& raw_platform_key_certificate); + int32_t GetStorageId(PP_Var* storage_id, + const scoped_refptr<TrackedCallback>& callback) override; + void OnGetStorageIdReply(GetStorageIdParams output_params, + const ResourceMessageReplyParams& params, + const std::string& storage_id); DISALLOW_COPY_AND_ASSIGN(PlatformVerificationPrivateResource); }; diff --git a/chromium/ppapi/proxy/ppapi_messages.h b/chromium/ppapi/proxy/ppapi_messages.h index a67c2e4ae5f..724c3189831 100644 --- a/chromium/ppapi/proxy/ppapi_messages.h +++ b/chromium/ppapi/proxy/ppapi_messages.h @@ -391,6 +391,11 @@ IPC_STRUCT_TRAITS_BEGIN(ppapi::Preferences) IPC_STRUCT_TRAITS_MEMBER(is_accelerated_video_decode_enabled) IPC_STRUCT_TRAITS_END() +IPC_STRUCT_TRAITS_BEGIN(ppapi::TouchPointWithTilt) + IPC_STRUCT_TRAITS_MEMBER(touch) + IPC_STRUCT_TRAITS_MEMBER(tilt) +IPC_STRUCT_TRAITS_END() + IPC_STRUCT_TRAITS_BEGIN(ppapi::InputEventData) IPC_STRUCT_TRAITS_MEMBER(is_filtered) IPC_STRUCT_TRAITS_MEMBER(event_type) @@ -1836,6 +1841,9 @@ IPC_MESSAGE_CONTROL3(PpapiHostMsg_PlatformVerification_ChallengePlatformReply, std::vector<uint8_t> /* signed_data */, std::vector<uint8_t> /* signed_data_signature */, std::string /* platform_key_certificate */) +IPC_MESSAGE_CONTROL0(PpapiHostMsg_PlatformVerification_GetStorageId) +IPC_MESSAGE_CONTROL1(PpapiHostMsg_PlatformVerification_GetStorageIdReply, + std::string /* storage_id */) // Printing. IPC_MESSAGE_CONTROL0(PpapiHostMsg_Printing_Create) @@ -2542,7 +2550,4 @@ IPC_MESSAGE_CONTROL1(PpapiPluginMsg_VideoCapture_OnError, IPC_MESSAGE_CONTROL1(PpapiPluginMsg_VideoCapture_OnBufferReady, uint32_t /* buffer */) -// Sent by the PPAPI process to indicate that a field trial has been activated. -IPC_MESSAGE_CONTROL1(PpapiHostMsg_FieldTrialActivated, std::string /* name */) - #endif // !defined(OS_NACL) && !defined(NACL_WIN64) diff --git a/chromium/ppapi/proxy/ppb_graphics_3d_proxy.cc b/chromium/ppapi/proxy/ppb_graphics_3d_proxy.cc index a38c2c3f05c..31b29bc1987 100644 --- a/chromium/ppapi/proxy/ppb_graphics_3d_proxy.cc +++ b/chromium/ppapi/proxy/ppb_graphics_3d_proxy.cc @@ -193,6 +193,9 @@ PP_Resource PPB_Graphics3D_Proxy::CreateProxyResource( ? gl::PreferIntegratedGpu : gl::PreferDiscreteGpu; break; + case PP_GRAPHICS3DATTRIB_SINGLE_BUFFER: + attrib_helper.single_buffer = !!attr[1]; + break; default: attribs.push_back(attr[0]); attribs.push_back(attr[1]); diff --git a/chromium/ppapi/proxy/video_decoder_resource.cc b/chromium/ppapi/proxy/video_decoder_resource.cc index 26fee48177e..495d257a695 100644 --- a/chromium/ppapi/proxy/video_decoder_resource.cc +++ b/chromium/ppapi/proxy/video_decoder_resource.cc @@ -238,14 +238,10 @@ int32_t VideoDecoderResource::Decode(uint32_t decode_id, return PP_ERROR_NOMEMORY; available_shm_buffers_.push_back(shm_buffer.get()); - if (shm_buffers_.size() < kMaximumPendingDecodes) { - shm_buffers_.push_back(shm_buffer.release()); - } else { - // Delete manually since ScopedVector won't delete the existing element if - // we just assign it. - delete shm_buffers_[shm_id]; - shm_buffers_[shm_id] = shm_buffer.release(); - } + if (shm_buffers_.size() < kMaximumPendingDecodes) + shm_buffers_.push_back(std::move(shm_buffer)); + else + shm_buffers_[shm_id] = std::move(shm_buffer); } // At this point we should have shared memory to hold the plugin's buffer. @@ -486,7 +482,7 @@ void VideoDecoderResource::OnPluginMsgDecodeComplete( return; } // Make the shm buffer available. - available_shm_buffers_.push_back(shm_buffers_[shm_id]); + available_shm_buffers_.push_back(shm_buffers_[shm_id].get()); // If the plugin is waiting, let it call Decode again. if (decode_callback_.get()) { scoped_refptr<TrackedCallback> callback; diff --git a/chromium/ppapi/proxy/video_decoder_resource.h b/chromium/ppapi/proxy/video_decoder_resource.h index adb3f05ff1d..0fd70400884 100644 --- a/chromium/ppapi/proxy/video_decoder_resource.h +++ b/chromium/ppapi/proxy/video_decoder_resource.h @@ -9,11 +9,11 @@ #include <memory> #include <queue> +#include <vector> #include "base/containers/hash_tables.h" #include "base/macros.h" #include "base/memory/ref_counted.h" -#include "base/memory/scoped_vector.h" #include "ppapi/proxy/connection.h" #include "ppapi/proxy/plugin_resource.h" #include "ppapi/proxy/ppapi_proxy_export.h" @@ -143,8 +143,8 @@ class PPAPI_PROXY_EXPORT VideoDecoderResource void DeleteGLTexture(uint32_t texture_id); void WriteNextPicture(); - // ScopedVector to own the shared memory buffers. - ScopedVector<ShmBuffer> shm_buffers_; + // The shared memory buffers. + std::vector<std::unique_ptr<ShmBuffer>> shm_buffers_; // List of available shared memory buffers. typedef std::vector<ShmBuffer*> ShmBufferList; diff --git a/chromium/ppapi/proxy/video_encoder_resource.cc b/chromium/ppapi/proxy/video_encoder_resource.cc index 0f7c890a934..10aa8fac204 100644 --- a/chromium/ppapi/proxy/video_encoder_resource.cc +++ b/chromium/ppapi/proxy/video_encoder_resource.cc @@ -401,10 +401,10 @@ void VideoEncoderResource::OnPluginMsgBitstreamBuffers( new base::SharedMemory(shm_handles[i], true)); CHECK(shm->Map(buffer_length)); - ShmBuffer* buffer = new ShmBuffer(i, std::move(shm)); - shm_buffers_.push_back(buffer); + auto buffer = base::MakeUnique<ShmBuffer>(i, std::move(shm)); bitstream_buffer_map_.insert( std::make_pair(buffer->shm->memory(), buffer->id)); + shm_buffers_.push_back(std::move(buffer)); } } diff --git a/chromium/ppapi/proxy/video_encoder_resource.h b/chromium/ppapi/proxy/video_encoder_resource.h index 59877d36f3b..e04c5134f62 100644 --- a/chromium/ppapi/proxy/video_encoder_resource.h +++ b/chromium/ppapi/proxy/video_encoder_resource.h @@ -9,10 +9,10 @@ #include <deque> #include <memory> +#include <vector> #include "base/macros.h" #include "base/memory/ref_counted.h" -#include "base/memory/scoped_vector.h" #include "ppapi/proxy/connection.h" #include "ppapi/proxy/plugin_resource.h" #include "ppapi/shared_impl/media_stream_buffer_manager.h" @@ -46,7 +46,7 @@ class PPAPI_PROXY_EXPORT VideoEncoderResource ShmBuffer(uint32_t id, std::unique_ptr<base::SharedMemory> shm); ~ShmBuffer(); - // Index of the buffer in the ScopedVector. Buffers have the same id in + // Index of the buffer in the vector. Buffers have the same id in // the plugin and the host. uint32_t id; std::unique_ptr<base::SharedMemory> shm; @@ -56,7 +56,7 @@ class PPAPI_PROXY_EXPORT VideoEncoderResource BitstreamBuffer(uint32_t id, uint32_t size, bool key_frame); ~BitstreamBuffer(); - // Index of the buffer in the ScopedVector. Same as ShmBuffer::id. + // Index of the buffer in the vector. Same as ShmBuffer::id. uint32_t id; uint32_t size; bool key_frame; @@ -141,7 +141,7 @@ class PPAPI_PROXY_EXPORT VideoEncoderResource VideoFrameMap; VideoFrameMap video_frames_; - ScopedVector<ShmBuffer> shm_buffers_; + std::vector<std::unique_ptr<ShmBuffer>> shm_buffers_; std::deque<BitstreamBuffer> available_bitstream_buffers_; typedef std::map<void*, uint32_t> BitstreamBufferMap; diff --git a/chromium/ppapi/proxy/video_encoder_resource_unittest.cc b/chromium/ppapi/proxy/video_encoder_resource_unittest.cc index 5dc29c26d3a..447643cfa99 100644 --- a/chromium/ppapi/proxy/video_encoder_resource_unittest.cc +++ b/chromium/ppapi/proxy/video_encoder_resource_unittest.cc @@ -6,7 +6,9 @@ #include <stdint.h> +#include <memory> #include <utility> +#include <vector> #include "base/memory/shared_memory.h" #include "base/process/process.h" @@ -290,7 +292,7 @@ class VideoEncoderResourceTest : public PluginProxyTest, void SendBitstreamBuffers(const ResourceMessageCallParams& params, uint32_t buffer_length) { std::vector<SerializedHandle> handles; - for (base::SharedMemory* mem : shared_memory_bitstreams_) { + for (const auto& mem : shared_memory_bitstreams_) { ASSERT_EQ(mem->requested_size(), buffer_length); base::SharedMemoryHandle handle = mem->handle().Duplicate(); ASSERT_TRUE(handle.IsValid()); @@ -423,7 +425,7 @@ class VideoEncoderResourceTest : public PluginProxyTest, const PPB_VideoEncoder_0_2* encoder_iface_; const PPB_VideoEncoder_0_1* encoder_iface_0_1_; - ScopedVector<base::SharedMemory> shared_memory_bitstreams_; + std::vector<std::unique_ptr<base::SharedMemory>> shared_memory_bitstreams_; MediaStreamBufferManager video_frames_manager_; }; diff --git a/chromium/ppapi/shared_impl/ppb_input_event_shared.cc b/chromium/ppapi/shared_impl/ppb_input_event_shared.cc index c966224b39d..b54b236058d 100644 --- a/chromium/ppapi/shared_impl/ppb_input_event_shared.cc +++ b/chromium/ppapi/shared_impl/ppb_input_event_shared.cc @@ -121,15 +121,16 @@ void PPB_InputEvent_Shared::GetIMESelection(uint32_t* start, uint32_t* end) { void PPB_InputEvent_Shared::AddTouchPoint(PP_TouchListType list, const PP_TouchPoint& point) { + TouchPointWithTilt point_with_tilt{point, {0, 0}}; switch (list) { case PP_TOUCHLIST_TYPE_TOUCHES: - data_.touches.push_back(point); + data_.touches.push_back(point_with_tilt); break; case PP_TOUCHLIST_TYPE_CHANGEDTOUCHES: - data_.changed_touches.push_back(point); + data_.changed_touches.push_back(point_with_tilt); break; case PP_TOUCHLIST_TYPE_TARGETTOUCHES: - data_.target_touches.push_back(point); + data_.target_touches.push_back(point_with_tilt); break; default: break; @@ -149,49 +150,70 @@ uint32_t PPB_InputEvent_Shared::GetTouchCount(PP_TouchListType list) { return 0; } -PP_TouchPoint PPB_InputEvent_Shared::GetTouchByIndex(PP_TouchListType list, - uint32_t index) { - std::vector<PP_TouchPoint>* points; +std::vector<TouchPointWithTilt>* PPB_InputEvent_Shared::GetTouchListByType( + PP_TouchListType list) { switch (list) { case PP_TOUCHLIST_TYPE_TOUCHES: - points = &data_.touches; - break; + return &data_.touches; case PP_TOUCHLIST_TYPE_CHANGEDTOUCHES: - points = &data_.changed_touches; - break; + return &data_.changed_touches; case PP_TOUCHLIST_TYPE_TARGETTOUCHES: - points = &data_.target_touches; - break; - default: - return PP_MakeTouchPoint(); + return &data_.target_touches; } - if (index >= points->size()) { + return nullptr; +} + +TouchPointWithTilt* PPB_InputEvent_Shared::GetTouchByTypeAndId( + PP_TouchListType list, + uint32_t id) { + std::vector<TouchPointWithTilt>* points = GetTouchListByType(list); + if (!points) + return nullptr; + + for (size_t i = 0; i < points->size(); i++) { + if (points->at(i).touch.id == id) + return &points->at(i); + } + + return nullptr; +} + +PP_TouchPoint PPB_InputEvent_Shared::GetTouchByIndex(PP_TouchListType list, + uint32_t index) { + std::vector<TouchPointWithTilt>* points = GetTouchListByType(list); + + if (!points || index >= points->size()) { return PP_MakeTouchPoint(); } - return points->at(index); + return points->at(index).touch; } PP_TouchPoint PPB_InputEvent_Shared::GetTouchById(PP_TouchListType list, uint32_t id) { - const std::vector<PP_TouchPoint>* points; - switch (list) { - case PP_TOUCHLIST_TYPE_TOUCHES: - points = &data_.touches; - break; - case PP_TOUCHLIST_TYPE_CHANGEDTOUCHES: - points = &data_.changed_touches; - break; - case PP_TOUCHLIST_TYPE_TARGETTOUCHES: - points = &data_.target_touches; - break; - default: - return PP_MakeTouchPoint(); - } - for (size_t i = 0; i < points->size(); i++) { - if (points->at(i).id == id) - return points->at(i); - } - return PP_MakeTouchPoint(); + TouchPointWithTilt* point = GetTouchByTypeAndId(list, id); + if (!point) + return PP_MakeTouchPoint(); + + return point->touch; +} + +PP_FloatPoint PPB_InputEvent_Shared::GetTouchTiltByIndex(PP_TouchListType list, + uint32_t index) { + std::vector<TouchPointWithTilt>* points = GetTouchListByType(list); + + if (!points || index >= points->size()) + return PP_MakeFloatPoint(0, 0); + + return points->at(index).tilt; +} + +PP_FloatPoint PPB_InputEvent_Shared::GetTouchTiltById(PP_TouchListType list, + uint32_t id) { + TouchPointWithTilt* point = GetTouchByTypeAndId(list, id); + if (!point) + return PP_MakeFloatPoint(0, 0); + + return point->tilt; } // static diff --git a/chromium/ppapi/shared_impl/ppb_input_event_shared.h b/chromium/ppapi/shared_impl/ppb_input_event_shared.h index cdebad72f71..4df9e94540f 100644 --- a/chromium/ppapi/shared_impl/ppb_input_event_shared.h +++ b/chromium/ppapi/shared_impl/ppb_input_event_shared.h @@ -18,6 +18,11 @@ namespace ppapi { +struct TouchPointWithTilt { + PP_TouchPoint touch; + PP_FloatPoint tilt; +}; + // IF YOU ADD STUFF TO THIS CLASS // ============================== // Be sure to add it to the STRUCT_TRAITS at the top of ppapi_messages.h @@ -55,9 +60,9 @@ struct PPAPI_SHARED_EXPORT InputEventData { uint32_t composition_selection_start; uint32_t composition_selection_end; - std::vector<PP_TouchPoint> touches; - std::vector<PP_TouchPoint> changed_touches; - std::vector<PP_TouchPoint> target_touches; + std::vector<TouchPointWithTilt> touches; + std::vector<TouchPointWithTilt> changed_touches; + std::vector<TouchPointWithTilt> target_touches; }; // This simple class implements the PPB_InputEvent_API in terms of the @@ -97,6 +102,9 @@ class PPAPI_SHARED_EXPORT PPB_InputEvent_Shared uint32_t GetTouchCount(PP_TouchListType list) override; PP_TouchPoint GetTouchByIndex(PP_TouchListType list, uint32_t index) override; PP_TouchPoint GetTouchById(PP_TouchListType list, uint32_t id) override; + PP_FloatPoint GetTouchTiltByIndex(PP_TouchListType list, + uint32_t index) override; + PP_FloatPoint GetTouchTiltById(PP_TouchListType list, uint32_t id) override; // Implementations for event creation. static PP_Resource CreateIMEInputEvent(ResourceObjectType type, @@ -141,6 +149,11 @@ class PPAPI_SHARED_EXPORT PPB_InputEvent_Shared uint32_t modifiers); private: + // Helper function to get the touch list by the type. + std::vector<TouchPointWithTilt>* GetTouchListByType(PP_TouchListType type); + // Helper function to get touchpoint by the list type and touchpoint id. + TouchPointWithTilt* GetTouchByTypeAndId(PP_TouchListType type, uint32_t id); + InputEventData data_; DISALLOW_IMPLICIT_CONSTRUCTORS(PPB_InputEvent_Shared); diff --git a/chromium/ppapi/thunk/interfaces_ppb_private.h b/chromium/ppapi/thunk/interfaces_ppb_private.h index 8de695095dd..1d44b274c1e 100644 --- a/chromium/ppapi/thunk/interfaces_ppb_private.h +++ b/chromium/ppapi/thunk/interfaces_ppb_private.h @@ -43,8 +43,8 @@ PROXIED_IFACE(PPB_OUTPUTPROTECTION_PRIVATE_INTERFACE_0_1, PPB_OutputProtection_Private_0_1) PROXIED_IFACE(PPB_PDF_INTERFACE, PPB_PDF) -PROXIED_IFACE(PPB_PLATFORMVERIFICATION_PRIVATE_INTERFACE_0_2, - PPB_PlatformVerification_Private_0_2) +PROXIED_IFACE(PPB_PLATFORMVERIFICATION_PRIVATE_INTERFACE_0_3, + PPB_PlatformVerification_Private_0_3) PROXIED_IFACE(PPB_URLLOADERTRUSTED_INTERFACE_0_3, PPB_URLLoaderTrusted_0_3) #endif // !defined(OS_NACL) diff --git a/chromium/ppapi/thunk/interfaces_ppb_public_stable.h b/chromium/ppapi/thunk/interfaces_ppb_public_stable.h index 8725277da5b..83b3cfa2b17 100644 --- a/chromium/ppapi/thunk/interfaces_ppb_public_stable.h +++ b/chromium/ppapi/thunk/interfaces_ppb_public_stable.h @@ -72,6 +72,7 @@ PROXIED_IFACE(PPB_MOUSE_INPUT_EVENT_INTERFACE_1_0, PPB_MouseInputEvent_1_0) PROXIED_IFACE(PPB_MOUSE_INPUT_EVENT_INTERFACE_1_1, PPB_MouseInputEvent_1_1) PROXIED_IFACE(PPB_WHEEL_INPUT_EVENT_INTERFACE_1_0, PPB_WheelInputEvent_1_0) PROXIED_IFACE(PPB_TOUCH_INPUT_EVENT_INTERFACE_1_0, PPB_TouchInputEvent_1_0) +PROXIED_IFACE(PPB_TOUCH_INPUT_EVENT_INTERFACE_1_4, PPB_TouchInputEvent_1_4) PROXIED_IFACE(PPB_FULLSCREEN_INTERFACE_1_0, PPB_Fullscreen_1_0) PROXIED_IFACE(PPB_MEDIASTREAMAUDIOTRACK_INTERFACE_0_1, PPB_MediaStreamAudioTrack_0_1) diff --git a/chromium/ppapi/thunk/ppb_input_event_api.h b/chromium/ppapi/thunk/ppb_input_event_api.h index c2e7d0fe113..886637f064f 100644 --- a/chromium/ppapi/thunk/ppb_input_event_api.h +++ b/chromium/ppapi/thunk/ppb_input_event_api.h @@ -49,6 +49,11 @@ class PPAPI_THUNK_EXPORT PPB_InputEvent_API { uint32_t index) = 0; virtual PP_TouchPoint GetTouchById(PP_TouchListType list, uint32_t id) = 0; + virtual PP_FloatPoint GetTouchTiltByIndex(PP_TouchListType list, + uint32_t index) = 0; + + virtual PP_FloatPoint GetTouchTiltById(PP_TouchListType list, + uint32_t id) = 0; }; } // namespace thunk diff --git a/chromium/ppapi/thunk/ppb_input_event_thunk.cc b/chromium/ppapi/thunk/ppb_input_event_thunk.cc index f77dd9f4748..18f75734ea9 100644 --- a/chromium/ppapi/thunk/ppb_input_event_thunk.cc +++ b/chromium/ppapi/thunk/ppb_input_event_thunk.cc @@ -497,13 +497,34 @@ struct PP_TouchPoint GetTouchById(PP_Resource touch_event, return enter.object()->GetTouchById(list, id); } -const PPB_TouchInputEvent_1_0 g_ppb_touch_input_event_thunk = { - &CreateTouchInputEvent, - &AddTouchPoint, - &IsTouchInputEvent, - &GetTouchCount, - &GetTouchByIndex, - &GetTouchById +struct PP_FloatPoint GetTouchTiltByIndex(PP_Resource touch_event, + PP_TouchListType list, + uint32_t index) { + VLOG(4) << "PPB_TouchInputEvent::GetTouchTiltByIndex()"; + EnterInputEvent enter(touch_event, true); + if (enter.failed()) + return PP_MakeFloatPoint(0, 0); + return enter.object()->GetTouchTiltByIndex(list, index); +} + +struct PP_FloatPoint GetTouchTiltById(PP_Resource touch_event, + PP_TouchListType list, + uint32_t id) { + VLOG(4) << "PPB_TouchInputEvent::GetTouchTiltById()"; + EnterInputEvent enter(touch_event, true); + if (enter.failed()) + return PP_MakeFloatPoint(0, 0); + return enter.object()->GetTouchTiltById(list, id); +} + +const PPB_TouchInputEvent_1_0 g_ppb_touch_input_event_1_0_thunk = { + &CreateTouchInputEvent, &AddTouchPoint, &IsTouchInputEvent, + &GetTouchCount, &GetTouchByIndex, &GetTouchById}; + +const PPB_TouchInputEvent_1_4 g_ppb_touch_input_event_1_4_thunk = { + &CreateTouchInputEvent, &AddTouchPoint, &IsTouchInputEvent, + &GetTouchCount, &GetTouchByIndex, &GetTouchById, + &GetTouchTiltByIndex, &GetTouchTiltById, }; } // namespace @@ -545,7 +566,11 @@ const PPB_IMEInputEvent_1_0* GetPPB_IMEInputEvent_1_0_Thunk() { } const PPB_TouchInputEvent_1_0* GetPPB_TouchInputEvent_1_0_Thunk() { - return &g_ppb_touch_input_event_thunk; + return &g_ppb_touch_input_event_1_0_thunk; +} + +const PPB_TouchInputEvent_1_4* GetPPB_TouchInputEvent_1_4_Thunk() { + return &g_ppb_touch_input_event_1_4_thunk; } } // namespace thunk diff --git a/chromium/ppapi/thunk/ppb_platform_verification_api.h b/chromium/ppapi/thunk/ppb_platform_verification_api.h index 2a12e296097..ea98f0d8518 100644 --- a/chromium/ppapi/thunk/ppb_platform_verification_api.h +++ b/chromium/ppapi/thunk/ppb_platform_verification_api.h @@ -27,6 +27,10 @@ class PPAPI_THUNK_EXPORT PPB_PlatformVerification_API { PP_Var* signed_data_signature, PP_Var* platform_key_certificate, const scoped_refptr<TrackedCallback>& callback) = 0; + + virtual int32_t GetStorageId( + PP_Var* storage_id, + const scoped_refptr<TrackedCallback>& callback) = 0; }; } // namespace thunk diff --git a/chromium/ppapi/thunk/ppb_platform_verification_private_thunk.cc b/chromium/ppapi/thunk/ppb_platform_verification_private_thunk.cc index 786ef6e705c..bc50ae59bb6 100644 --- a/chromium/ppapi/thunk/ppb_platform_verification_private_thunk.cc +++ b/chromium/ppapi/thunk/ppb_platform_verification_private_thunk.cc @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// From private/ppb_platform_verification_private.idl modified Wed Jan 27 -// 17:10:16 2016. +// From private/ppb_platform_verification_private.idl modified Fri Jun 9 +// 14:13:47 2017. #include <stdint.h> @@ -50,15 +50,26 @@ int32_t ChallengePlatform(PP_Resource instance, platform_key_certificate, enter.callback())); } -const PPB_PlatformVerification_Private_0_2 - g_ppb_platformverification_private_thunk_0_2 = { - &Create, &IsPlatformVerification, &ChallengePlatform}; +int32_t GetStorageId(PP_Resource instance, + struct PP_Var* storage_id, + struct PP_CompletionCallback callback) { + VLOG(4) << "PPB_PlatformVerification_Private::GetStorageId()"; + EnterResource<PPB_PlatformVerification_API> enter(instance, callback, true); + if (enter.failed()) + return enter.retval(); + return enter.SetResult( + enter.object()->GetStorageId(storage_id, enter.callback())); +} + +const PPB_PlatformVerification_Private_0_3 + g_ppb_platformverification_private_thunk_0_3 = { + &Create, &IsPlatformVerification, &ChallengePlatform, &GetStorageId}; } // namespace -PPAPI_THUNK_EXPORT const PPB_PlatformVerification_Private_0_2* -GetPPB_PlatformVerification_Private_0_2_Thunk() { - return &g_ppb_platformverification_private_thunk_0_2; +PPAPI_THUNK_EXPORT const PPB_PlatformVerification_Private_0_3* +GetPPB_PlatformVerification_Private_0_3_Thunk() { + return &g_ppb_platformverification_private_thunk_0_3; } } // namespace thunk |