diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-15 03:44:13 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-15 03:44:13 +0000 |
commit | 859a7f3a9264b3a2174e9625d6cfa20412ac6081 (patch) | |
tree | b9911798925fbff065346fa6c085b254d7fb2e55 /ppapi/proxy | |
parent | f615770cd0412b2524b8b4451e6518608af9abed (diff) | |
download | chromium_src-859a7f3a9264b3a2174e9625d6cfa20412ac6081.zip chromium_src-859a7f3a9264b3a2174e9625d6cfa20412ac6081.tar.gz chromium_src-859a7f3a9264b3a2174e9625d6cfa20412ac6081.tar.bz2 |
Make PP_Resources associated with the Instance rather than the module. This
adds PP_Instance to the necessary places in the API to make this possible.
String and Object vars used to be PP_Resources. But it is not practical to
assocaited strings with an instance since then we can't have implicit var
constructors and have to litter every string with an instance. So this changes
vars to use their own tracking system associated with the module (i.e. keeping
the current semantics) and making it no longer a resource. I made the internal
Var IDs 32 bits since Neb is about to land his 64->32 change.
Now it force-deletes resources associated with an instance when that instance
goes away. I added some additional code and tracking in ResourceTracker to do
this. I could then remove the Instance::Observer class since the resource can
use the (now renamed) StoppedTracking to know that it's being deleted in
response to the instance being destroyed.
TEST=ppapi ui tests
BUG=none
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71544 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy')
24 files changed, 146 insertions, 124 deletions
diff --git a/ppapi/proxy/plugin_var_tracker.cc b/ppapi/proxy/plugin_var_tracker.cc index f2bc5975..6ad396a 100644 --- a/ppapi/proxy/plugin_var_tracker.cc +++ b/ppapi/proxy/plugin_var_tracker.cc @@ -50,6 +50,12 @@ int64 PluginVarTracker::MakeString(const std::string& str) { return static_cast<int64>(reinterpret_cast<intptr_t>(out)); } +int64 PluginVarTracker::MakeString(const char* str, uint32_t len) { + RefCountedString* out = new RefCountedString(str, len); + out->AddRef(); + return static_cast<int64>(reinterpret_cast<intptr_t>(out)); +} + std::string PluginVarTracker::GetString(const PP_Var& var) const { return PluginStringFromID(var.value.as_id)->value(); } diff --git a/ppapi/proxy/plugin_var_tracker.h b/ppapi/proxy/plugin_var_tracker.h index 999f209..9a1b9ab 100644 --- a/ppapi/proxy/plugin_var_tracker.h +++ b/ppapi/proxy/plugin_var_tracker.h @@ -37,6 +37,7 @@ class PluginVarTracker { // Allocates a string and returns the ID of it. The refcount will be 1. int64_t MakeString(const std::string& str); + int64_t MakeString(const char* str, uint32_t len); // Returns the string associated with the given string var. The var must be // of type string and must be valid or this function will crash. diff --git a/ppapi/proxy/ppapi_messages_internal.h b/ppapi/proxy/ppapi_messages_internal.h index ca34ecf..6302bad 100644 --- a/ppapi/proxy/ppapi_messages_internal.h +++ b/ppapi/proxy/ppapi_messages_internal.h @@ -167,7 +167,7 @@ IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBAudio_StartOrStop, // PPB_AudioConfig. IPC_SYNC_MESSAGE_ROUTED3_1(PpapiHostMsg_PPBAudioConfig_Create, - PP_Module /* module */, + PP_Instance /* instance */, int32_t /* sample_rate */, uint32_t /* sample_frame_count */, PP_Resource /* result */) @@ -179,7 +179,7 @@ IPC_SYNC_MESSAGE_ROUTED2_1( // PPB_Buffer. IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBBuffer_Create, - PP_Module /* module */, + PP_Instance /* instance */, uint32_t /* size */, PP_Resource /* result_resource */, int32_t /* result_shm_handle */) @@ -189,20 +189,22 @@ IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBCore_AddRefResource, PP_Resource) IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBCore_ReleaseResource, PP_Resource) // PPB_CharSet. -IPC_SYNC_MESSAGE_ROUTED3_2(PpapiHostMsg_PPBCharSet_UTF16ToCharSet, +IPC_SYNC_MESSAGE_ROUTED4_2(PpapiHostMsg_PPBCharSet_UTF16ToCharSet, + PP_Instance /* instance */, string16 /* utf16 */, std::string /* char_set */, int32_t /* on_error */, std::string /* output */, bool /* output_is_success */) -IPC_SYNC_MESSAGE_ROUTED3_2(PpapiHostMsg_PPBCharSet_CharSetToUTF16, +IPC_SYNC_MESSAGE_ROUTED4_2(PpapiHostMsg_PPBCharSet_CharSetToUTF16, + PP_Instance /* instance */, std::string /* input */, std::string /* char_set */, int32_t /* on_error */, string16 /* output */, bool /* output_is_success */) IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBCharSet_GetDefaultCharSet, - PP_Module /* module */, + PP_Instance /* instance */, pp::proxy::SerializedVar /* result */) // PPB_CursorControl. @@ -235,37 +237,37 @@ IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBFlash_DrawGlyphs, pp::proxy::PPBFlash_DrawGlyphs_Params /* params */, bool /* result */) IPC_SYNC_MESSAGE_ROUTED2_1(PpapiHostMsg_PPBFlash_GetProxyForURL, - PP_Module /* module */, + PP_Instance /* instance */, std::string /* url */, pp::proxy::SerializedVar /* result */) IPC_SYNC_MESSAGE_ROUTED3_2(PpapiHostMsg_PPBFlash_OpenModuleLocalFile, - PP_Module /* module */, + PP_Instance /* instance */, std::string /* path */, int32_t /* mode */, IPC::PlatformFileForTransit /* file_handle */, int32_t /* result */) IPC_SYNC_MESSAGE_ROUTED3_1(PpapiHostMsg_PPBFlash_RenameModuleLocalFile, - PP_Module /* module */, + PP_Instance /* instance */, std::string /* path_from */, std::string /* path_to */, int32_t /* result */) IPC_SYNC_MESSAGE_ROUTED3_1(PpapiHostMsg_PPBFlash_DeleteModuleLocalFileOrDir, - PP_Module /* module */, + PP_Instance /* instance */, std::string /* path */, bool /* recursive */, int32_t /* result */) IPC_SYNC_MESSAGE_ROUTED2_1(PpapiHostMsg_PPBFlash_CreateModuleLocalDir, - PP_Module /* module */, + PP_Instance /* instance */, std::string /* path */, int32_t /* result */) IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBFlash_QueryModuleLocalFile, - PP_Module /* module */, + PP_Instance /* instance */, std::string /* path */, PP_FileInfo_Dev /* info */, int32_t /* result */) IPC_SYNC_MESSAGE_ROUTED2_2( PpapiHostMsg_PPBFlash_GetModuleLocalDirContents, - PP_Module /* module */, + PP_Instance /* instance */, std::string /* path */, std::vector<pp::proxy::SerializedDirEntry> /* entries */, int32_t /* result */) @@ -278,7 +280,7 @@ IPC_SYNC_MESSAGE_ROUTED3_1(PpapiHostMsg_PPBFlash_NavigateToURL, // PPB_Font. IPC_SYNC_MESSAGE_ROUTED2_3( PpapiHostMsg_PPBFont_Create, - PP_Module /* pp_module */, + PP_Instance /* instance */, pp::proxy::SerializedFontDescription /* in_description */, PP_Resource /* result */, pp::proxy::SerializedFontDescription /* out_description */, @@ -319,7 +321,7 @@ IPC_SYNC_MESSAGE_ROUTED2_1(PpapiHostMsg_PPBFullscreen_SetFullscreen, // PPB_Graphics2D. IPC_SYNC_MESSAGE_ROUTED3_1(PpapiHostMsg_PPBGraphics2D_Create, - PP_Module /* module */, + PP_Instance /* instance */, PP_Size /* size */, PP_Bool /* is_always_opaque */, PP_Resource /* result */) @@ -349,7 +351,7 @@ IPC_SYNC_MESSAGE_ROUTED1_1( int32 /* format */, PP_Bool /* result */) IPC_SYNC_MESSAGE_ROUTED4_3(PpapiHostMsg_PPBImageData_Create, - PP_Module /* module */, + PP_Instance /* instance */, int32 /* format */, PP_Size /* size */, PP_Bool /* init_to_zero */, @@ -379,7 +381,7 @@ IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBInstance_ExecuteScript, IPC_SYNC_MESSAGE_ROUTED3_1( PpapiHostMsg_PPBPDF_GetFontFileWithFallback, - PP_Module /* module */, + PP_Instance /* instance */, pp::proxy::SerializedFontDescription /* description */, int32_t /* charset */, PP_Resource /* result */) @@ -431,7 +433,7 @@ IPC_MESSAGE_ROUTED1(PpapiHostMsg_PPBURLLoaderTrusted_GrantUniversalAccess, // PPB_URLRequestInfo. IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBURLRequestInfo_Create, - PP_Module /* module */, + PP_Instance /* instance */, PP_Resource /* result */) IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBURLRequestInfo_SetProperty, PP_Resource /* request */, @@ -527,7 +529,7 @@ IPC_SYNC_MESSAGE_ROUTED2_2(PpapiHostMsg_PPBVar_IsInstanceOfDeprecated, int64 /* object-data */, PP_Bool /* result */) IPC_SYNC_MESSAGE_ROUTED3_1(PpapiHostMsg_PPBVar_CreateObjectDeprecated, - PP_Module /* module */, + PP_Instance /* instance */, int64 /* object_class */, int64 /* object_data */, pp::proxy::SerializedVar /* result */) diff --git a/ppapi/proxy/ppapi_param_traits.cc b/ppapi/proxy/ppapi_param_traits.cc index dbd527d..dbbc643 100644 --- a/ppapi/proxy/ppapi_param_traits.cc +++ b/ppapi/proxy/ppapi_param_traits.cc @@ -186,6 +186,7 @@ void ParamTraits<PP_Size>::Log(const param_type& p, std::string* l) { void ParamTraits<pp::proxy::PPBFlash_DrawGlyphs_Params>::Write( Message* m, const param_type& p) { + ParamTraits<PP_Instance>::Write(m, p.instance); ParamTraits<PP_Resource>::Write(m, p.pp_image_data); ParamTraits<pp::proxy::SerializedFontDescription>::Write(m, p.font_desc); ParamTraits<uint32_t>::Write(m, p.color); @@ -210,6 +211,7 @@ bool ParamTraits<pp::proxy::PPBFlash_DrawGlyphs_Params>::Read( void** iter, param_type* r) { return + ParamTraits<PP_Instance>::Read(m, iter, &r->instance) && ParamTraits<PP_Resource>::Read(m, iter, &r->pp_image_data) && ParamTraits<pp::proxy::SerializedFontDescription>::Read(m, iter, &r->font_desc) && diff --git a/ppapi/proxy/ppb_audio_config_proxy.cc b/ppapi/proxy/ppb_audio_config_proxy.cc index 1675217..0d0e6a7 100644 --- a/ppapi/proxy/ppb_audio_config_proxy.cc +++ b/ppapi/proxy/ppb_audio_config_proxy.cc @@ -35,12 +35,12 @@ class AudioConfig : public PluginResource { namespace { -PP_Resource CreateStereo16bit(PP_Module module_id, +PP_Resource CreateStereo16bit(PP_Instance instance, PP_AudioSampleRate sample_rate, uint32_t sample_frame_count) { PP_Resource result = 0; PluginDispatcher::Get()->Send(new PpapiHostMsg_PPBAudioConfig_Create( - INTERFACE_ID_PPB_AUDIO_CONFIG, module_id, + INTERFACE_ID_PPB_AUDIO_CONFIG, instance, static_cast<int32_t>(sample_rate), sample_frame_count, &result)); if (!result) @@ -120,12 +120,12 @@ bool PPB_AudioConfig_Proxy::OnMessageReceived(const IPC::Message& msg) { return handled; } -void PPB_AudioConfig_Proxy::OnMsgCreateStereo16Bit(PP_Module module, +void PPB_AudioConfig_Proxy::OnMsgCreateStereo16Bit(PP_Instance instance, int32_t sample_rate, uint32_t sample_frame_count, PP_Resource* result) { *result = ppb_audio_config_target()->CreateStereo16Bit( - module, static_cast<PP_AudioSampleRate>(sample_rate), + instance, static_cast<PP_AudioSampleRate>(sample_rate), sample_frame_count); } diff --git a/ppapi/proxy/ppb_audio_config_proxy.h b/ppapi/proxy/ppb_audio_config_proxy.h index 459d791..c5ef56d 100644 --- a/ppapi/proxy/ppb_audio_config_proxy.h +++ b/ppapi/proxy/ppb_audio_config_proxy.h @@ -6,7 +6,7 @@ #define PPAPI_PROXY_PPB_AUDIO_CONFIG_PROXY_H_ #include "base/basictypes.h" -#include "ppapi/c/pp_module.h" +#include "ppapi/c/pp_instance.h" #include "ppapi/c/pp_resource.h" #include "ppapi/proxy/interface_proxy.h" @@ -31,7 +31,7 @@ class PPB_AudioConfig_Proxy : public InterfaceProxy { private: // Message handlers. - void OnMsgCreateStereo16Bit(PP_Module module, + void OnMsgCreateStereo16Bit(PP_Instance instance, int32_t sample_rate, uint32_t sample_frame_count, PP_Resource* result); diff --git a/ppapi/proxy/ppb_buffer_proxy.cc b/ppapi/proxy/ppb_buffer_proxy.cc index 0015f5e..4963b7b 100644 --- a/ppapi/proxy/ppb_buffer_proxy.cc +++ b/ppapi/proxy/ppb_buffer_proxy.cc @@ -61,12 +61,12 @@ void Buffer::Unmap() { namespace { -PP_Resource Create(PP_Module module_id, uint32_t size) { +PP_Resource Create(PP_Instance instance, uint32_t size) { PP_Resource result = 0; int32_t shm_handle = -1; PluginDispatcher::Get()->Send( new PpapiHostMsg_PPBBuffer_Create( - INTERFACE_ID_PPB_BUFFER, module_id, size, + INTERFACE_ID_PPB_BUFFER, instance, size, &result, &shm_handle)); if (!result) return 0; @@ -141,11 +141,11 @@ bool PPB_Buffer_Proxy::OnMessageReceived(const IPC::Message& msg) { return handled; } -void PPB_Buffer_Proxy::OnMsgCreate(PP_Module module, +void PPB_Buffer_Proxy::OnMsgCreate(PP_Instance instance, uint32_t size, PP_Resource* result_resource, int* result_shm_handle) { - *result_resource = ppb_buffer_target()->Create(module, size); + *result_resource = ppb_buffer_target()->Create(instance, size); // TODO(brettw) set the shm handle from a trusted interface. *result_shm_handle = 0; } diff --git a/ppapi/proxy/ppb_buffer_proxy.h b/ppapi/proxy/ppb_buffer_proxy.h index ccd6721..bec74f7 100644 --- a/ppapi/proxy/ppb_buffer_proxy.h +++ b/ppapi/proxy/ppb_buffer_proxy.h @@ -5,7 +5,7 @@ #ifndef PPAPI_PPB_BUFFER_PROXY_H_ #define PPAPI_PPB_BUFFER_PROXY_H_ -#include "ppapi/c/pp_module.h" +#include "ppapi/c/pp_instance.h" #include "ppapi/proxy/interface_proxy.h" struct PPB_Buffer_Dev; @@ -29,7 +29,7 @@ class PPB_Buffer_Proxy : public InterfaceProxy { private: // Message handlers. - void OnMsgCreate(PP_Module module, + void OnMsgCreate(PP_Instance instance, uint32_t size, PP_Resource* result_resource, int* result_shm_handle); diff --git a/ppapi/proxy/ppb_char_set_proxy.cc b/ppapi/proxy/ppb_char_set_proxy.cc index ad65084..e0be4aa 100644 --- a/ppapi/proxy/ppb_char_set_proxy.cc +++ b/ppapi/proxy/ppb_char_set_proxy.cc @@ -15,14 +15,15 @@ namespace proxy { namespace { -char* UTF16ToCharSet(const uint16_t* utf16, uint32_t utf16_len, +char* UTF16ToCharSet(PP_Instance instance, + const uint16_t* utf16, uint32_t utf16_len, const char* output_char_set, PP_CharSet_ConversionError on_error, uint32_t* output_length) { bool output_is_success = false; std::string result; PluginDispatcher::Get()->Send(new PpapiHostMsg_PPBCharSet_UTF16ToCharSet( - INTERFACE_ID_PPB_CHAR_SET, + INTERFACE_ID_PPB_CHAR_SET, instance, string16(reinterpret_cast<const char16*>(utf16), utf16_len), std::string(output_char_set), static_cast<int32_t>(on_error), &result, &output_is_success)); @@ -35,14 +36,15 @@ char* UTF16ToCharSet(const uint16_t* utf16, uint32_t utf16_len, return ret_val; } -uint16_t* CharSetToUTF16(const char* input, uint32_t input_len, +uint16_t* CharSetToUTF16(PP_Instance instance, + const char* input, uint32_t input_len, const char* input_char_set, PP_CharSet_ConversionError on_error, uint32_t* output_length) { bool output_is_success = false; string16 result; PluginDispatcher::Get()->Send(new PpapiHostMsg_PPBCharSet_CharSetToUTF16( - INTERFACE_ID_PPB_CHAR_SET, + INTERFACE_ID_PPB_CHAR_SET, instance, std::string(input, input_len), std::string(input_char_set), static_cast<int32_t>(on_error), &result, &output_is_success)); @@ -56,10 +58,10 @@ uint16_t* CharSetToUTF16(const char* input, uint32_t input_len, return ret_val; } -PP_Var GetDefaultCharSet(PP_Module pp_module) { +PP_Var GetDefaultCharSet(PP_Instance instance) { ReceiveSerializedVarReturnValue result; PluginDispatcher::Get()->Send(new PpapiHostMsg_PPBCharSet_GetDefaultCharSet( - INTERFACE_ID_PPB_CHAR_SET, pp_module, &result)); + INTERFACE_ID_PPB_CHAR_SET, instance, &result)); return result.Return(PluginDispatcher::Get()); } @@ -102,14 +104,15 @@ bool PPB_CharSet_Proxy::OnMessageReceived(const IPC::Message& msg) { return handled; } -void PPB_CharSet_Proxy::OnMsgUTF16ToCharSet(const string16& utf16, +void PPB_CharSet_Proxy::OnMsgUTF16ToCharSet(PP_Instance instance, + const string16& utf16, const std::string& char_set, int32_t on_error, std::string* output, bool* output_is_success) { uint32_t output_len = 0; char* result = ppb_char_set_target()->UTF16ToCharSet( - reinterpret_cast<const uint16_t*>(utf16.c_str()), + instance, reinterpret_cast<const uint16_t*>(utf16.c_str()), static_cast<uint32_t>(utf16.size()), char_set.c_str(), static_cast<PP_CharSet_ConversionError>(on_error), &output_len); @@ -122,14 +125,15 @@ void PPB_CharSet_Proxy::OnMsgUTF16ToCharSet(const string16& utf16, } } -void PPB_CharSet_Proxy::OnMsgCharSetToUTF16(const std::string& input, +void PPB_CharSet_Proxy::OnMsgCharSetToUTF16(PP_Instance instance, + const std::string& input, const std::string& char_set, int32_t on_error, string16* output, bool* output_is_success) { uint32_t output_len = 0; uint16_t* result = ppb_char_set_target()->CharSetToUTF16( - input.c_str(), static_cast<uint32_t>(input.size()), + instance, input.c_str(), static_cast<uint32_t>(input.size()), char_set.c_str(), static_cast<PP_CharSet_ConversionError>(on_error), &output_len); if (result) { @@ -142,10 +146,10 @@ void PPB_CharSet_Proxy::OnMsgCharSetToUTF16(const std::string& input, } void PPB_CharSet_Proxy::OnMsgGetDefaultCharSet( - PP_Module module, + PP_Instance instance, SerializedVarReturnValue result) { result.Return(dispatcher(), - ppb_char_set_target()->GetDefaultCharSet(module)); + ppb_char_set_target()->GetDefaultCharSet(instance)); } const PPB_Core* PPB_CharSet_Proxy::GetCoreInterface() { diff --git a/ppapi/proxy/ppb_char_set_proxy.h b/ppapi/proxy/ppb_char_set_proxy.h index d944373..7a80fcb 100644 --- a/ppapi/proxy/ppb_char_set_proxy.h +++ b/ppapi/proxy/ppb_char_set_proxy.h @@ -6,7 +6,7 @@ #define PPAPI_PROXY_PPB_CHAR_SET_PROXY_H_ #include "base/basictypes.h" -#include "ppapi/c/pp_module.h" +#include "ppapi/c/pp_instance.h" #include "ppapi/c/pp_resource.h" #include "ppapi/proxy/interface_proxy.h" @@ -34,17 +34,19 @@ class PPB_CharSet_Proxy : public InterfaceProxy { private: // Message handlers. - void OnMsgUTF16ToCharSet(const string16& utf16, + void OnMsgUTF16ToCharSet(PP_Instance instance, + const string16& utf16, const std::string& char_set, int32_t on_error, std::string* output, bool* output_is_success); - void OnMsgCharSetToUTF16(const std::string& input, + void OnMsgCharSetToUTF16(PP_Instance instance, + const std::string& input, const std::string& char_set, int32_t on_error, string16* output, bool* output_is_success); - void OnMsgGetDefaultCharSet(PP_Module module, + void OnMsgGetDefaultCharSet(PP_Instance instance, SerializedVarReturnValue result); // Returns the local PPB_Core interface for freeing strings. diff --git a/ppapi/proxy/ppb_flash_proxy.cc b/ppapi/proxy/ppb_flash_proxy.cc index 2599f94..0cffa3c 100644 --- a/ppapi/proxy/ppb_flash_proxy.cc +++ b/ppapi/proxy/ppb_flash_proxy.cc @@ -55,7 +55,8 @@ void SetInstanceAlwaysOnTop(PP_Instance pp_instance, bool on_top) { INTERFACE_ID_PPB_FLASH, pp_instance, on_top)); } -bool DrawGlyphs(PP_Resource pp_image_data, +bool DrawGlyphs(PP_Instance instance, + PP_Resource pp_image_data, const PP_FontDescription_Dev* font_desc, uint32_t color, PP_Point position, @@ -67,6 +68,7 @@ bool DrawGlyphs(PP_Resource pp_image_data, Dispatcher* dispatcher = PluginDispatcher::Get(); PPBFlash_DrawGlyphs_Params params; + params.instance = instance, params.pp_image_data = pp_image_data; params.font_desc.SetFromPPFontDescription(dispatcher, *font_desc, true); params.color = color; @@ -90,69 +92,69 @@ bool DrawGlyphs(PP_Resource pp_image_data, return result; } -PP_Var GetProxyForURL(PP_Module pp_module, const char* url) { +PP_Var GetProxyForURL(PP_Instance instance, const char* url) { ReceiveSerializedVarReturnValue result; PluginDispatcher::Get()->Send(new PpapiHostMsg_PPBFlash_GetProxyForURL( - INTERFACE_ID_PPB_FLASH, pp_module, url, &result)); + INTERFACE_ID_PPB_FLASH, instance, url, &result)); return result.Return(PluginDispatcher::Get()); } -int32_t OpenModuleLocalFile(PP_Module module, +int32_t OpenModuleLocalFile(PP_Instance instance, const char* path, int32_t mode, PP_FileHandle* file) { int32_t result = PP_ERROR_FAILED; IPC::PlatformFileForTransit transit; PluginDispatcher::Get()->Send(new PpapiHostMsg_PPBFlash_OpenModuleLocalFile( - INTERFACE_ID_PPB_FLASH, module, path, mode, &transit, &result)); + INTERFACE_ID_PPB_FLASH, instance, path, mode, &transit, &result)); *file = IPC::PlatformFileForTransitToPlatformFile(transit); return result; } -int32_t RenameModuleLocalFile(PP_Module module, +int32_t RenameModuleLocalFile(PP_Instance instance, const char* path_from, const char* path_to) { int32_t result = PP_ERROR_FAILED; PluginDispatcher::Get()->Send(new PpapiHostMsg_PPBFlash_RenameModuleLocalFile( - INTERFACE_ID_PPB_FLASH, module, path_from, path_to, &result)); + INTERFACE_ID_PPB_FLASH, instance, path_from, path_to, &result)); return result; } -int32_t DeleteModuleLocalFileOrDir(PP_Module module, +int32_t DeleteModuleLocalFileOrDir(PP_Instance instance, const char* path, bool recursive) { int32_t result = PP_ERROR_FAILED; PluginDispatcher::Get()->Send( new PpapiHostMsg_PPBFlash_DeleteModuleLocalFileOrDir( - INTERFACE_ID_PPB_FLASH, module, path, recursive, &result)); + INTERFACE_ID_PPB_FLASH, instance, path, recursive, &result)); return result; } -int32_t CreateModuleLocalDir(PP_Module module, const char* path) { +int32_t CreateModuleLocalDir(PP_Instance instance, const char* path) { int32_t result = PP_ERROR_FAILED; PluginDispatcher::Get()->Send(new PpapiHostMsg_PPBFlash_CreateModuleLocalDir( - INTERFACE_ID_PPB_FLASH, module, path, &result)); + INTERFACE_ID_PPB_FLASH, instance, path, &result)); return result; } -int32_t QueryModuleLocalFile(PP_Module module, +int32_t QueryModuleLocalFile(PP_Instance instance, const char* path, PP_FileInfo_Dev* info) { int32_t result = PP_ERROR_FAILED; PluginDispatcher::Get()->Send( new PpapiHostMsg_PPBFlash_QueryModuleLocalFile( - INTERFACE_ID_PPB_FLASH, module, path, info, &result)); + INTERFACE_ID_PPB_FLASH, instance, path, info, &result)); return result; } -int32_t GetModuleLocalDirContents(PP_Module module, +int32_t GetModuleLocalDirContents(PP_Instance instance, const char* path, PP_DirContents_Dev** contents) { int32_t result = PP_ERROR_FAILED; std::vector<SerializedDirEntry> entries; PluginDispatcher::Get()->Send( new PpapiHostMsg_PPBFlash_GetModuleLocalDirContents( - INTERFACE_ID_PPB_FLASH, module, path, &entries, &result)); + INTERFACE_ID_PPB_FLASH, instance, path, &entries, &result)); if (result != PP_OK) return result; @@ -174,7 +176,7 @@ int32_t GetModuleLocalDirContents(PP_Module module, return result; } -void FreeModuleLocalDirContents(PP_Module module, +void FreeModuleLocalDirContents(PP_Instance instance, PP_DirContents_Dev* contents) { for (int32_t i = 0; i < contents->count; ++i) delete[] contents->entries[i].name; @@ -271,7 +273,7 @@ void PPB_Flash_Proxy::OnMsgDrawGlyphs( return; *result = ppb_flash_target()->DrawGlyphs( - params.pp_image_data, &font_desc, params.color, + params.instance, params.pp_image_data, &font_desc, params.color, params.position, params.clip, const_cast<float(*)[3]>(params.transformation), static_cast<uint32_t>(params.glyph_indices.size()), @@ -279,64 +281,67 @@ void PPB_Flash_Proxy::OnMsgDrawGlyphs( const_cast<PP_Point*>(¶ms.glyph_advances[0])); } -void PPB_Flash_Proxy::OnMsgGetProxyForURL(PP_Module module, +void PPB_Flash_Proxy::OnMsgGetProxyForURL(PP_Instance instance, const std::string& url, SerializedVarReturnValue result) { result.Return(dispatcher(), ppb_flash_target()->GetProxyForURL( - module, url.c_str())); + instance, url.c_str())); } void PPB_Flash_Proxy::OnMsgOpenModuleLocalFile( - PP_Module module, + PP_Instance instance, const std::string& path, int32_t mode, IPC::PlatformFileForTransit* file_handle, int32_t* result) { base::PlatformFile file; - *result = ppb_flash_target()->OpenModuleLocalFile(module, path.c_str(), mode, - &file); + *result = ppb_flash_target()->OpenModuleLocalFile(instance, path.c_str(), + mode, &file); *file_handle = PlatformFileToPlatformFileForTransit(result, file); } void PPB_Flash_Proxy::OnMsgRenameModuleLocalFile( - PP_Module module, + PP_Instance instance, const std::string& path_from, const std::string& path_to, int32_t* result) { - *result = ppb_flash_target()->RenameModuleLocalFile(module, path_from.c_str(), + *result = ppb_flash_target()->RenameModuleLocalFile(instance, + path_from.c_str(), path_to.c_str()); } void PPB_Flash_Proxy::OnMsgDeleteModuleLocalFileOrDir( - PP_Module module, + PP_Instance instance, const std::string& path, bool recursive, int32_t* result) { - *result = ppb_flash_target()->DeleteModuleLocalFileOrDir(module, path.c_str(), + *result = ppb_flash_target()->DeleteModuleLocalFileOrDir(instance, + path.c_str(), recursive); } -void PPB_Flash_Proxy::OnMsgCreateModuleLocalDir(PP_Module module, +void PPB_Flash_Proxy::OnMsgCreateModuleLocalDir(PP_Instance instance, const std::string& path, int32_t* result) { - *result = ppb_flash_target()->CreateModuleLocalDir(module, path.c_str()); + *result = ppb_flash_target()->CreateModuleLocalDir(instance, path.c_str()); } -void PPB_Flash_Proxy::OnMsgQueryModuleLocalFile(PP_Module module, +void PPB_Flash_Proxy::OnMsgQueryModuleLocalFile(PP_Instance instance, const std::string& path, PP_FileInfo_Dev* info, int32_t* result) { - *result = ppb_flash_target()->QueryModuleLocalFile(module, path.c_str(), + *result = ppb_flash_target()->QueryModuleLocalFile(instance, path.c_str(), info); } void PPB_Flash_Proxy::OnMsgGetModuleLocalDirContents( - PP_Module module, + PP_Instance instance, const std::string& path, std::vector<pp::proxy::SerializedDirEntry>* entries, int32_t* result) { PP_DirContents_Dev* contents = NULL; - *result = ppb_flash_target()->GetModuleLocalDirContents(module, path.c_str(), + *result = ppb_flash_target()->GetModuleLocalDirContents(instance, + path.c_str(), &contents); if (*result != PP_OK) return; @@ -347,7 +352,7 @@ void PPB_Flash_Proxy::OnMsgGetModuleLocalDirContents( (*entries)[i].name.assign(contents->entries[i].name); (*entries)[i].is_dir = contents->entries[i].is_dir; } - ppb_flash_target()->FreeModuleLocalDirContents(module, contents); + ppb_flash_target()->FreeModuleLocalDirContents(instance, contents); } void PPB_Flash_Proxy::OnMsgNavigateToURL(PP_Instance instance, diff --git a/ppapi/proxy/ppb_flash_proxy.h b/ppapi/proxy/ppb_flash_proxy.h index 629761f..cbe30bd 100644 --- a/ppapi/proxy/ppb_flash_proxy.h +++ b/ppapi/proxy/ppb_flash_proxy.h @@ -43,31 +43,31 @@ class PPB_Flash_Proxy : public InterfaceProxy { bool on_top); void OnMsgDrawGlyphs(const pp::proxy::PPBFlash_DrawGlyphs_Params& params, bool* result); - void OnMsgGetProxyForURL(PP_Module module, + void OnMsgGetProxyForURL(PP_Instance instance, const std::string& url, SerializedVarReturnValue result); - void OnMsgOpenModuleLocalFile(PP_Module module, + void OnMsgOpenModuleLocalFile(PP_Instance instance, const std::string& path, int32_t mode, IPC::PlatformFileForTransit* file_handle, int32_t* result); - void OnMsgRenameModuleLocalFile(PP_Module module, + void OnMsgRenameModuleLocalFile(PP_Instance instance, const std::string& path_from, const std::string& path_to, int32_t* result); - void OnMsgDeleteModuleLocalFileOrDir(PP_Module module, + void OnMsgDeleteModuleLocalFileOrDir(PP_Instance instance, const std::string& path, bool recursive, int32_t* result); - void OnMsgCreateModuleLocalDir(PP_Module module, + void OnMsgCreateModuleLocalDir(PP_Instance instance, const std::string& path, int32_t* result); - void OnMsgQueryModuleLocalFile(PP_Module module, + void OnMsgQueryModuleLocalFile(PP_Instance instance, const std::string& path, PP_FileInfo_Dev* info, int32_t* result); void OnMsgGetModuleLocalDirContents( - PP_Module module, + PP_Instance instance, const std::string& path, std::vector<pp::proxy::SerializedDirEntry>* entries, int32_t* result); diff --git a/ppapi/proxy/ppb_font_proxy.cc b/ppapi/proxy/ppb_font_proxy.cc index 1c72622..2dc2744 100644 --- a/ppapi/proxy/ppb_font_proxy.cc +++ b/ppapi/proxy/ppb_font_proxy.cc @@ -43,7 +43,7 @@ Font::~Font() { namespace { -PP_Resource Create(PP_Module module_id, +PP_Resource Create(PP_Instance instance, const PP_FontDescription_Dev* description) { PluginDispatcher* dispatcher = PluginDispatcher::Get(); @@ -55,7 +55,7 @@ PP_Resource Create(PP_Module module_id, std::string out_metrics; PluginDispatcher::Get()->Send(new PpapiHostMsg_PPBFont_Create( INTERFACE_ID_PPB_FONT, - module_id, in_description, &result, &out_description, &out_metrics)); + instance, in_description, &result, &out_description, &out_metrics)); if (!result) return 0; // Failure creating font. @@ -206,7 +206,7 @@ bool PPB_Font_Proxy::OnMessageReceived(const IPC::Message& msg) { } void PPB_Font_Proxy::OnMsgCreate( - PP_Module pp_module, + PP_Instance instance, const SerializedFontDescription& in_description, PP_Resource* result, SerializedFontDescription* out_description, @@ -221,7 +221,7 @@ void PPB_Font_Proxy::OnMsgCreate( memset(&out_pp_desc, 0, sizeof(PP_FontDescription_Dev)); out_pp_desc.face = PP_MakeUndefined(); - *result = ppb_font_target()->Create(pp_module, &in_pp_desc); + *result = ppb_font_target()->Create(instance, &in_pp_desc); if (*result) { // Get the metrics and resulting description to return to the browser. PP_FontMetrics_Dev metrics; diff --git a/ppapi/proxy/ppb_font_proxy.h b/ppapi/proxy/ppb_font_proxy.h index 4e68d70..322af80 100644 --- a/ppapi/proxy/ppb_font_proxy.h +++ b/ppapi/proxy/ppb_font_proxy.h @@ -6,7 +6,7 @@ #define PPAPI_PROXY_PPB_FONT_PROXY_H_ #include "base/basictypes.h" -#include "ppapi/c/pp_module.h" +#include "ppapi/c/pp_instance.h" #include "ppapi/c/pp_resource.h" #include "ppapi/proxy/interface_proxy.h" @@ -35,7 +35,7 @@ class PPB_Font_Proxy : public InterfaceProxy { private: // Message handlers. - void OnMsgCreate(PP_Module pp_module, + void OnMsgCreate(PP_Instance instance, const SerializedFontDescription& in_description, PP_Resource* result, SerializedFontDescription* out_description, diff --git a/ppapi/proxy/ppb_graphics_2d_proxy.cc b/ppapi/proxy/ppb_graphics_2d_proxy.cc index 06d5d0a..033f71c 100644 --- a/ppapi/proxy/ppb_graphics_2d_proxy.cc +++ b/ppapi/proxy/ppb_graphics_2d_proxy.cc @@ -55,13 +55,13 @@ class Graphics2D : public PluginResource { namespace { -PP_Resource Create(PP_Module module_id, +PP_Resource Create(PP_Instance instance, const PP_Size* size, PP_Bool is_always_opaque) { PluginDispatcher* dispatcher = PluginDispatcher::Get(); PP_Resource result = 0; dispatcher->Send(new PpapiHostMsg_PPBGraphics2D_Create( - INTERFACE_ID_PPB_GRAPHICS_2D, module_id, *size, is_always_opaque, + INTERFACE_ID_PPB_GRAPHICS_2D, instance, *size, is_always_opaque, &result)); if (result) { linked_ptr<Graphics2D> graphics_2d(new Graphics2D(*size, is_always_opaque)); @@ -188,12 +188,12 @@ bool PPB_Graphics2D_Proxy::OnMessageReceived(const IPC::Message& msg) { return handled; } -void PPB_Graphics2D_Proxy::OnMsgCreate(PP_Module module, +void PPB_Graphics2D_Proxy::OnMsgCreate(PP_Instance instance, const PP_Size& size, PP_Bool is_always_opaque, PP_Resource* result) { *result = ppb_graphics_2d_target()->Create( - module, &size, is_always_opaque); + instance, &size, is_always_opaque); } void PPB_Graphics2D_Proxy::OnMsgPaintImageData(PP_Resource graphics_2d, diff --git a/ppapi/proxy/ppb_image_data_proxy.cc b/ppapi/proxy/ppb_image_data_proxy.cc index 14b0479..9b8c2a2 100644 --- a/ppapi/proxy/ppb_image_data_proxy.cc +++ b/ppapi/proxy/ppb_image_data_proxy.cc @@ -40,7 +40,7 @@ PP_Bool IsImageDataFormatSupported(PP_ImageDataFormat format) { return supported; } -PP_Resource Create(PP_Module module_id, +PP_Resource Create(PP_Instance instance, PP_ImageDataFormat format, const PP_Size* size, PP_Bool init_to_zero) { @@ -49,7 +49,7 @@ PP_Resource Create(PP_Module module_id, ImageHandle image_handle = ImageData::NullHandle; PluginDispatcher::Get()->Send( new PpapiHostMsg_PPBImageData_Create( - INTERFACE_ID_PPB_IMAGE_DATA, module_id, format, *size, init_to_zero, + INTERFACE_ID_PPB_IMAGE_DATA, instance, format, *size, init_to_zero, &result, &image_data_desc, &image_handle)); if (result && image_data_desc.size() == sizeof(PP_ImageDataDesc)) { @@ -143,7 +143,7 @@ void PPB_ImageData_Proxy::OnMsgIsImageDataFormatSupported(int32 format, static_cast<PP_ImageDataFormat>(format)); } -void PPB_ImageData_Proxy::OnMsgCreate(PP_Module module, +void PPB_ImageData_Proxy::OnMsgCreate(PP_Instance instance, int32_t format, const PP_Size& size, PP_Bool init_to_zero, @@ -151,7 +151,7 @@ void PPB_ImageData_Proxy::OnMsgCreate(PP_Module module, std::string* image_data_desc, ImageHandle* result_image_handle) { *result = ppb_image_data_target()->Create( - module, static_cast<PP_ImageDataFormat>(format), &size, init_to_zero); + instance, static_cast<PP_ImageDataFormat>(format), &size, init_to_zero); *result_image_handle = ImageData::NullHandle; if (*result) { // The ImageDesc is just serialized as a string. diff --git a/ppapi/proxy/ppb_image_data_proxy.h b/ppapi/proxy/ppb_image_data_proxy.h index beec054..5a0d076 100644 --- a/ppapi/proxy/ppb_image_data_proxy.h +++ b/ppapi/proxy/ppb_image_data_proxy.h @@ -38,7 +38,7 @@ class PPB_ImageData_Proxy : public InterfaceProxy { // Message handlers. void OnMsgGetNativeImageDataFormat(int32* result); void OnMsgIsImageDataFormatSupported(int32 format, PP_Bool* result); - void OnMsgCreate(PP_Module module, + void OnMsgCreate(PP_Instance instance, int32_t format, const PP_Size& size, PP_Bool init_to_zero, diff --git a/ppapi/proxy/ppb_pdf_proxy.cc b/ppapi/proxy/ppb_pdf_proxy.cc index ddc404c..776a90a 100644 --- a/ppapi/proxy/ppb_pdf_proxy.cc +++ b/ppapi/proxy/ppb_pdf_proxy.cc @@ -57,7 +57,7 @@ std::string* PrivateFontFile::AddFontTable(uint32_t table, namespace { PP_Resource GetFontFileWithFallback( - PP_Module module_id, + PP_Instance instance, const PP_FontDescription_Dev* description, PP_PrivateFontCharset charset) { PluginDispatcher* dispatcher = PluginDispatcher::Get(); @@ -66,7 +66,7 @@ PP_Resource GetFontFileWithFallback( PP_Resource result = 0; dispatcher->Send(new PpapiHostMsg_PPBPDF_GetFontFileWithFallback( - INTERFACE_ID_PPB_PDF, module_id, desc, charset, &result)); + INTERFACE_ID_PPB_PDF, instance, desc, charset, &result)); if (!result) return 0; @@ -139,13 +139,13 @@ bool PPB_PDF_Proxy::OnMessageReceived(const IPC::Message& msg) { } void PPB_PDF_Proxy::OnMsgGetFontFileWithFallback( - PP_Module module, + PP_Instance instance, const SerializedFontDescription& in_desc, int32_t charset, PP_Resource* result) { PP_FontDescription_Dev desc; in_desc.SetToPPFontDescription(dispatcher(), &desc, false); - *result = ppb_pdf_target()->GetFontFileWithFallback(module, &desc, + *result = ppb_pdf_target()->GetFontFileWithFallback(instance, &desc, static_cast<PP_PrivateFontCharset>(charset)); } diff --git a/ppapi/proxy/ppb_url_request_info_proxy.cc b/ppapi/proxy/ppb_url_request_info_proxy.cc index 02bd3e6..fdd5e5d 100644 --- a/ppapi/proxy/ppb_url_request_info_proxy.cc +++ b/ppapi/proxy/ppb_url_request_info_proxy.cc @@ -26,10 +26,10 @@ class URLRequestInfo : public PluginResource { namespace { -PP_Resource Create(PP_Module module_id) { +PP_Resource Create(PP_Instance instance) { PP_Resource result; PluginDispatcher::Get()->Send(new PpapiHostMsg_PPBURLRequestInfo_Create( - INTERFACE_ID_PPB_URL_REQUEST_INFO, module_id, &result)); + INTERFACE_ID_PPB_URL_REQUEST_INFO, instance, &result)); if (result) { linked_ptr<URLRequestInfo> object(new URLRequestInfo); PluginDispatcher::Get()->plugin_resource_tracker()->AddResource( @@ -128,9 +128,9 @@ bool PPB_URLRequestInfo_Proxy::OnMessageReceived(const IPC::Message& msg) { } void PPB_URLRequestInfo_Proxy::OnMsgCreate( - PP_Module module, + PP_Instance instance, PP_Resource* result) { - *result = ppb_url_request_info_target()->Create(module); + *result = ppb_url_request_info_target()->Create(instance); } void PPB_URLRequestInfo_Proxy::OnMsgSetProperty( diff --git a/ppapi/proxy/ppb_url_request_info_proxy.h b/ppapi/proxy/ppb_url_request_info_proxy.h index 47e2e27..e317615 100644 --- a/ppapi/proxy/ppb_url_request_info_proxy.h +++ b/ppapi/proxy/ppb_url_request_info_proxy.h @@ -6,7 +6,7 @@ #define PPAPI_PROXY_PPB_URL_REQUEST_INFO_PROXY_H_ #include "base/basictypes.h" -#include "ppapi/c/pp_module.h" +#include "ppapi/c/pp_instance.h" #include "ppapi/c/pp_resource.h" #include "ppapi/proxy/interface_proxy.h" @@ -34,7 +34,7 @@ class PPB_URLRequestInfo_Proxy : public InterfaceProxy { private: // Message handlers. - void OnMsgCreate(PP_Module module, PP_Resource* result); + void OnMsgCreate(PP_Instance instance, PP_Resource* result); void OnMsgSetProperty(PP_Resource request, int32_t property, SerializedVarReceiveInput value); diff --git a/ppapi/proxy/ppb_var_deprecated_proxy.cc b/ppapi/proxy/ppb_var_deprecated_proxy.cc index f37b0e3..0fcca7f 100644 --- a/ppapi/proxy/ppb_var_deprecated_proxy.cc +++ b/ppapi/proxy/ppb_var_deprecated_proxy.cc @@ -30,12 +30,11 @@ void ReleaseVar(PP_Var var) { PluginDispatcher::Get()->plugin_var_tracker()->Release(var); } -PP_Var VarFromUtf8(PP_Module module_id, const char* data, uint32_t len) { +PP_Var VarFromUtf8(PP_Module module, const char* data, uint32_t len) { PP_Var ret; ret.type = PP_VARTYPE_STRING; - // TODO(brettw) avoid this extra copy. ret.value.as_id = PluginDispatcher::Get()->plugin_var_tracker()->MakeString( - std::string(data, len)); + data, len); return ret; } @@ -45,10 +44,9 @@ const char* VarToUtf8(PP_Var var, uint32_t* len) { if (str) { *len = static_cast<uint32_t>(str->size()); return str->c_str(); - } else { - *len = 0; - return NULL; } + *len = 0; + return NULL; } bool HasProperty(PP_Var var, @@ -197,7 +195,7 @@ bool IsInstanceOf(PP_Var var, return PPBoolToBool(result); } -PP_Var CreateObject(PP_Module module_id, +PP_Var CreateObject(PP_Instance instance, const PPP_Class_Deprecated* ppp_class, void* ppp_class_data) { Dispatcher* dispatcher = PluginDispatcher::Get(); @@ -206,7 +204,7 @@ PP_Var CreateObject(PP_Module module_id, int64 data_int = static_cast<int64>(reinterpret_cast<intptr_t>(ppp_class_data)); dispatcher->Send(new PpapiHostMsg_PPBVar_CreateObjectDeprecated( - INTERFACE_ID_PPB_VAR_DEPRECATED, module_id, class_int, data_int, + INTERFACE_ID_PPB_VAR_DEPRECATED, instance, class_int, data_int, &result)); return result.Return(dispatcher); } @@ -377,12 +375,12 @@ void PPB_Var_Deprecated_Proxy::OnMsgIsInstanceOfDeprecated( } void PPB_Var_Deprecated_Proxy::OnMsgCreateObjectDeprecated( - PP_Module module_id, + PP_Instance instance, int64 ppp_class, int64 class_data, SerializedVarReturnValue result) { result.Return(dispatcher(), PPP_Class_Proxy::CreateProxiedObject( - ppb_var_target(), dispatcher(), module_id, ppp_class, class_data)); + ppb_var_target(), dispatcher(), instance, ppp_class, class_data)); } } // namespace proxy diff --git a/ppapi/proxy/ppb_var_deprecated_proxy.h b/ppapi/proxy/ppb_var_deprecated_proxy.h index c712460..193da9d 100644 --- a/ppapi/proxy/ppb_var_deprecated_proxy.h +++ b/ppapi/proxy/ppb_var_deprecated_proxy.h @@ -8,7 +8,6 @@ #include <vector> #include "ppapi/c/pp_instance.h" -#include "ppapi/c/pp_module.h" #include "ppapi/proxy/interface_proxy.h" struct PPB_Var_Deprecated; @@ -84,7 +83,7 @@ class PPB_Var_Deprecated_Proxy : public InterfaceProxy { int64 ppp_class, int64* ppp_class_data, PP_Bool* result); - void OnMsgCreateObjectDeprecated(PP_Module module_id, + void OnMsgCreateObjectDeprecated(PP_Instance instance, int64 ppp_class, int64 ppp_class_data, SerializedVarReturnValue result); diff --git a/ppapi/proxy/serialized_structs.cc b/ppapi/proxy/serialized_structs.cc index ab33bab..f744db9 100644 --- a/ppapi/proxy/serialized_structs.cc +++ b/ppapi/proxy/serialized_structs.cc @@ -63,7 +63,8 @@ void SerializedFontDescription::SetToPPFontDescription( } PPBFlash_DrawGlyphs_Params::PPBFlash_DrawGlyphs_Params() - : pp_image_data(0), + : instance(0), + pp_image_data(0), font_desc(), color(0) { } diff --git a/ppapi/proxy/serialized_structs.h b/ppapi/proxy/serialized_structs.h index 2c78dd4..496fd3a 100644 --- a/ppapi/proxy/serialized_structs.h +++ b/ppapi/proxy/serialized_structs.h @@ -11,6 +11,7 @@ #include "base/shared_memory.h" #include "build/build_config.h" #include "ppapi/c/pp_bool.h" +#include "ppapi/c/pp_instance.h" #include "ppapi/c/pp_point.h" #include "ppapi/c/pp_rect.h" #include "ppapi/c/pp_resource.h" @@ -88,6 +89,7 @@ struct PPBFlash_DrawGlyphs_Params { PPBFlash_DrawGlyphs_Params(); ~PPBFlash_DrawGlyphs_Params(); + PP_Instance instance; PP_Resource pp_image_data; SerializedFontDescription font_desc; uint32_t color; |