diff options
-rw-r--r-- | ppapi/c/dev/ppb_context_3d_trusted_dev.h | 4 | ||||
-rw-r--r-- | ppapi/c/pp_stdint.h | 2 | ||||
-rw-r--r-- | ppapi/c/ppb_audio.h | 8 | ||||
-rw-r--r-- | ppapi/c/ppb_core.h | 6 | ||||
-rw-r--r-- | ppapi/c/ppb_url_loader.h | 2 | ||||
-rw-r--r-- | ppapi/c/ppb_url_request_info.h | 2 | ||||
-rw-r--r-- | ppapi/c/private/ppb_flash_net_connector.h | 4 | ||||
-rw-r--r-- | ppapi/cpp/core.h | 2 | ||||
-rw-r--r-- | ppapi/cpp/url_loader.cc | 2 | ||||
-rw-r--r-- | ppapi/cpp/url_loader.h | 2 | ||||
-rw-r--r-- | ppapi/cpp/url_request_info.cc | 2 | ||||
-rw-r--r-- | ppapi/cpp/url_request_info.h | 2 | ||||
-rw-r--r-- | ppapi/lib/gl/egl/egldriver.c | 2 | ||||
-rw-r--r-- | ppapi/lib/gl/gles2/gl2ext_ppapi.c | 2 | ||||
-rw-r--r-- | ppapi/proxy/ppb_core_proxy.cc | 2 | ||||
-rw-r--r-- | ppapi/proxy/ppb_url_loader_proxy.cc | 4 | ||||
-rw-r--r-- | ppapi/proxy/ppb_url_request_info_proxy.cc | 4 | ||||
-rw-r--r-- | webkit/plugins/ppapi/plugin_module.cc | 2 | ||||
-rw-r--r-- | webkit/plugins/ppapi/ppb_context_3d_impl.cc | 2 | ||||
-rw-r--r-- | webkit/plugins/ppapi/ppb_url_loader_impl.cc | 6 | ||||
-rw-r--r-- | webkit/plugins/ppapi/ppb_url_loader_impl.h | 2 | ||||
-rw-r--r-- | webkit/plugins/ppapi/ppb_url_request_info_impl.cc | 5 |
22 files changed, 36 insertions, 33 deletions
diff --git a/ppapi/c/dev/ppb_context_3d_trusted_dev.h b/ppapi/c/dev/ppb_context_3d_trusted_dev.h index 944b041..f8a0d9c 100644 --- a/ppapi/c/dev/ppb_context_3d_trusted_dev.h +++ b/ppapi/c/dev/ppb_context_3d_trusted_dev.h @@ -11,7 +11,7 @@ #include "ppapi/c/pp_resource.h" #include "ppapi/c/pp_stdint.h" -#define PPB_CONTEXT_3D_TRUSTED_DEV_INTERFACE "PPB_Context3DTrusted(Dev);0.2" +#define PPB_CONTEXT_3D_TRUSTED_DEV_INTERFACE "PPB_Context3DTrusted(Dev);0.3" typedef enum { kNoError, @@ -77,7 +77,7 @@ struct PPB_Context3DTrusted_Dev { // Create a transfer buffer and return a handle that uniquely // identifies it or -1 on error. - int32_t (*CreateTransferBuffer)(PP_Resource context, size_t size); + int32_t (*CreateTransferBuffer)(PP_Resource context, uint32_t size); // Destroy a transfer buffer and recycle the handle. PP_Bool (*DestroyTransferBuffer)(PP_Resource context, int32_t id); diff --git a/ppapi/c/pp_stdint.h b/ppapi/c/pp_stdint.h index ed397f5..6117af6 100644 --- a/ppapi/c/pp_stdint.h +++ b/ppapi/c/pp_stdint.h @@ -49,7 +49,5 @@ typedef unsigned __int64 uint64_t; #include <stdint.h> #endif -#include <stddef.h> /* Needed for size_t. */ - #endif /* PPAPI_C_PP_STDINT_H_ */ diff --git a/ppapi/c/ppb_audio.h b/ppapi/c/ppb_audio.h index 53f58ea..5abb8ec 100644 --- a/ppapi/c/ppb_audio.h +++ b/ppapi/c/ppb_audio.h @@ -11,7 +11,7 @@ #include "ppapi/c/pp_resource.h" #include "ppapi/c/pp_stdint.h" -#define PPB_AUDIO_INTERFACE "PPB_Audio;0.5" +#define PPB_AUDIO_INTERFACE "PPB_Audio;0.6" /** * @file @@ -31,7 +31,7 @@ * fill the audio buffer with data. */ typedef void (*PPB_Audio_Callback)(void* sample_buffer, - size_t buffer_size_in_bytes, + uint32_t buffer_size_in_bytes, void* user_data); /** * @} @@ -50,8 +50,8 @@ typedef void (*PPB_Audio_Callback)(void* sample_buffer, * A C++ example: * * void audio_callback(void* sample_buffer, - * size_t buffer_size_in_bytes, - * void* user_data) { + * uint32_t buffer_size_in_bytes, + * void* user_data) { * ... fill in the buffer with samples ... * } * diff --git a/ppapi/c/ppb_core.h b/ppapi/c/ppb_core.h index 6571db0..59efc24 100644 --- a/ppapi/c/ppb_core.h +++ b/ppapi/c/ppb_core.h @@ -13,7 +13,7 @@ struct PP_CompletionCallback; -#define PPB_CORE_INTERFACE "PPB_Core;0.3" +#define PPB_CORE_INTERFACE "PPB_Core;0.4" /** * @file @@ -54,11 +54,11 @@ struct PPB_Core { /** * MemAlloc is a pointer to a function that allocate memory. * - * @param[in] num_bytes A size_t number of bytes to allocate. + * @param[in] num_bytes A number of bytes to allocate. * @return A pointer to the memory if successful, NULL If the * allocation fails. */ - void* (*MemAlloc)(size_t num_bytes); + void* (*MemAlloc)(uint32_t num_bytes); /** * MemFree is a pointer to a function that deallocates memory. diff --git a/ppapi/c/ppb_url_loader.h b/ppapi/c/ppb_url_loader.h index 8dfc409..34a16da 100644 --- a/ppapi/c/ppb_url_loader.h +++ b/ppapi/c/ppb_url_loader.h @@ -96,7 +96,7 @@ struct PPB_URLLoader { // perform a partial read. Returns the number of bytes read or an error // code. int32_t (*ReadResponseBody)(PP_Resource loader, - char* buffer, + void* buffer, int32_t bytes_to_read, struct PP_CompletionCallback callback); diff --git a/ppapi/c/ppb_url_request_info.h b/ppapi/c/ppb_url_request_info.h index 441a02c..aad1c9e 100644 --- a/ppapi/c/ppb_url_request_info.h +++ b/ppapi/c/ppb_url_request_info.h @@ -87,7 +87,7 @@ struct PPB_URLRequestInfo { // // Returns PP_FALSE if any of the parameters are invalid, PP_TRUE on success. PP_Bool (*AppendDataToBody)(PP_Resource request, - const char* data, + const void* data, uint32_t len); // Append a file reference to be uploaded. diff --git a/ppapi/c/private/ppb_flash_net_connector.h b/ppapi/c/private/ppb_flash_net_connector.h index 555e9df..2cc25bb 100644 --- a/ppapi/c/private/ppb_flash_net_connector.h +++ b/ppapi/c/private/ppb_flash_net_connector.h @@ -10,11 +10,11 @@ #include "ppapi/c/pp_resource.h" #include "ppapi/c/private/ppb_flash_file.h" // For |PP_FileHandle|. -#define PPB_FLASH_NETCONNECTOR_INTERFACE "PPB_Flash_NetConnector;1" +#define PPB_FLASH_NETCONNECTOR_INTERFACE "PPB_Flash_NetConnector;0.1" // This is an opaque type holding a network address. struct PP_Flash_NetAddress { - size_t size; + uint32_t size; char data[128]; }; diff --git a/ppapi/cpp/core.h b/ppapi/cpp/core.h index 50c89d5..7f0fefc 100644 --- a/ppapi/cpp/core.h +++ b/ppapi/cpp/core.h @@ -27,7 +27,7 @@ class Core { interface_->ReleaseResource(resource); } - void* MemAlloc(size_t num_bytes) { + void* MemAlloc(uint32_t num_bytes) { return interface_->MemAlloc(num_bytes); } void MemFree(void* ptr) { diff --git a/ppapi/cpp/url_loader.cc b/ppapi/cpp/url_loader.cc index 81bcdfd..cf05f3c 100644 --- a/ppapi/cpp/url_loader.cc +++ b/ppapi/cpp/url_loader.cc @@ -88,7 +88,7 @@ URLResponseInfo URLLoader::GetResponseInfo() const { pp_resource())); } -int32_t URLLoader::ReadResponseBody(char* buffer, +int32_t URLLoader::ReadResponseBody(void* buffer, int32_t bytes_to_read, const CompletionCallback& cc) { if (!has_interface<PPB_URLLoader>()) diff --git a/ppapi/cpp/url_loader.h b/ppapi/cpp/url_loader.h index 387d1dc2..6db80f96 100644 --- a/ppapi/cpp/url_loader.h +++ b/ppapi/cpp/url_loader.h @@ -97,7 +97,7 @@ class URLLoader : public Resource { bool GetDownloadProgress(int64_t* bytes_received, int64_t* total_bytes_to_be_received) const; URLResponseInfo GetResponseInfo() const; - int32_t ReadResponseBody(char* buffer, + int32_t ReadResponseBody(void* buffer, int32_t bytes_to_read, const CompletionCallback& cc); int32_t FinishStreamingToFile(const CompletionCallback& cc); diff --git a/ppapi/cpp/url_request_info.cc b/ppapi/cpp/url_request_info.cc index 76cf832..1303d71 100644 --- a/ppapi/cpp/url_request_info.cc +++ b/ppapi/cpp/url_request_info.cc @@ -39,7 +39,7 @@ bool URLRequestInfo::SetProperty(PP_URLRequestProperty property, pp_resource(), property, value.pp_var())); } -bool URLRequestInfo::AppendDataToBody(const char* data, uint32_t len) { +bool URLRequestInfo::AppendDataToBody(const void* data, uint32_t len) { if (!has_interface<PPB_URLRequestInfo>()) return false; return PPBoolToBool(get_interface<PPB_URLRequestInfo>()->AppendDataToBody( diff --git a/ppapi/cpp/url_request_info.h b/ppapi/cpp/url_request_info.h index eabf91d..2530085 100644 --- a/ppapi/cpp/url_request_info.h +++ b/ppapi/cpp/url_request_info.h @@ -24,7 +24,7 @@ class URLRequestInfo : public Resource { // PPB_URLRequestInfo methods: bool SetProperty(PP_URLRequestProperty property, const Var& value); - bool AppendDataToBody(const char* data, uint32_t len); + bool AppendDataToBody(const void* data, uint32_t len); bool AppendFileToBody(const FileRef_Dev& file_ref, PP_Time expected_last_modified_time = 0); bool AppendFileRangeToBody(const FileRef_Dev& file_ref, diff --git a/ppapi/lib/gl/egl/egldriver.c b/ppapi/lib/gl/egl/egldriver.c index 90f573e..240063e 100644 --- a/ppapi/lib/gl/egl/egldriver.c +++ b/ppapi/lib/gl/egl/egldriver.c @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <stddef.h> + #include "third_party/mesa/MesaLib/src/egl/main/egldriver.h" #include "third_party/mesa/MesaLib/src/egl/main/eglconfig.h" diff --git a/ppapi/lib/gl/gles2/gl2ext_ppapi.c b/ppapi/lib/gl/gles2/gl2ext_ppapi.c index 1759413..02e3005 100644 --- a/ppapi/lib/gl/gles2/gl2ext_ppapi.c +++ b/ppapi/lib/gl/gles2/gl2ext_ppapi.c @@ -4,6 +4,8 @@ #include "ppapi/lib/gl/gles2/gl2ext_ppapi.h" +#include <stddef.h> + #ifndef GL_FALSE #define GL_FALSE 0 #endif // GL_FALSE diff --git a/ppapi/proxy/ppb_core_proxy.cc b/ppapi/proxy/ppb_core_proxy.cc index 34993fa..23c3d0b 100644 --- a/ppapi/proxy/ppb_core_proxy.cc +++ b/ppapi/proxy/ppb_core_proxy.cc @@ -36,7 +36,7 @@ void ReleaseResource(PP_Resource resource) { PluginResourceTracker::GetInstance()->ReleaseResource(resource); } -void* MemAlloc(size_t num_bytes) { +void* MemAlloc(uint32_t num_bytes) { return malloc(num_bytes); } diff --git a/ppapi/proxy/ppb_url_loader_proxy.cc b/ppapi/proxy/ppb_url_loader_proxy.cc index 74b79d9..7f06b46 100644 --- a/ppapi/proxy/ppb_url_loader_proxy.cc +++ b/ppapi/proxy/ppb_url_loader_proxy.cc @@ -47,7 +47,7 @@ class URLLoader : public PluginResource { // When an asynchronous read is pending, this will contain the callback and // the buffer to put the data. PP_CompletionCallback current_read_callback_; - char* current_read_buffer_; + void* current_read_buffer_; // Cached copy of the response info. When nonzero, we're holding a reference // to this resource. @@ -205,7 +205,7 @@ PP_Resource GetResponseInfo(PP_Resource loader_id) { } int32_t ReadResponseBody(PP_Resource loader_id, - char* buffer, + void* buffer, int32_t bytes_to_read, PP_CompletionCallback callback) { URLLoader* loader_object; diff --git a/ppapi/proxy/ppb_url_request_info_proxy.cc b/ppapi/proxy/ppb_url_request_info_proxy.cc index 385f13a..1492a37 100644 --- a/ppapi/proxy/ppb_url_request_info_proxy.cc +++ b/ppapi/proxy/ppb_url_request_info_proxy.cc @@ -79,7 +79,7 @@ PP_Bool SetProperty(PP_Resource request_id, } PP_Bool AppendDataToBody(PP_Resource request_id, - const char* data, uint32_t len) { + const void* data, uint32_t len) { PluginDispatcher* dispatcher; URLRequestInfo* request_info; if (!DispatcherFromURLRequestInfo(request_id, &dispatcher, &request_info)) @@ -87,7 +87,7 @@ PP_Bool AppendDataToBody(PP_Resource request_id, dispatcher->Send(new PpapiHostMsg_PPBURLRequestInfo_AppendDataToBody( INTERFACE_ID_PPB_URL_REQUEST_INFO, request_info->host_resource(), - std::string(data, len))); + std::string(static_cast<const char*>(data), len))); // TODO(brettw) do some validation. We should be able to tell on the plugin // side whether the request will succeed or fail in the renderer. diff --git a/webkit/plugins/ppapi/plugin_module.cc b/webkit/plugins/ppapi/plugin_module.cc index ff6b085..b4ab5f0 100644 --- a/webkit/plugins/ppapi/plugin_module.cc +++ b/webkit/plugins/ppapi/plugin_module.cc @@ -137,7 +137,7 @@ void ReleaseResource(PP_Resource resource) { } } -void* MemAlloc(size_t num_bytes) { +void* MemAlloc(uint32_t num_bytes) { return malloc(num_bytes); } diff --git a/webkit/plugins/ppapi/ppb_context_3d_impl.cc b/webkit/plugins/ppapi/ppb_context_3d_impl.cc index eb058a5..9494459 100644 --- a/webkit/plugins/ppapi/ppb_context_3d_impl.cc +++ b/webkit/plugins/ppapi/ppb_context_3d_impl.cc @@ -194,7 +194,7 @@ PP_Context3DTrustedState FlushSync(PP_Resource context_id, int32_t put_offset) { return PPStateFromGPUState(context->command_buffer()->FlushSync(put_offset)); } -int32_t CreateTransferBuffer(PP_Resource context_id, size_t size) { +int32_t CreateTransferBuffer(PP_Resource context_id, uint32_t size) { scoped_refptr<PPB_Context3D_Impl> context( Resource::GetAs<PPB_Context3D_Impl>(context_id)); if (!context.get() || !context->command_buffer()) diff --git a/webkit/plugins/ppapi/ppb_url_loader_impl.cc b/webkit/plugins/ppapi/ppb_url_loader_impl.cc index ccccd25..e73ec96 100644 --- a/webkit/plugins/ppapi/ppb_url_loader_impl.cc +++ b/webkit/plugins/ppapi/ppb_url_loader_impl.cc @@ -122,7 +122,7 @@ PP_Resource GetResponseInfo(PP_Resource loader_id) { } int32_t ReadResponseBody(PP_Resource loader_id, - char* buffer, + void* buffer, int32_t bytes_to_read, PP_CompletionCallback callback) { scoped_refptr<PPB_URLLoader_Impl> loader( @@ -311,7 +311,7 @@ bool PPB_URLLoader_Impl::GetDownloadProgress( return true; } -int32_t PPB_URLLoader_Impl::ReadResponseBody(char* buffer, +int32_t PPB_URLLoader_Impl::ReadResponseBody(void* buffer, int32_t bytes_to_read, PP_CompletionCallback callback) { int32_t rv = ValidateCallback(callback); @@ -322,7 +322,7 @@ int32_t PPB_URLLoader_Impl::ReadResponseBody(char* buffer, if (bytes_to_read <= 0 || !buffer) return PP_ERROR_BADARGUMENT; - user_buffer_ = buffer; + user_buffer_ = static_cast<char*>(buffer); user_buffer_size_ = bytes_to_read; if (!buffer_.empty()) diff --git a/webkit/plugins/ppapi/ppb_url_loader_impl.h b/webkit/plugins/ppapi/ppb_url_loader_impl.h index 12fb3ba..48b416d 100644 --- a/webkit/plugins/ppapi/ppb_url_loader_impl.h +++ b/webkit/plugins/ppapi/ppb_url_loader_impl.h @@ -56,7 +56,7 @@ class PPB_URLLoader_Impl : public Resource, public WebKit::WebURLLoaderClient { int64_t* total_bytes_to_be_sent); bool GetDownloadProgress(int64_t* bytes_received, int64_t* total_bytes_to_be_received); - int32_t ReadResponseBody(char* buffer, int32_t bytes_to_read, + int32_t ReadResponseBody(void* buffer, int32_t bytes_to_read, PP_CompletionCallback callback); int32_t FinishStreamingToFile(PP_CompletionCallback callback); void Close(); diff --git a/webkit/plugins/ppapi/ppb_url_request_info_impl.cc b/webkit/plugins/ppapi/ppb_url_request_info_impl.cc index d2c5ef7..a3685d3 100644 --- a/webkit/plugins/ppapi/ppb_url_request_info_impl.cc +++ b/webkit/plugins/ppapi/ppb_url_request_info_impl.cc @@ -127,14 +127,15 @@ PP_Bool SetProperty(PP_Resource request_id, } PP_Bool AppendDataToBody(PP_Resource request_id, - const char* data, + const void* data, uint32_t len) { scoped_refptr<PPB_URLRequestInfo_Impl> request( Resource::GetAs<PPB_URLRequestInfo_Impl>(request_id)); if (!request) return PP_FALSE; - return BoolToPPBool(request->AppendDataToBody(std::string(data, len))); + return BoolToPPBool(request->AppendDataToBody(std::string( + static_cast<const char*>(data), len))); } PP_Bool AppendFileToBody(PP_Resource request_id, |