diff options
44 files changed, 151 insertions, 348 deletions
diff --git a/chrome/browser/component_updater/ppapi_utils.cc b/chrome/browser/component_updater/ppapi_utils.cc index 7b6e9c3..9f06c7c 100644 --- a/chrome/browser/component_updater/ppapi_utils.cc +++ b/chrome/browser/component_updater/ppapi_utils.cc @@ -24,7 +24,6 @@ #include "ppapi/c/dev/ppb_printing_dev.h" #include "ppapi/c/dev/ppb_resource_array_dev.h" #include "ppapi/c/dev/ppb_scrollbar_dev.h" -#include "ppapi/c/dev/ppb_testing_dev.h" #include "ppapi/c/dev/ppb_text_input_dev.h" #include "ppapi/c/dev/ppb_trace_event_dev.h" #include "ppapi/c/dev/ppb_truetype_font_dev.h" @@ -95,6 +94,7 @@ #include "ppapi/c/private/ppb_talk_private.h" #include "ppapi/c/private/ppb_tcp_server_socket_private.h" #include "ppapi/c/private/ppb_tcp_socket_private.h" +#include "ppapi/c/private/ppb_testing_private.h" #include "ppapi/c/private/ppb_udp_socket_private.h" #include "ppapi/c/private/ppb_uma_private.h" #include "ppapi/c/private/ppb_video_destination_private.h" diff --git a/content/renderer/pepper/plugin_module.cc b/content/renderer/pepper/plugin_module.cc index e6ff467..725f199 100644 --- a/content/renderer/pepper/plugin_module.cc +++ b/content/renderer/pepper/plugin_module.cc @@ -46,7 +46,6 @@ #include "ppapi/c/dev/ppb_printing_dev.h" #include "ppapi/c/dev/ppb_resource_array_dev.h" #include "ppapi/c/dev/ppb_scrollbar_dev.h" -#include "ppapi/c/dev/ppb_testing_dev.h" #include "ppapi/c/dev/ppb_text_input_dev.h" #include "ppapi/c/dev/ppb_trace_event_dev.h" #include "ppapi/c/dev/ppb_truetype_font_dev.h" @@ -119,6 +118,7 @@ #include "ppapi/c/private/ppb_talk_private.h" #include "ppapi/c/private/ppb_tcp_server_socket_private.h" #include "ppapi/c/private/ppb_tcp_socket_private.h" +#include "ppapi/c/private/ppb_testing_private.h" #include "ppapi/c/private/ppb_udp_socket_private.h" #include "ppapi/c/private/ppb_uma_private.h" #include "ppapi/c/private/ppb_video_destination_private.h" @@ -286,7 +286,7 @@ void SetMinimumArrayBufferSizeForShmem(PP_Instance /*instance*/, // Does nothing. Not needed in-process. } -const PPB_Testing_Dev testing_interface = { +const PPB_Testing_Private testing_interface = { &ReadImageData, &RunMessageLoop, &QuitMessageLoop, @@ -336,10 +336,8 @@ const void* InternalGetInterface(const char* name) { // in production code. if (CommandLine::ForCurrentProcess()->HasSwitch( switches::kEnablePepperTesting)) { - if (strcmp(name, PPB_TESTING_DEV_INTERFACE) == 0 || - strcmp(name, PPB_TESTING_DEV_INTERFACE_0_9) == 0) { + if (strcmp(name, PPB_TESTING_PRIVATE_INTERFACE) == 0) return &testing_interface; - } } return NULL; } diff --git a/ppapi/api/dev/ppb_testing_dev.idl b/ppapi/api/private/ppb_testing_private.idl index c114db0..98ddfc8 100644 --- a/ppapi/api/dev/ppb_testing_dev.idl +++ b/ppapi/api/private/ppb_testing_private.idl @@ -1,4 +1,4 @@ -/* Copyright (c) 2012 The Chromium Authors. All rights reserved. +/* Copyright 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. */ @@ -10,14 +10,10 @@ */ label Chrome { - M14 = 0.7, - M15 = 0.8, - M17 = 0.9, - M18 = 0.91, - M28 = 0.92 + M33 = 1.0 }; -interface PPB_Testing_Dev { +interface PPB_Testing_Private { /** * Reads the bitmap data out of the backing store for the given * DeviceContext2D and into the given image. If the data was successfully @@ -102,7 +98,6 @@ interface PPB_Testing_Dev { * slightly alter the mouse position, due to coordinate transforms it * performs. */ - [version=0.8] void SimulateInputEvent([in] PP_Instance instance, [in] PP_Resource input_event); @@ -113,7 +108,6 @@ interface PPB_Testing_Dev { * and fill in the components structure. This pointer may be NULL * to specify that no component information is necessary. */ - [version=0.9] PP_Var GetDocumentURL([in] PP_Instance instance, [out] PP_URLComponents_Dev components); @@ -125,7 +119,6 @@ interface PPB_Testing_Dev { * subset of |array_size| vars is written to |live_vars|. The reference count * of the returned PP_Vars will *not* be affected by this call. */ - [version=0.91] uint32_t GetLiveVars([size_as=array_size] PP_Var[] live_vars, [in] uint32_t array_size); @@ -136,7 +129,6 @@ interface PPB_Testing_Dev { * (in order to have fast tests). Passing a value of 0 resets the threshold * to its default. The threshold is in bytes. */ - [version=0.92] void SetMinimumArrayBufferSizeForShmem([in] PP_Instance instance, [in] uint32_t threshold); }; diff --git a/ppapi/c/dev/ppb_testing_dev.h b/ppapi/c/private/ppb_testing_private.h index e5078e2..889807d 100644 --- a/ppapi/c/dev/ppb_testing_dev.h +++ b/ppapi/c/private/ppb_testing_private.h @@ -1,12 +1,12 @@ -/* Copyright (c) 2012 The Chromium Authors. All rights reserved. +/* Copyright 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. */ -/* From dev/ppb_testing_dev.idl modified Thu Apr 18 13:22:09 2013. */ +/* From private/ppb_testing_private.idl modified Mon Nov 18 14:42:33 2013. */ -#ifndef PPAPI_C_DEV_PPB_TESTING_DEV_H_ -#define PPAPI_C_DEV_PPB_TESTING_DEV_H_ +#ifndef PPAPI_C_PRIVATE_PPB_TESTING_PRIVATE_H_ +#define PPAPI_C_PRIVATE_PPB_TESTING_PRIVATE_H_ #include "ppapi/c/dev/ppb_url_util_dev.h" #include "ppapi/c/pp_bool.h" @@ -17,12 +17,8 @@ #include "ppapi/c/pp_stdint.h" #include "ppapi/c/pp_var.h" -#define PPB_TESTING_DEV_INTERFACE_0_7 "PPB_Testing(Dev);0.7" -#define PPB_TESTING_DEV_INTERFACE_0_8 "PPB_Testing(Dev);0.8" -#define PPB_TESTING_DEV_INTERFACE_0_9 "PPB_Testing(Dev);0.9" -#define PPB_TESTING_DEV_INTERFACE_0_91 "PPB_Testing(Dev);0.91" -#define PPB_TESTING_DEV_INTERFACE_0_92 "PPB_Testing(Dev);0.92" -#define PPB_TESTING_DEV_INTERFACE PPB_TESTING_DEV_INTERFACE_0_92 +#define PPB_TESTING_PRIVATE_INTERFACE_1_0 "PPB_Testing_Private;1.0" +#define PPB_TESTING_PRIVATE_INTERFACE PPB_TESTING_PRIVATE_INTERFACE_1_0 /** * @file @@ -36,7 +32,7 @@ * @addtogroup Interfaces * @{ */ -struct PPB_Testing_Dev_0_92 { +struct PPB_Testing_Private_1_0 { /** * Reads the bitmap data out of the backing store for the given * DeviceContext2D and into the given image. If the data was successfully @@ -146,58 +142,10 @@ struct PPB_Testing_Dev_0_92 { uint32_t threshold); }; -typedef struct PPB_Testing_Dev_0_92 PPB_Testing_Dev; - -struct PPB_Testing_Dev_0_7 { - PP_Bool (*ReadImageData)(PP_Resource device_context_2d, - PP_Resource image, - const struct PP_Point* top_left); - void (*RunMessageLoop)(PP_Instance instance); - void (*QuitMessageLoop)(PP_Instance instance); - uint32_t (*GetLiveObjectsForInstance)(PP_Instance instance); - PP_Bool (*IsOutOfProcess)(void); -}; - -struct PPB_Testing_Dev_0_8 { - PP_Bool (*ReadImageData)(PP_Resource device_context_2d, - PP_Resource image, - const struct PP_Point* top_left); - void (*RunMessageLoop)(PP_Instance instance); - void (*QuitMessageLoop)(PP_Instance instance); - uint32_t (*GetLiveObjectsForInstance)(PP_Instance instance); - PP_Bool (*IsOutOfProcess)(void); - void (*SimulateInputEvent)(PP_Instance instance, PP_Resource input_event); -}; - -struct PPB_Testing_Dev_0_9 { - PP_Bool (*ReadImageData)(PP_Resource device_context_2d, - PP_Resource image, - const struct PP_Point* top_left); - void (*RunMessageLoop)(PP_Instance instance); - void (*QuitMessageLoop)(PP_Instance instance); - uint32_t (*GetLiveObjectsForInstance)(PP_Instance instance); - PP_Bool (*IsOutOfProcess)(void); - void (*SimulateInputEvent)(PP_Instance instance, PP_Resource input_event); - struct PP_Var (*GetDocumentURL)(PP_Instance instance, - struct PP_URLComponents_Dev* components); -}; - -struct PPB_Testing_Dev_0_91 { - PP_Bool (*ReadImageData)(PP_Resource device_context_2d, - PP_Resource image, - const struct PP_Point* top_left); - void (*RunMessageLoop)(PP_Instance instance); - void (*QuitMessageLoop)(PP_Instance instance); - uint32_t (*GetLiveObjectsForInstance)(PP_Instance instance); - PP_Bool (*IsOutOfProcess)(void); - void (*SimulateInputEvent)(PP_Instance instance, PP_Resource input_event); - struct PP_Var (*GetDocumentURL)(PP_Instance instance, - struct PP_URLComponents_Dev* components); - uint32_t (*GetLiveVars)(struct PP_Var live_vars[], uint32_t array_size); -}; +typedef struct PPB_Testing_Private_1_0 PPB_Testing_Private; /** * @} */ -#endif /* PPAPI_C_DEV_PPB_TESTING_DEV_H_ */ +#endif /* PPAPI_C_PRIVATE_PPB_TESTING_PRIVATE_H_ */ diff --git a/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c b/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c index 4e3274e..8a6d7ba 100644 --- a/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c +++ b/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c @@ -23,7 +23,6 @@ #include "ppapi/c/dev/ppb_printing_dev.h" #include "ppapi/c/dev/ppb_resource_array_dev.h" #include "ppapi/c/dev/ppb_scrollbar_dev.h" -#include "ppapi/c/dev/ppb_testing_dev.h" #include "ppapi/c/dev/ppb_text_input_dev.h" #include "ppapi/c/dev/ppb_trace_event_dev.h" #include "ppapi/c/dev/ppb_truetype_font_dev.h" @@ -109,6 +108,7 @@ #include "ppapi/c/private/ppb_talk_private.h" #include "ppapi/c/private/ppb_tcp_server_socket_private.h" #include "ppapi/c/private/ppb_tcp_socket_private.h" +#include "ppapi/c/private/ppb_testing_private.h" #include "ppapi/c/private/ppb_udp_socket_private.h" #include "ppapi/c/private/ppb_uma_private.h" #include "ppapi/c/private/ppb_video_destination_private.h" @@ -187,9 +187,6 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_IMEInputEvent_Dev_0_1; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_IMEInputEvent_Dev_0_2; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_KeyboardInputEvent_Dev_0_2; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Printing_Dev_0_7; -static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Testing_Dev_0_9; -static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Testing_Dev_0_91; -static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Testing_Dev_0_92; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_TrueTypeFont_Dev_0_1; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_URLUtil_Dev_0_6; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_URLUtil_Dev_0_7; @@ -227,6 +224,7 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_TCPServerSocket_Private_0 static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_TCPSocket_Private_0_3; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_TCPSocket_Private_0_4; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_TCPSocket_Private_0_5; +static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Testing_Private_1_0; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_UDPSocket_Private_0_2; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_UDPSocket_Private_0_3; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_UDPSocket_Private_0_4; @@ -2015,142 +2013,6 @@ static int32_t Pnacl_M23_PPB_Printing_Dev_GetDefaultPrintSettings(PP_Resource re /* Not generating wrapper methods for PPB_Scrollbar_Dev_0_5 */ -/* Not generating wrapper methods for PPB_Testing_Dev_0_7 */ - -/* Not generating wrapper methods for PPB_Testing_Dev_0_8 */ - -/* Begin wrapper methods for PPB_Testing_Dev_0_9 */ - -static PP_Bool Pnacl_M17_PPB_Testing_Dev_ReadImageData(PP_Resource device_context_2d, PP_Resource image, const struct PP_Point* top_left) { - const struct PPB_Testing_Dev_0_9 *iface = Pnacl_WrapperInfo_PPB_Testing_Dev_0_9.real_iface; - return iface->ReadImageData(device_context_2d, image, top_left); -} - -static void Pnacl_M17_PPB_Testing_Dev_RunMessageLoop(PP_Instance instance) { - const struct PPB_Testing_Dev_0_9 *iface = Pnacl_WrapperInfo_PPB_Testing_Dev_0_9.real_iface; - iface->RunMessageLoop(instance); -} - -static void Pnacl_M17_PPB_Testing_Dev_QuitMessageLoop(PP_Instance instance) { - const struct PPB_Testing_Dev_0_9 *iface = Pnacl_WrapperInfo_PPB_Testing_Dev_0_9.real_iface; - iface->QuitMessageLoop(instance); -} - -static uint32_t Pnacl_M17_PPB_Testing_Dev_GetLiveObjectsForInstance(PP_Instance instance) { - const struct PPB_Testing_Dev_0_9 *iface = Pnacl_WrapperInfo_PPB_Testing_Dev_0_9.real_iface; - return iface->GetLiveObjectsForInstance(instance); -} - -static PP_Bool Pnacl_M17_PPB_Testing_Dev_IsOutOfProcess(void) { - const struct PPB_Testing_Dev_0_9 *iface = Pnacl_WrapperInfo_PPB_Testing_Dev_0_9.real_iface; - return iface->IsOutOfProcess(); -} - -static void Pnacl_M17_PPB_Testing_Dev_SimulateInputEvent(PP_Instance instance, PP_Resource input_event) { - const struct PPB_Testing_Dev_0_9 *iface = Pnacl_WrapperInfo_PPB_Testing_Dev_0_9.real_iface; - iface->SimulateInputEvent(instance, input_event); -} - -static void Pnacl_M17_PPB_Testing_Dev_GetDocumentURL(struct PP_Var* _struct_result, PP_Instance instance, struct PP_URLComponents_Dev* components) { - const struct PPB_Testing_Dev_0_9 *iface = Pnacl_WrapperInfo_PPB_Testing_Dev_0_9.real_iface; - *_struct_result = iface->GetDocumentURL(instance, components); -} - -/* End wrapper methods for PPB_Testing_Dev_0_9 */ - -/* Begin wrapper methods for PPB_Testing_Dev_0_91 */ - -static PP_Bool Pnacl_M18_PPB_Testing_Dev_ReadImageData(PP_Resource device_context_2d, PP_Resource image, const struct PP_Point* top_left) { - const struct PPB_Testing_Dev_0_91 *iface = Pnacl_WrapperInfo_PPB_Testing_Dev_0_91.real_iface; - return iface->ReadImageData(device_context_2d, image, top_left); -} - -static void Pnacl_M18_PPB_Testing_Dev_RunMessageLoop(PP_Instance instance) { - const struct PPB_Testing_Dev_0_91 *iface = Pnacl_WrapperInfo_PPB_Testing_Dev_0_91.real_iface; - iface->RunMessageLoop(instance); -} - -static void Pnacl_M18_PPB_Testing_Dev_QuitMessageLoop(PP_Instance instance) { - const struct PPB_Testing_Dev_0_91 *iface = Pnacl_WrapperInfo_PPB_Testing_Dev_0_91.real_iface; - iface->QuitMessageLoop(instance); -} - -static uint32_t Pnacl_M18_PPB_Testing_Dev_GetLiveObjectsForInstance(PP_Instance instance) { - const struct PPB_Testing_Dev_0_91 *iface = Pnacl_WrapperInfo_PPB_Testing_Dev_0_91.real_iface; - return iface->GetLiveObjectsForInstance(instance); -} - -static PP_Bool Pnacl_M18_PPB_Testing_Dev_IsOutOfProcess(void) { - const struct PPB_Testing_Dev_0_91 *iface = Pnacl_WrapperInfo_PPB_Testing_Dev_0_91.real_iface; - return iface->IsOutOfProcess(); -} - -static void Pnacl_M18_PPB_Testing_Dev_SimulateInputEvent(PP_Instance instance, PP_Resource input_event) { - const struct PPB_Testing_Dev_0_91 *iface = Pnacl_WrapperInfo_PPB_Testing_Dev_0_91.real_iface; - iface->SimulateInputEvent(instance, input_event); -} - -static void Pnacl_M18_PPB_Testing_Dev_GetDocumentURL(struct PP_Var* _struct_result, PP_Instance instance, struct PP_URLComponents_Dev* components) { - const struct PPB_Testing_Dev_0_91 *iface = Pnacl_WrapperInfo_PPB_Testing_Dev_0_91.real_iface; - *_struct_result = iface->GetDocumentURL(instance, components); -} - -static uint32_t Pnacl_M18_PPB_Testing_Dev_GetLiveVars(struct PP_Var live_vars[], uint32_t array_size) { - const struct PPB_Testing_Dev_0_91 *iface = Pnacl_WrapperInfo_PPB_Testing_Dev_0_91.real_iface; - return iface->GetLiveVars(live_vars, array_size); -} - -/* End wrapper methods for PPB_Testing_Dev_0_91 */ - -/* Begin wrapper methods for PPB_Testing_Dev_0_92 */ - -static PP_Bool Pnacl_M28_PPB_Testing_Dev_ReadImageData(PP_Resource device_context_2d, PP_Resource image, const struct PP_Point* top_left) { - const struct PPB_Testing_Dev_0_92 *iface = Pnacl_WrapperInfo_PPB_Testing_Dev_0_92.real_iface; - return iface->ReadImageData(device_context_2d, image, top_left); -} - -static void Pnacl_M28_PPB_Testing_Dev_RunMessageLoop(PP_Instance instance) { - const struct PPB_Testing_Dev_0_92 *iface = Pnacl_WrapperInfo_PPB_Testing_Dev_0_92.real_iface; - iface->RunMessageLoop(instance); -} - -static void Pnacl_M28_PPB_Testing_Dev_QuitMessageLoop(PP_Instance instance) { - const struct PPB_Testing_Dev_0_92 *iface = Pnacl_WrapperInfo_PPB_Testing_Dev_0_92.real_iface; - iface->QuitMessageLoop(instance); -} - -static uint32_t Pnacl_M28_PPB_Testing_Dev_GetLiveObjectsForInstance(PP_Instance instance) { - const struct PPB_Testing_Dev_0_92 *iface = Pnacl_WrapperInfo_PPB_Testing_Dev_0_92.real_iface; - return iface->GetLiveObjectsForInstance(instance); -} - -static PP_Bool Pnacl_M28_PPB_Testing_Dev_IsOutOfProcess(void) { - const struct PPB_Testing_Dev_0_92 *iface = Pnacl_WrapperInfo_PPB_Testing_Dev_0_92.real_iface; - return iface->IsOutOfProcess(); -} - -static void Pnacl_M28_PPB_Testing_Dev_SimulateInputEvent(PP_Instance instance, PP_Resource input_event) { - const struct PPB_Testing_Dev_0_92 *iface = Pnacl_WrapperInfo_PPB_Testing_Dev_0_92.real_iface; - iface->SimulateInputEvent(instance, input_event); -} - -static void Pnacl_M28_PPB_Testing_Dev_GetDocumentURL(struct PP_Var* _struct_result, PP_Instance instance, struct PP_URLComponents_Dev* components) { - const struct PPB_Testing_Dev_0_92 *iface = Pnacl_WrapperInfo_PPB_Testing_Dev_0_92.real_iface; - *_struct_result = iface->GetDocumentURL(instance, components); -} - -static uint32_t Pnacl_M28_PPB_Testing_Dev_GetLiveVars(struct PP_Var live_vars[], uint32_t array_size) { - const struct PPB_Testing_Dev_0_92 *iface = Pnacl_WrapperInfo_PPB_Testing_Dev_0_92.real_iface; - return iface->GetLiveVars(live_vars, array_size); -} - -static void Pnacl_M28_PPB_Testing_Dev_SetMinimumArrayBufferSizeForShmem(PP_Instance instance, uint32_t threshold) { - const struct PPB_Testing_Dev_0_92 *iface = Pnacl_WrapperInfo_PPB_Testing_Dev_0_92.real_iface; - iface->SetMinimumArrayBufferSizeForShmem(instance, threshold); -} - -/* End wrapper methods for PPB_Testing_Dev_0_92 */ - /* Not generating wrapper methods for PPB_TextInput_Dev_0_1 */ /* Not generating wrapper methods for PPB_TextInput_Dev_0_2 */ @@ -3586,6 +3448,55 @@ static int32_t Pnacl_M27_PPB_TCPSocket_Private_SetOption(PP_Resource tcp_socket, /* End wrapper methods for PPB_TCPSocket_Private_0_5 */ +/* Begin wrapper methods for PPB_Testing_Private_1_0 */ + +static PP_Bool Pnacl_M33_PPB_Testing_Private_ReadImageData(PP_Resource device_context_2d, PP_Resource image, const struct PP_Point* top_left) { + const struct PPB_Testing_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_Testing_Private_1_0.real_iface; + return iface->ReadImageData(device_context_2d, image, top_left); +} + +static void Pnacl_M33_PPB_Testing_Private_RunMessageLoop(PP_Instance instance) { + const struct PPB_Testing_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_Testing_Private_1_0.real_iface; + iface->RunMessageLoop(instance); +} + +static void Pnacl_M33_PPB_Testing_Private_QuitMessageLoop(PP_Instance instance) { + const struct PPB_Testing_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_Testing_Private_1_0.real_iface; + iface->QuitMessageLoop(instance); +} + +static uint32_t Pnacl_M33_PPB_Testing_Private_GetLiveObjectsForInstance(PP_Instance instance) { + const struct PPB_Testing_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_Testing_Private_1_0.real_iface; + return iface->GetLiveObjectsForInstance(instance); +} + +static PP_Bool Pnacl_M33_PPB_Testing_Private_IsOutOfProcess(void) { + const struct PPB_Testing_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_Testing_Private_1_0.real_iface; + return iface->IsOutOfProcess(); +} + +static void Pnacl_M33_PPB_Testing_Private_SimulateInputEvent(PP_Instance instance, PP_Resource input_event) { + const struct PPB_Testing_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_Testing_Private_1_0.real_iface; + iface->SimulateInputEvent(instance, input_event); +} + +static void Pnacl_M33_PPB_Testing_Private_GetDocumentURL(struct PP_Var* _struct_result, PP_Instance instance, struct PP_URLComponents_Dev* components) { + const struct PPB_Testing_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_Testing_Private_1_0.real_iface; + *_struct_result = iface->GetDocumentURL(instance, components); +} + +static uint32_t Pnacl_M33_PPB_Testing_Private_GetLiveVars(struct PP_Var live_vars[], uint32_t array_size) { + const struct PPB_Testing_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_Testing_Private_1_0.real_iface; + return iface->GetLiveVars(live_vars, array_size); +} + +static void Pnacl_M33_PPB_Testing_Private_SetMinimumArrayBufferSizeForShmem(PP_Instance instance, uint32_t threshold) { + const struct PPB_Testing_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_Testing_Private_1_0.real_iface; + iface->SetMinimumArrayBufferSizeForShmem(instance, threshold); +} + +/* End wrapper methods for PPB_Testing_Private_1_0 */ + /* Begin wrapper methods for PPB_UDPSocket_Private_0_2 */ static PP_Resource Pnacl_M17_PPB_UDPSocket_Private_Create(PP_Instance instance_id) { @@ -4655,43 +4566,6 @@ struct PPB_Printing_Dev_0_7 Pnacl_Wrappers_PPB_Printing_Dev_0_7 = { /* Not generating wrapper interface for PPB_Scrollbar_Dev_0_5 */ -/* Not generating wrapper interface for PPB_Testing_Dev_0_7 */ - -/* Not generating wrapper interface for PPB_Testing_Dev_0_8 */ - -struct PPB_Testing_Dev_0_9 Pnacl_Wrappers_PPB_Testing_Dev_0_9 = { - .ReadImageData = (PP_Bool (*)(PP_Resource device_context_2d, PP_Resource image, const struct PP_Point* top_left))&Pnacl_M17_PPB_Testing_Dev_ReadImageData, - .RunMessageLoop = (void (*)(PP_Instance instance))&Pnacl_M17_PPB_Testing_Dev_RunMessageLoop, - .QuitMessageLoop = (void (*)(PP_Instance instance))&Pnacl_M17_PPB_Testing_Dev_QuitMessageLoop, - .GetLiveObjectsForInstance = (uint32_t (*)(PP_Instance instance))&Pnacl_M17_PPB_Testing_Dev_GetLiveObjectsForInstance, - .IsOutOfProcess = (PP_Bool (*)(void))&Pnacl_M17_PPB_Testing_Dev_IsOutOfProcess, - .SimulateInputEvent = (void (*)(PP_Instance instance, PP_Resource input_event))&Pnacl_M17_PPB_Testing_Dev_SimulateInputEvent, - .GetDocumentURL = (struct PP_Var (*)(PP_Instance instance, struct PP_URLComponents_Dev* components))&Pnacl_M17_PPB_Testing_Dev_GetDocumentURL -}; - -struct PPB_Testing_Dev_0_91 Pnacl_Wrappers_PPB_Testing_Dev_0_91 = { - .ReadImageData = (PP_Bool (*)(PP_Resource device_context_2d, PP_Resource image, const struct PP_Point* top_left))&Pnacl_M18_PPB_Testing_Dev_ReadImageData, - .RunMessageLoop = (void (*)(PP_Instance instance))&Pnacl_M18_PPB_Testing_Dev_RunMessageLoop, - .QuitMessageLoop = (void (*)(PP_Instance instance))&Pnacl_M18_PPB_Testing_Dev_QuitMessageLoop, - .GetLiveObjectsForInstance = (uint32_t (*)(PP_Instance instance))&Pnacl_M18_PPB_Testing_Dev_GetLiveObjectsForInstance, - .IsOutOfProcess = (PP_Bool (*)(void))&Pnacl_M18_PPB_Testing_Dev_IsOutOfProcess, - .SimulateInputEvent = (void (*)(PP_Instance instance, PP_Resource input_event))&Pnacl_M18_PPB_Testing_Dev_SimulateInputEvent, - .GetDocumentURL = (struct PP_Var (*)(PP_Instance instance, struct PP_URLComponents_Dev* components))&Pnacl_M18_PPB_Testing_Dev_GetDocumentURL, - .GetLiveVars = (uint32_t (*)(struct PP_Var live_vars[], uint32_t array_size))&Pnacl_M18_PPB_Testing_Dev_GetLiveVars -}; - -struct PPB_Testing_Dev_0_92 Pnacl_Wrappers_PPB_Testing_Dev_0_92 = { - .ReadImageData = (PP_Bool (*)(PP_Resource device_context_2d, PP_Resource image, const struct PP_Point* top_left))&Pnacl_M28_PPB_Testing_Dev_ReadImageData, - .RunMessageLoop = (void (*)(PP_Instance instance))&Pnacl_M28_PPB_Testing_Dev_RunMessageLoop, - .QuitMessageLoop = (void (*)(PP_Instance instance))&Pnacl_M28_PPB_Testing_Dev_QuitMessageLoop, - .GetLiveObjectsForInstance = (uint32_t (*)(PP_Instance instance))&Pnacl_M28_PPB_Testing_Dev_GetLiveObjectsForInstance, - .IsOutOfProcess = (PP_Bool (*)(void))&Pnacl_M28_PPB_Testing_Dev_IsOutOfProcess, - .SimulateInputEvent = (void (*)(PP_Instance instance, PP_Resource input_event))&Pnacl_M28_PPB_Testing_Dev_SimulateInputEvent, - .GetDocumentURL = (struct PP_Var (*)(PP_Instance instance, struct PP_URLComponents_Dev* components))&Pnacl_M28_PPB_Testing_Dev_GetDocumentURL, - .GetLiveVars = (uint32_t (*)(struct PP_Var live_vars[], uint32_t array_size))&Pnacl_M28_PPB_Testing_Dev_GetLiveVars, - .SetMinimumArrayBufferSizeForShmem = (void (*)(PP_Instance instance, uint32_t threshold))&Pnacl_M28_PPB_Testing_Dev_SetMinimumArrayBufferSizeForShmem -}; - /* Not generating wrapper interface for PPB_TextInput_Dev_0_1 */ /* Not generating wrapper interface for PPB_TextInput_Dev_0_2 */ @@ -5098,6 +4972,18 @@ struct PPB_TCPSocket_Private_0_5 Pnacl_Wrappers_PPB_TCPSocket_Private_0_5 = { .SetOption = (int32_t (*)(PP_Resource tcp_socket, PP_TCPSocketOption_Private name, struct PP_Var value, struct PP_CompletionCallback callback))&Pnacl_M27_PPB_TCPSocket_Private_SetOption }; +struct PPB_Testing_Private_1_0 Pnacl_Wrappers_PPB_Testing_Private_1_0 = { + .ReadImageData = (PP_Bool (*)(PP_Resource device_context_2d, PP_Resource image, const struct PP_Point* top_left))&Pnacl_M33_PPB_Testing_Private_ReadImageData, + .RunMessageLoop = (void (*)(PP_Instance instance))&Pnacl_M33_PPB_Testing_Private_RunMessageLoop, + .QuitMessageLoop = (void (*)(PP_Instance instance))&Pnacl_M33_PPB_Testing_Private_QuitMessageLoop, + .GetLiveObjectsForInstance = (uint32_t (*)(PP_Instance instance))&Pnacl_M33_PPB_Testing_Private_GetLiveObjectsForInstance, + .IsOutOfProcess = (PP_Bool (*)(void))&Pnacl_M33_PPB_Testing_Private_IsOutOfProcess, + .SimulateInputEvent = (void (*)(PP_Instance instance, PP_Resource input_event))&Pnacl_M33_PPB_Testing_Private_SimulateInputEvent, + .GetDocumentURL = (struct PP_Var (*)(PP_Instance instance, struct PP_URLComponents_Dev* components))&Pnacl_M33_PPB_Testing_Private_GetDocumentURL, + .GetLiveVars = (uint32_t (*)(struct PP_Var live_vars[], uint32_t array_size))&Pnacl_M33_PPB_Testing_Private_GetLiveVars, + .SetMinimumArrayBufferSizeForShmem = (void (*)(PP_Instance instance, uint32_t threshold))&Pnacl_M33_PPB_Testing_Private_SetMinimumArrayBufferSizeForShmem +}; + struct PPB_UDPSocket_Private_0_2 Pnacl_Wrappers_PPB_UDPSocket_Private_0_2 = { .Create = (PP_Resource (*)(PP_Instance instance_id))&Pnacl_M17_PPB_UDPSocket_Private_Create, .IsUDPSocket = (PP_Bool (*)(PP_Resource resource_id))&Pnacl_M17_PPB_UDPSocket_Private_IsUDPSocket, @@ -5537,24 +5423,6 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Printing_Dev_0_7 = { .real_iface = NULL }; -static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Testing_Dev_0_9 = { - .iface_macro = PPB_TESTING_DEV_INTERFACE_0_9, - .wrapped_iface = (void *) &Pnacl_Wrappers_PPB_Testing_Dev_0_9, - .real_iface = NULL -}; - -static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Testing_Dev_0_91 = { - .iface_macro = PPB_TESTING_DEV_INTERFACE_0_91, - .wrapped_iface = (void *) &Pnacl_Wrappers_PPB_Testing_Dev_0_91, - .real_iface = NULL -}; - -static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Testing_Dev_0_92 = { - .iface_macro = PPB_TESTING_DEV_INTERFACE_0_92, - .wrapped_iface = (void *) &Pnacl_Wrappers_PPB_Testing_Dev_0_92, - .real_iface = NULL -}; - static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_TrueTypeFont_Dev_0_1 = { .iface_macro = PPB_TRUETYPEFONT_DEV_INTERFACE_0_1, .wrapped_iface = (void *) &Pnacl_Wrappers_PPB_TrueTypeFont_Dev_0_1, @@ -5777,6 +5645,12 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_TCPSocket_Private_0_5 = { .real_iface = NULL }; +static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Testing_Private_1_0 = { + .iface_macro = PPB_TESTING_PRIVATE_INTERFACE_1_0, + .wrapped_iface = (void *) &Pnacl_Wrappers_PPB_Testing_Private_1_0, + .real_iface = NULL +}; + static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_UDPSocket_Private_0_2 = { .iface_macro = PPB_UDPSOCKET_PRIVATE_INTERFACE_0_2, .wrapped_iface = (void *) &Pnacl_Wrappers_PPB_UDPSocket_Private_0_2, @@ -5905,9 +5779,6 @@ static struct __PnaclWrapperInfo *s_ppb_wrappers[] = { &Pnacl_WrapperInfo_PPB_IMEInputEvent_Dev_0_2, &Pnacl_WrapperInfo_PPB_KeyboardInputEvent_Dev_0_2, &Pnacl_WrapperInfo_PPB_Printing_Dev_0_7, - &Pnacl_WrapperInfo_PPB_Testing_Dev_0_9, - &Pnacl_WrapperInfo_PPB_Testing_Dev_0_91, - &Pnacl_WrapperInfo_PPB_Testing_Dev_0_92, &Pnacl_WrapperInfo_PPB_TrueTypeFont_Dev_0_1, &Pnacl_WrapperInfo_PPB_URLUtil_Dev_0_6, &Pnacl_WrapperInfo_PPB_URLUtil_Dev_0_7, @@ -5944,6 +5815,7 @@ static struct __PnaclWrapperInfo *s_ppb_wrappers[] = { &Pnacl_WrapperInfo_PPB_TCPSocket_Private_0_3, &Pnacl_WrapperInfo_PPB_TCPSocket_Private_0_4, &Pnacl_WrapperInfo_PPB_TCPSocket_Private_0_5, + &Pnacl_WrapperInfo_PPB_Testing_Private_1_0, &Pnacl_WrapperInfo_PPB_UDPSocket_Private_0_2, &Pnacl_WrapperInfo_PPB_UDPSocket_Private_0_3, &Pnacl_WrapperInfo_PPB_UDPSocket_Private_0_4, diff --git a/ppapi/native_client/tests/ppapi_test_lib/get_browser_interface.cc b/ppapi/native_client/tests/ppapi_test_lib/get_browser_interface.cc index 38ccf10..ea5a39f 100644 --- a/ppapi/native_client/tests/ppapi_test_lib/get_browser_interface.cc +++ b/ppapi/native_client/tests/ppapi_test_lib/get_browser_interface.cc @@ -6,7 +6,6 @@ #include "ppapi/c/dev/ppb_font_dev.h" #include "ppapi/c/dev/ppb_memory_dev.h" -#include "ppapi/c/dev/ppb_testing_dev.h" #include "ppapi/c/dev/ppb_var_deprecated.h" #include "ppapi/c/ppb_audio.h" #include "ppapi/c/ppb_audio_config.h" @@ -28,6 +27,7 @@ #include "ppapi/c/ppb_url_response_info.h" #include "ppapi/c/ppb_var.h" #include "ppapi/c/ppb_view.h" +#include "ppapi/c/private/ppb_testing_private.h" #include "ppapi/native_client/tests/ppapi_test_lib/get_browser_interface.h" #include "ppapi/native_client/tests/ppapi_test_lib/internal_utils.h" @@ -171,10 +171,9 @@ const PPB_Memory_Dev* PPBMemoryDev() { GetBrowserInterface(PPB_MEMORY_DEV_INTERFACE)); } -const PPB_Testing_Dev* PPBTestingDev() { - return reinterpret_cast<const PPB_Testing_Dev*>( - // Change to GetBrowserInterfaceSafe when moving out of dev. - GetBrowserInterface(PPB_TESTING_DEV_INTERFACE)); +const PPB_Testing_Private* PPBTestingPrivate() { + return reinterpret_cast<const PPB_Testing_Private*>( + GetBrowserInterface(PPB_TESTING_PRIVATE_INTERFACE)); } const PPB_View* PPBView() { diff --git a/ppapi/native_client/tests/ppapi_test_lib/get_browser_interface.h b/ppapi/native_client/tests/ppapi_test_lib/get_browser_interface.h index 82eae1c..c0aa389 100644 --- a/ppapi/native_client/tests/ppapi_test_lib/get_browser_interface.h +++ b/ppapi/native_client/tests/ppapi_test_lib/get_browser_interface.h @@ -30,7 +30,7 @@ #include "ppapi/c/ppb_view.h" #include "ppapi/c/dev/ppb_font_dev.h" #include "ppapi/c/dev/ppb_memory_dev.h" -#include "ppapi/c/dev/ppb_testing_dev.h" +#include "ppapi/c/private/ppb_testing_private.h" // Looks up the interface and returns its pointer or NULL. const void* GetBrowserInterface(const char* interface_name); @@ -73,6 +73,12 @@ const PPB_WheelInputEvent* PPBWheelInputEvent(); const PPB_Font_Dev* PPBFontDev(); const PPB_Memory_Dev* PPBMemoryDev(); -const PPB_Testing_Dev* PPBTestingDev(); + +// +// Private interfaces. +// Lookup returns NULL if the interface is not available. +// + +const PPB_Testing_Private* PPBTestingPrivate(); #endif // NATIVE_CLIENT_TESTS_PPAPI_TEST_PPB_TEMPLATE_GET_BROWSER_INTERFACE_H diff --git a/ppapi/native_client/tests/ppapi_test_lib/test_interface.cc b/ppapi/native_client/tests/ppapi_test_lib/test_interface.cc index 374ca79..4cc7952 100644 --- a/ppapi/native_client/tests/ppapi_test_lib/test_interface.cc +++ b/ppapi/native_client/tests/ppapi_test_lib/test_interface.cc @@ -22,7 +22,7 @@ #include "ppapi/c/ppb_instance.h" #include "ppapi/c/ppb_messaging.h" #include "ppapi/c/ppb_var.h" -#include "ppapi/c/dev/ppb_testing_dev.h" +#include "ppapi/c/private/ppb_testing_private.h" #include "ppapi/native_client/tests/ppapi_test_lib/get_browser_interface.h" #include "ppapi/native_client/tests/ppapi_test_lib/internal_utils.h" @@ -224,7 +224,8 @@ bool IsImageRectOnScreen(PP_Resource graphics2d, (origin.x + size.width) <= stride && (origin.y + size.height) <= image_desc.size.height); - CHECK(PP_TRUE == PPBTestingDev()->ReadImageData(graphics2d, image, &kOrigin)); + CHECK(PP_TRUE == PPBTestingPrivate()->ReadImageData( + graphics2d, image, &kOrigin)); bool found_error = false; for (int y = origin.y; y < origin.y + size.height && !found_error; y++) { for (int x = origin.x; x < origin.x + size.width && !found_error; x++) { diff --git a/ppapi/native_client/tests/ppapi_test_lib/testable_callback.cc b/ppapi/native_client/tests/ppapi_test_lib/testable_callback.cc index 6f65b66..f353d53 100644 --- a/ppapi/native_client/tests/ppapi_test_lib/testable_callback.cc +++ b/ppapi/native_client/tests/ppapi_test_lib/testable_callback.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. -#include "ppapi/c/dev/ppb_testing_dev.h" #include "ppapi/c/pp_errors.h" +#include "ppapi/c/private/ppb_testing_private.h" #include "ppapi/native_client/tests/ppapi_test_lib/get_browser_interface.h" #include "ppapi/native_client/tests/ppapi_test_lib/testable_callback.h" @@ -23,7 +23,7 @@ int32_t TestableCallback::WaitForResult() { // This waits until PPBTestingDev()->QuitMessageLoop() is called // by the "Handler" which represents the actual callback code. - PPBTestingDev()->RunMessageLoop(instance_); + PPBTestingPrivate()->RunMessageLoop(instance_); } have_result_ = false; return result_; @@ -48,6 +48,6 @@ void TestableCallback::Handler(void* user_data, int32_t result) { ++callback->run_count_; if (callback->post_quit_task_) { callback->post_quit_task_ = false; - PPBTestingDev()->QuitMessageLoop(callback->instance_); + PPBTestingPrivate()->QuitMessageLoop(callback->instance_); } } diff --git a/ppapi/ppapi_sources.gypi b/ppapi/ppapi_sources.gypi index 78450d1..abbedb8 100644 --- a/ppapi/ppapi_sources.gypi +++ b/ppapi/ppapi_sources.gypi @@ -82,7 +82,6 @@ 'c/dev/ppb_printing_dev.h', 'c/dev/ppb_resource_array_dev.h', 'c/dev/ppb_scrollbar_dev.h', - 'c/dev/ppb_testing_dev.h', 'c/dev/ppb_text_input_dev.h', 'c/dev/ppb_truetype_font_dev.h', 'c/dev/ppb_url_util_dev.h', @@ -121,7 +120,7 @@ 'c/private/ppb_pdf.h', 'c/private/ppb_platform_verification_private.h', 'c/private/ppb_proxy_private.h', - 'c/private/ppp_instance_private.h', + 'c/private/ppb_testing_private.h', 'c/private/ppb_tcp_server_socket_private.h', 'c/private/ppb_tcp_socket_private.h', 'c/private/ppb_udp_socket_private.h', @@ -129,6 +128,7 @@ 'c/private/ppb_video_source_private.h', 'c/private/ppb_x509_certificate_private.h', 'c/private/ppp_content_decryptor_private.h', + 'c/private/ppp_instance_private.h', # Deprecated interfaces. 'c/dev/deprecated_bool.h', diff --git a/ppapi/proxy/interface_list.cc b/ppapi/proxy/interface_list.cc index 99903a3..f609855 100644 --- a/ppapi/proxy/interface_list.cc +++ b/ppapi/proxy/interface_list.cc @@ -21,7 +21,6 @@ #include "ppapi/c/dev/ppb_opengles2ext_dev.h" #include "ppapi/c/dev/ppb_printing_dev.h" #include "ppapi/c/dev/ppb_resource_array_dev.h" -#include "ppapi/c/dev/ppb_testing_dev.h" #include "ppapi/c/dev/ppb_text_input_dev.h" #include "ppapi/c/dev/ppb_trace_event_dev.h" #include "ppapi/c/dev/ppb_truetype_font_dev.h" @@ -89,6 +88,7 @@ #include "ppapi/c/private/ppb_talk_private.h" #include "ppapi/c/private/ppb_tcp_server_socket_private.h" #include "ppapi/c/private/ppb_tcp_socket_private.h" +#include "ppapi/c/private/ppb_testing_private.h" #include "ppapi/c/private/ppb_udp_socket_private.h" #include "ppapi/c/private/ppb_video_destination_private.h" #include "ppapi/c/private/ppb_video_source_private.h" diff --git a/ppapi/proxy/ppb_testing_proxy.cc b/ppapi/proxy/ppb_testing_proxy.cc index f80e60c..e4602e8 100644 --- a/ppapi/proxy/ppb_testing_proxy.cc +++ b/ppapi/proxy/ppb_testing_proxy.cc @@ -5,7 +5,7 @@ #include "ppapi/proxy/ppb_testing_proxy.h" #include "base/message_loop/message_loop.h" -#include "ppapi/c/dev/ppb_testing_dev.h" +#include "ppapi/c/private/ppb_testing_private.h" #include "ppapi/proxy/enter_proxy.h" #include "ppapi/proxy/plugin_dispatcher.h" #include "ppapi/proxy/ppapi_messages.h" @@ -127,7 +127,7 @@ void SetMinimumArrayBufferSizeForShmem(PP_Instance instance, API_ID_PPB_TESTING, threshold)); } -const PPB_Testing_Dev testing_interface = { +const PPB_Testing_Private testing_interface = { &ReadImageData, &RunMessageLoop, &QuitMessageLoop, @@ -149,8 +149,8 @@ PPB_Testing_Proxy::PPB_Testing_Proxy(Dispatcher* dispatcher) : InterfaceProxy(dispatcher), ppb_testing_impl_(NULL) { if (!dispatcher->IsPlugin()) { - ppb_testing_impl_ = static_cast<const PPB_Testing_Dev*>( - dispatcher->local_get_interface()(PPB_TESTING_DEV_INTERFACE)); + ppb_testing_impl_ = static_cast<const PPB_Testing_Private*>( + dispatcher->local_get_interface()(PPB_TESTING_PRIVATE_INTERFACE)); } } @@ -161,7 +161,7 @@ PPB_Testing_Proxy::~PPB_Testing_Proxy() { const InterfaceProxy::Info* PPB_Testing_Proxy::GetInfo() { static const Info info = { &testing_interface, - PPB_TESTING_DEV_INTERFACE, + PPB_TESTING_PRIVATE_INTERFACE, API_ID_PPB_TESTING, false, &CreateTestingProxy, diff --git a/ppapi/proxy/ppb_testing_proxy.h b/ppapi/proxy/ppb_testing_proxy.h index 61af47f..bee539a 100644 --- a/ppapi/proxy/ppb_testing_proxy.h +++ b/ppapi/proxy/ppb_testing_proxy.h @@ -8,7 +8,7 @@ #include "base/basictypes.h" #include "ppapi/c/pp_instance.h" #include "ppapi/c/pp_resource.h" -#include "ppapi/c/dev/ppb_testing_dev.h" +#include "ppapi/c/private/ppb_testing_private.h" #include "ppapi/proxy/interface_proxy.h" #include "ppapi/shared_impl/host_resource.h" @@ -46,7 +46,7 @@ class PPB_Testing_Proxy : public InterfaceProxy { // When this proxy is in the host side, this value caches the interface // pointer so we don't have to retrieve it from the dispatcher each time. // In the plugin, this value is always NULL. - const PPB_Testing_Dev* ppb_testing_impl_; + const PPB_Testing_Private* ppb_testing_impl_; DISALLOW_COPY_AND_ASSIGN(PPB_Testing_Proxy); }; diff --git a/ppapi/shared_impl/var_tracker.h b/ppapi/shared_impl/var_tracker.h index 4856766..a63c7437 100644 --- a/ppapi/shared_impl/var_tracker.h +++ b/ppapi/shared_impl/var_tracker.h @@ -114,8 +114,8 @@ class PPAPI_SHARED_EXPORT VarTracker { // does not exist, returns NULL. virtual ResourceVar* MakeResourceVar(PP_Resource pp_resource) = 0; - // Return a vector containing all PP_Vars that are in the tracker. This is - // to help implement PPB_Testing_Dev.GetLiveVars and should generally not be + // Return a vector containing all PP_Vars that are in the tracker. This is to + // help implement PPB_Testing_Private.GetLiveVars and should generally not be // used in production code. The PP_Vars are returned in no particular order, // and their reference counts are unaffected. std::vector<PP_Var> GetLiveVars(); diff --git a/ppapi/tests/all_c_includes.h b/ppapi/tests/all_c_includes.h index 76f9396..e89f4d1 100644 --- a/ppapi/tests/all_c_includes.h +++ b/ppapi/tests/all_c_includes.h @@ -25,7 +25,6 @@ #include "ppapi/c/dev/ppb_printing_dev.h" #include "ppapi/c/dev/ppb_resource_array_dev.h" #include "ppapi/c/dev/ppb_scrollbar_dev.h" -#include "ppapi/c/dev/ppb_testing_dev.h" #include "ppapi/c/dev/ppb_text_input_dev.h" #include "ppapi/c/dev/ppb_trace_event_dev.h" #include "ppapi/c/dev/ppb_truetype_font_dev.h" @@ -122,6 +121,7 @@ #include "ppapi/c/private/ppb_platform_verification_private.h" #include "ppapi/c/private/ppb_proxy_private.h" #include "ppapi/c/private/ppb_tcp_socket_private.h" +#include "ppapi/c/private/ppb_testing_private.h" #include "ppapi/c/private/ppb_udp_socket_private.h" #include "ppapi/c/private/ppb_uma_private.h" #include "ppapi/c/private/ppb_video_destination_private.h" diff --git a/ppapi/tests/test_browser_font.cc b/ppapi/tests/test_browser_font.cc index 973f19f..689b421 100644 --- a/ppapi/tests/test_browser_font.cc +++ b/ppapi/tests/test_browser_font.cc @@ -31,7 +31,7 @@ void TestBrowserFont::RunTests(const std::string& filter) { // Just tests that GetFontFamilies is hooked up & returns something. std::string TestBrowserFont::TestFontFamilies() { // This function is only supported out-of-process. - const PPB_Testing_Dev* testing_interface = GetTestingInterface(); + const PPB_Testing_Private* testing_interface = GetTestingInterface(); if (testing_interface && !testing_interface->IsOutOfProcess()) PASS(); diff --git a/ppapi/tests/test_case.cc b/ppapi/tests/test_case.cc index 196798b..696a514 100644 --- a/ppapi/tests/test_case.cc +++ b/ppapi/tests/test_case.cc @@ -254,13 +254,14 @@ void TestCase::DoQuitMainMessageLoop(void* pp_instance, int32_t result) { delete instance; } -void TestCase::RunOnThreadInternal(void (*thread_func)(void*), - void* thread_param, - const PPB_Testing_Dev* testing_interface) { - PP_ThreadType thread; - PP_CreateThread(&thread, thread_func, thread_param); - // Run a message loop so pepper calls can be dispatched. The background - // thread will set result_ and make us Quit when it's done. - testing_interface->RunMessageLoop(instance_->pp_instance()); - PP_JoinThread(thread); +void TestCase::RunOnThreadInternal( + void (*thread_func)(void*), + void* thread_param, + const PPB_Testing_Private* testing_interface) { + PP_ThreadType thread; + PP_CreateThread(&thread, thread_func, thread_param); + // Run a message loop so pepper calls can be dispatched. The background + // thread will set result_ and make us Quit when it's done. + testing_interface->RunMessageLoop(instance_->pp_instance()); + PP_JoinThread(thread); } diff --git a/ppapi/tests/test_case.h b/ppapi/tests/test_case.h index 9a3c31f..0a96c9b 100644 --- a/ppapi/tests/test_case.h +++ b/ppapi/tests/test_case.h @@ -11,9 +11,9 @@ #include <set> #include <string> -#include "ppapi/c/dev/ppb_testing_dev.h" #include "ppapi/c/pp_resource.h" #include "ppapi/c/pp_time.h" +#include "ppapi/c/private/ppb_testing_private.h" #include "ppapi/cpp/dev/scrollbar_dev.h" #include "ppapi/cpp/message_loop.h" #include "ppapi/cpp/view.h" @@ -84,7 +84,7 @@ class TestCase { TestingInstance* instance() { return instance_; } - const PPB_Testing_Dev* testing_interface() { return testing_interface_; } + const PPB_Testing_Private* testing_interface() { return testing_interface_; } static void QuitMainMessageLoop(PP_Instance instance); @@ -157,7 +157,7 @@ class TestCase { TestingInstance* instance_; // NULL unless InitTestingInterface is called. - const PPB_Testing_Dev* testing_interface_; + const PPB_Testing_Private* testing_interface_; void set_callback_type(CallbackType callback_type) { callback_type_ = callback_type; @@ -213,7 +213,7 @@ class TestCase { // for it to complete using RunMessageLoop(), then joins. void RunOnThreadInternal(void (*thread_func)(void*), void* thread_param, - const PPB_Testing_Dev* testing_interface); + const PPB_Testing_Private* testing_interface); static void DoQuitMainMessageLoop(void* pp_instance, int32_t result); diff --git a/ppapi/tests/test_file_io.cc b/ppapi/tests/test_file_io.cc index 92b760e..f699ba1 100644 --- a/ppapi/tests/test_file_io.cc +++ b/ppapi/tests/test_file_io.cc @@ -13,10 +13,10 @@ #include <vector> -#include "ppapi/c/dev/ppb_testing_dev.h" #include "ppapi/c/pp_errors.h" #include "ppapi/c/ppb_file_io.h" #include "ppapi/c/private/pp_file_handle.h" +#include "ppapi/c/private/ppb_testing_private.h" #include "ppapi/cpp/file_io.h" #include "ppapi/cpp/file_ref.h" #include "ppapi/cpp/file_system.h" diff --git a/ppapi/tests/test_file_ref.cc b/ppapi/tests/test_file_ref.cc index 054ee24..0a10a32 100644 --- a/ppapi/tests/test_file_ref.cc +++ b/ppapi/tests/test_file_ref.cc @@ -11,7 +11,7 @@ #include "ppapi/c/pp_errors.h" #include "ppapi/c/ppb_file_io.h" -#include "ppapi/c/dev/ppb_testing_dev.h" +#include "ppapi/c/private/ppb_testing_private.h" #include "ppapi/cpp/directory_entry.h" #include "ppapi/cpp/file_io.h" #include "ppapi/cpp/file_ref.h" diff --git a/ppapi/tests/test_flash_fullscreen.cc b/ppapi/tests/test_flash_fullscreen.cc index 819ffab..4d17f19 100644 --- a/ppapi/tests/test_flash_fullscreen.cc +++ b/ppapi/tests/test_flash_fullscreen.cc @@ -8,7 +8,6 @@ #include <string.h> #include <string> -#include "ppapi/c/dev/ppb_testing_dev.h" #include "ppapi/c/private/ppb_flash_fullscreen.h" #include "ppapi/cpp/graphics_2d.h" #include "ppapi/cpp/instance.h" diff --git a/ppapi/tests/test_fullscreen.cc b/ppapi/tests/test_fullscreen.cc index 8651b74..1d57dd4 100644 --- a/ppapi/tests/test_fullscreen.cc +++ b/ppapi/tests/test_fullscreen.cc @@ -8,7 +8,6 @@ #include <string.h> #include <string> -#include "ppapi/c/dev/ppb_testing_dev.h" #include "ppapi/c/ppb_fullscreen.h" #include "ppapi/cpp/image_data.h" #include "ppapi/cpp/input_event.h" diff --git a/ppapi/tests/test_graphics_2d.cc b/ppapi/tests/test_graphics_2d.cc index 9cb69dc..5bb66d7 100644 --- a/ppapi/tests/test_graphics_2d.cc +++ b/ppapi/tests/test_graphics_2d.cc @@ -9,7 +9,6 @@ #include <set> -#include "ppapi/c/dev/ppb_testing_dev.h" #include "ppapi/c/pp_errors.h" #include "ppapi/c/ppb_graphics_2d.h" #include "ppapi/cpp/completion_callback.h" diff --git a/ppapi/tests/test_graphics_3d.cc b/ppapi/tests/test_graphics_3d.cc index 8c1bdc1..6b26d45 100644 --- a/ppapi/tests/test_graphics_3d.cc +++ b/ppapi/tests/test_graphics_3d.cc @@ -10,7 +10,6 @@ #include <stdlib.h> #include <string.h> -#include "ppapi/c/dev/ppb_testing_dev.h" #include "ppapi/c/ppb_opengles2.h" #include "ppapi/cpp/graphics_3d.h" #include "ppapi/cpp/module.h" diff --git a/ppapi/tests/test_ime_input_event.cc b/ppapi/tests/test_ime_input_event.cc index c28a044..fdb51c2 100644 --- a/ppapi/tests/test_ime_input_event.cc +++ b/ppapi/tests/test_ime_input_event.cc @@ -4,7 +4,6 @@ #include "ppapi/tests/test_ime_input_event.h" -#include "ppapi/c/dev/ppb_testing_dev.h" #include "ppapi/c/pp_errors.h" #include "ppapi/c/ppb_input_event.h" #include "ppapi/cpp/input_event.h" diff --git a/ppapi/tests/test_input_event.cc b/ppapi/tests/test_input_event.cc index 9b138ff..34ad680 100644 --- a/ppapi/tests/test_input_event.cc +++ b/ppapi/tests/test_input_event.cc @@ -4,7 +4,6 @@ #include "ppapi/tests/test_input_event.h" -#include "ppapi/c/dev/ppb_testing_dev.h" #include "ppapi/c/pp_errors.h" #include "ppapi/c/ppb_input_event.h" #include "ppapi/cpp/input_event.h" diff --git a/ppapi/tests/test_input_event.h b/ppapi/tests/test_input_event.h index 54cf2f9..3b89368 100644 --- a/ppapi/tests/test_input_event.h +++ b/ppapi/tests/test_input_event.h @@ -9,7 +9,7 @@ #include <vector> #include "ppapi/c/ppb_input_event.h" -#include "ppapi/c/dev/ppb_testing_dev.h" +#include "ppapi/c/private/ppb_testing_private.h" #include "ppapi/cpp/input_event.h" #include "ppapi/cpp/point.h" #include "ppapi/cpp/rect.h" diff --git a/ppapi/tests/test_instance_deprecated.cc b/ppapi/tests/test_instance_deprecated.cc index b69f427..1fd99e1 100644 --- a/ppapi/tests/test_instance_deprecated.cc +++ b/ppapi/tests/test_instance_deprecated.cc @@ -35,7 +35,7 @@ class InstanceSO : public pp::deprecated::ScriptableObject { // For out-of-process, the InstanceSO might be deleted after the instance was // already destroyed, so we can't rely on test_instance_->testing_interface() // being valid. Therefore we store our own. - const PPB_Testing_Dev* testing_interface_; + const PPB_Testing_Private* testing_interface_; }; InstanceSO::InstanceSO(TestInstance* i) diff --git a/ppapi/tests/test_memory.cc b/ppapi/tests/test_memory.cc index ea612a4..9073227 100644 --- a/ppapi/tests/test_memory.cc +++ b/ppapi/tests/test_memory.cc @@ -4,7 +4,6 @@ #include "ppapi/tests/test_memory.h" -#include "ppapi/c/dev/ppb_testing_dev.h" #include "ppapi/c/dev/ppb_memory_dev.h" #include "ppapi/cpp/instance.h" #include "ppapi/cpp/module.h" diff --git a/ppapi/tests/test_post_message.cc b/ppapi/tests/test_post_message.cc index df126c7..5cd4200 100644 --- a/ppapi/tests/test_post_message.cc +++ b/ppapi/tests/test_post_message.cc @@ -9,7 +9,6 @@ #include <map> #include <sstream> -#include "ppapi/c/dev/ppb_testing_dev.h" #include "ppapi/c/pp_var.h" #include "ppapi/c/ppb_file_io.h" #include "ppapi/cpp/dev/var_resource_dev.h" @@ -128,7 +127,7 @@ bool VarsEqual(const pp::Var& expected, class ScopedArrayBufferSizeSetter { public: - ScopedArrayBufferSizeSetter(const PPB_Testing_Dev* interface, + ScopedArrayBufferSizeSetter(const PPB_Testing_Private* interface, PP_Instance instance, uint32_t threshold) : interface_(interface), @@ -139,7 +138,7 @@ class ScopedArrayBufferSizeSetter { interface_->SetMinimumArrayBufferSizeForShmem(instance_, 0); } private: - const PPB_Testing_Dev* interface_; + const PPB_Testing_Private* interface_; PP_Instance instance_; }; diff --git a/ppapi/tests/test_scrollbar.cc b/ppapi/tests/test_scrollbar.cc index cde40a7..5bf3cf3 100644 --- a/ppapi/tests/test_scrollbar.cc +++ b/ppapi/tests/test_scrollbar.cc @@ -6,7 +6,6 @@ #include <cstring> -#include "ppapi/c/dev/ppb_testing_dev.h" #include "ppapi/c/pp_input_event.h" #include "ppapi/cpp/input_event.h" #include "ppapi/cpp/instance.h" diff --git a/ppapi/tests/test_talk_private.cc b/ppapi/tests/test_talk_private.cc index 3af0ff3..aa2b5c0 100644 --- a/ppapi/tests/test_talk_private.cc +++ b/ppapi/tests/test_talk_private.cc @@ -8,7 +8,6 @@ #include <string.h> #include <string> -#include "ppapi/c/dev/ppb_testing_dev.h" #include "ppapi/c/pp_errors.h" #include "ppapi/c/private/ppb_talk_private.h" #include "ppapi/cpp/instance.h" diff --git a/ppapi/tests/test_truetype_font.cc b/ppapi/tests/test_truetype_font.cc index 1cb8c49..2295fe0 100644 --- a/ppapi/tests/test_truetype_font.cc +++ b/ppapi/tests/test_truetype_font.cc @@ -10,7 +10,7 @@ #include <algorithm> #include <limits> -#include "ppapi/c/dev/ppb_testing_dev.h" +#include "ppapi/c/private/ppb_testing_private.h" #include "ppapi/cpp/completion_callback.h" #include "ppapi/cpp/dev/truetype_font_dev.h" #include "ppapi/cpp/instance.h" diff --git a/ppapi/tests/test_url_loader.cc b/ppapi/tests/test_url_loader.cc index c268eb0..835588e 100644 --- a/ppapi/tests/test_url_loader.cc +++ b/ppapi/tests/test_url_loader.cc @@ -8,7 +8,6 @@ #include <string.h> #include <string> -#include "ppapi/c/dev/ppb_testing_dev.h" #include "ppapi/c/pp_errors.h" #include "ppapi/c/ppb_file_io.h" #include "ppapi/c/ppb_url_loader.h" diff --git a/ppapi/tests/test_url_request.cc b/ppapi/tests/test_url_request.cc index 05a7bba..febc867 100644 --- a/ppapi/tests/test_url_request.cc +++ b/ppapi/tests/test_url_request.cc @@ -9,7 +9,6 @@ #include <string.h> #include <string> -#include "ppapi/c/dev/ppb_testing_dev.h" #include "ppapi/c/ppb_file_io.h" #include "ppapi/cpp/completion_callback.h" #include "ppapi/cpp/file_io.h" diff --git a/ppapi/tests/test_utils.cc b/ppapi/tests/test_utils.cc index eecbe7a..e091e68 100644 --- a/ppapi/tests/test_utils.cc +++ b/ppapi/tests/test_utils.cc @@ -36,10 +36,11 @@ bool IsBigEndian() { const int kActionTimeoutMs = 10000; -const PPB_Testing_Dev* GetTestingInterface() { - static const PPB_Testing_Dev* g_testing_interface = - static_cast<const PPB_Testing_Dev*>( - pp::Module::Get()->GetBrowserInterface(PPB_TESTING_DEV_INTERFACE)); +const PPB_Testing_Private* GetTestingInterface() { + static const PPB_Testing_Private* g_testing_interface = + static_cast<const PPB_Testing_Private*>( + pp::Module::Get()->GetBrowserInterface( + PPB_TESTING_PRIVATE_INTERFACE)); return g_testing_interface; } @@ -63,7 +64,7 @@ bool GetLocalHostPort(PP_Instance instance, std::string* host, uint16_t* port) { if (!host || !port) return false; - const PPB_Testing_Dev* testing = GetTestingInterface(); + const PPB_Testing_Private* testing = GetTestingInterface(); if (!testing) return false; diff --git a/ppapi/tests/test_utils.h b/ppapi/tests/test_utils.h index 4621c355..257bdcd 100644 --- a/ppapi/tests/test_utils.h +++ b/ppapi/tests/test_utils.h @@ -7,9 +7,9 @@ #include <string> -#include "ppapi/c/dev/ppb_testing_dev.h" #include "ppapi/c/pp_instance.h" #include "ppapi/c/pp_stdint.h" +#include "ppapi/c/private/ppb_testing_private.h" #include "ppapi/cpp/completion_callback.h" #include "ppapi/cpp/message_loop.h" #include "ppapi/utility/completion_callback_factory.h" @@ -21,7 +21,7 @@ class NetAddress; // Timeout to wait for some action to complete. extern const int kActionTimeoutMs; -const PPB_Testing_Dev* GetTestingInterface(); +const PPB_Testing_Private* GetTestingInterface(); std::string ReportError(const char* method, int32_t error); void PlatformSleep(int duration_ms); bool GetLocalHostPort(PP_Instance instance, std::string* host, uint16_t* port); diff --git a/ppapi/tests/test_var.cc b/ppapi/tests/test_var.cc index 0fedb13..714008a 100644 --- a/ppapi/tests/test_var.cc +++ b/ppapi/tests/test_var.cc @@ -8,7 +8,6 @@ #include <limits> -#include "ppapi/c/dev/ppb_testing_dev.h" #include "ppapi/c/pp_var.h" #include "ppapi/c/ppb_var.h" #include "ppapi/cpp/instance.h" diff --git a/ppapi/tests/test_var_deprecated.cc b/ppapi/tests/test_var_deprecated.cc index 23633ac..dbfa83e 100644 --- a/ppapi/tests/test_var_deprecated.cc +++ b/ppapi/tests/test_var_deprecated.cc @@ -9,7 +9,6 @@ #include <limits> #include "ppapi/c/pp_var.h" -#include "ppapi/c/dev/ppb_testing_dev.h" #include "ppapi/c/dev/ppb_var_deprecated.h" #include "ppapi/cpp/dev/scriptable_object_deprecated.h" #include "ppapi/cpp/instance.h" diff --git a/ppapi/tests/test_video_decoder.cc b/ppapi/tests/test_video_decoder.cc index 0cee794..dc36685 100644 --- a/ppapi/tests/test_video_decoder.cc +++ b/ppapi/tests/test_video_decoder.cc @@ -5,7 +5,6 @@ #include "ppapi/tests/test_video_decoder.h" #include "ppapi/c/dev/ppb_video_decoder_dev.h" -#include "ppapi/c/dev/ppb_testing_dev.h" #include "ppapi/c/pp_errors.h" #include "ppapi/c/ppb_var.h" #include "ppapi/tests/testing_instance.h" diff --git a/ppapi/tests/test_video_destination.cc b/ppapi/tests/test_video_destination.cc index 93f6f0b..b06abcb 100644 --- a/ppapi/tests/test_video_destination.cc +++ b/ppapi/tests/test_video_destination.cc @@ -10,7 +10,7 @@ #include <limits> #include <string> -#include "ppapi/c/dev/ppb_testing_dev.h" +#include "ppapi/c/private/ppb_testing_private.h" #include "ppapi/cpp/completion_callback.h" #include "ppapi/cpp/instance.h" #include "ppapi/cpp/private/video_destination_private.h" diff --git a/ppapi/tests/test_video_source.cc b/ppapi/tests/test_video_source.cc index 585558e..b6587f8 100644 --- a/ppapi/tests/test_video_source.cc +++ b/ppapi/tests/test_video_source.cc @@ -10,7 +10,7 @@ #include <algorithm> #include <limits> -#include "ppapi/c/dev/ppb_testing_dev.h" +#include "ppapi/c/private/ppb_testing_private.h" #include "ppapi/cpp/completion_callback.h" #include "ppapi/cpp/instance.h" #include "ppapi/cpp/private/video_frame_private.h" diff --git a/ppapi/tests/test_view.cc b/ppapi/tests/test_view.cc index 44b0225..29ab1a6 100644 --- a/ppapi/tests/test_view.cc +++ b/ppapi/tests/test_view.cc @@ -7,7 +7,7 @@ #include <sstream> #include "ppapi/c/pp_time.h" -#include "ppapi/c/dev/ppb_testing_dev.h" +#include "ppapi/c/private/ppb_testing_private.h" #include "ppapi/cpp/completion_callback.h" #include "ppapi/tests/testing_instance.h" diff --git a/ppapi/tests/test_websocket.cc b/ppapi/tests/test_websocket.cc index 3b654e2..d22da37 100644 --- a/ppapi/tests/test_websocket.cc +++ b/ppapi/tests/test_websocket.cc @@ -12,7 +12,6 @@ #include <string> #include <vector> -#include "ppapi/c/dev/ppb_testing_dev.h" #include "ppapi/c/pp_bool.h" #include "ppapi/c/pp_completion_callback.h" #include "ppapi/c/pp_errors.h" @@ -23,6 +22,7 @@ #include "ppapi/c/ppb_var.h" #include "ppapi/c/ppb_var_array_buffer.h" #include "ppapi/c/ppb_websocket.h" +#include "ppapi/c/private/ppb_testing_private.h" #include "ppapi/cpp/instance.h" #include "ppapi/cpp/module.h" #include "ppapi/cpp/var_array_buffer.h" |