diff options
author | dpolukhin@chromium.org <dpolukhin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-16 07:06:24 +0000 |
---|---|---|
committer | dpolukhin@chromium.org <dpolukhin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-16 07:06:24 +0000 |
commit | fb575bc7182f8ecde6ede7a4978b64a72434fd02 (patch) | |
tree | 61d8a21e588aca63d0713d35148aff12e9a2fe89 /ppapi/thunk | |
parent | fe0eca5c30281ae58cef01593f0e4aab7fd560f2 (diff) | |
download | chromium_src-fb575bc7182f8ecde6ede7a4978b64a72434fd02.zip chromium_src-fb575bc7182f8ecde6ede7a4978b64a72434fd02.tar.gz chromium_src-fb575bc7182f8ecde6ede7a4978b64a72434fd02.tar.bz2 |
Remove 'Flash' from TCP/UDP Pepper interfaces names. This CL preserves old idl and C/C++ headers for backward compatibility. Also TCP interface should be returned by old name.
BUG=none
TEST=build
Review URL: http://codereview.chromium.org/8506016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110265 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/thunk')
-rw-r--r-- | ppapi/thunk/interfaces_ppb_private.h | 7 | ||||
-rw-r--r-- | ppapi/thunk/ppb_tcp_socket_private_api.h (renamed from ppapi/thunk/ppb_flash_tcp_socket_api.h) | 12 | ||||
-rw-r--r-- | ppapi/thunk/ppb_tcp_socket_private_thunk.cc (renamed from ppapi/thunk/ppb_flash_tcp_socket_thunk.cc) | 34 | ||||
-rw-r--r-- | ppapi/thunk/ppb_udp_socket_private_api.h (renamed from ppapi/thunk/ppb_flash_udp_socket_api.h) | 13 | ||||
-rw-r--r-- | ppapi/thunk/ppb_udp_socket_private_thunk.cc (renamed from ppapi/thunk/ppb_flash_udp_socket_thunk.cc) | 28 | ||||
-rw-r--r-- | ppapi/thunk/resource_creation_api.h | 4 | ||||
-rw-r--r-- | ppapi/thunk/thunk.h | 10 |
7 files changed, 58 insertions, 50 deletions
diff --git a/ppapi/thunk/interfaces_ppb_private.h b/ppapi/thunk/interfaces_ppb_private.h index 6183ee4..17defe9 100644 --- a/ppapi/thunk/interfaces_ppb_private.h +++ b/ppapi/thunk/interfaces_ppb_private.h @@ -8,11 +8,18 @@ #include "ppapi/thunk/interfaces_preamble.h" PROXIED_API(PPB_Broker) +PROXIED_API(PPB_TCPSocket_Private) +PROXIED_API(PPB_UDPSocket_Private) PROXIED_IFACE(PPB_Broker, PPB_BROKER_TRUSTED_INTERFACE_0_2, PPB_BrokerTrusted) PROXIED_IFACE(PPB_Instance, PPB_FLASHFULLSCREEN_INTERFACE, PPB_FlashFullscreen) PROXIED_IFACE(NoAPIName, PPB_NETADDRESS_PRIVATE_INTERFACE, PPB_NetAddress_Private) +PROXIED_IFACE(PPB_TCPSocket_Private, PPB_TCPSOCKET_PRIVATE_INTERFACE, + PPB_TCPSocket_Private) +PROXIED_IFACE(PPB_UDPSocket_Private, PPB_UDPSOCKET_PRIVATE_INTERFACE, + PPB_UDPSocket_Private) + // Map the old fullscreen interface string to the Flash one, which is the same // at the ABI level. TODO(polina): remove this when Flash is updated. PROXIED_IFACE(PPB_Instance, PPB_FULLSCREEN_DEV_INTERFACE_0_4, diff --git a/ppapi/thunk/ppb_flash_tcp_socket_api.h b/ppapi/thunk/ppb_tcp_socket_private_api.h index 7aefcae..0483856 100644 --- a/ppapi/thunk/ppb_flash_tcp_socket_api.h +++ b/ppapi/thunk/ppb_tcp_socket_private_api.h @@ -2,17 +2,17 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef PPAPI_THUNK_PPB_FLASH_TCP_SOCKET_API_H_ -#define PPAPI_THUNK_PPB_FLASH_TCP_SOCKET_API_H_ +#ifndef PPAPI_THUNK_PPB_TCP_SOCKET_PRIVATE_API_H_ +#define PPAPI_THUNK_PPB_TCP_SOCKET_PRIVATE_API_H_ -#include "ppapi/c/private/ppb_flash_tcp_socket.h" +#include "ppapi/c/private/ppb_tcp_socket_private.h" namespace ppapi { namespace thunk { -class PPB_Flash_TCPSocket_API { +class PPB_TCPSocket_Private_API { public: - virtual ~PPB_Flash_TCPSocket_API() {} + virtual ~PPB_TCPSocket_Private_API() {} virtual int32_t Connect(const char* host, uint16_t port, @@ -36,4 +36,4 @@ class PPB_Flash_TCPSocket_API { } // namespace thunk } // namespace ppapi -#endif // PPAPI_THUNK_PPB_FLASH_TCP_SOCKET_API_H_ +#endif // PPAPI_THUNK_PPB_TCP_SOCKET_PRIVATE_API_H_ diff --git a/ppapi/thunk/ppb_flash_tcp_socket_thunk.cc b/ppapi/thunk/ppb_tcp_socket_private_thunk.cc index de21042..245654d 100644 --- a/ppapi/thunk/ppb_flash_tcp_socket_thunk.cc +++ b/ppapi/thunk/ppb_tcp_socket_private_thunk.cc @@ -4,11 +4,11 @@ #include "ppapi/c/pp_completion_callback.h" #include "ppapi/c/pp_errors.h" -#include "ppapi/c/private/ppb_flash_tcp_socket.h" +#include "ppapi/c/private/ppb_tcp_socket_private.h" #include "ppapi/thunk/common.h" #include "ppapi/thunk/enter.h" #include "ppapi/thunk/thunk.h" -#include "ppapi/thunk/ppb_flash_tcp_socket_api.h" +#include "ppapi/thunk/ppb_tcp_socket_private_api.h" #include "ppapi/thunk/resource_creation_api.h" namespace ppapi { @@ -20,11 +20,11 @@ PP_Resource Create(PP_Instance instance) { EnterFunction<ResourceCreationAPI> enter(instance, true); if (enter.failed()) return 0; - return enter.functions()->CreateFlashTCPSocket(instance); + return enter.functions()->CreateTCPSocketPrivate(instance); } -PP_Bool IsFlashTCPSocket(PP_Resource resource) { - EnterResource<PPB_Flash_TCPSocket_API> enter(resource, false); +PP_Bool IsTCPSocket(PP_Resource resource) { + EnterResource<PPB_TCPSocket_Private_API> enter(resource, false); return PP_FromBool(enter.succeeded()); } @@ -32,7 +32,7 @@ int32_t Connect(PP_Resource tcp_socket, const char* host, uint16_t port, PP_CompletionCallback callback) { - EnterResource<PPB_Flash_TCPSocket_API> enter(tcp_socket, true); + EnterResource<PPB_TCPSocket_Private_API> enter(tcp_socket, true); if (enter.failed()) return MayForceCallback(callback, PP_ERROR_BADRESOURCE); int32_t result = enter.object()->Connect(host, port, callback); @@ -42,7 +42,7 @@ int32_t Connect(PP_Resource tcp_socket, int32_t ConnectWithNetAddress(PP_Resource tcp_socket, const PP_NetAddress_Private* addr, PP_CompletionCallback callback) { - EnterResource<PPB_Flash_TCPSocket_API> enter(tcp_socket, true); + EnterResource<PPB_TCPSocket_Private_API> enter(tcp_socket, true); if (enter.failed()) return MayForceCallback(callback, PP_ERROR_BADRESOURCE); int32_t result = enter.object()->ConnectWithNetAddress(addr, callback); @@ -51,7 +51,7 @@ int32_t ConnectWithNetAddress(PP_Resource tcp_socket, PP_Bool GetLocalAddress(PP_Resource tcp_socket, PP_NetAddress_Private* local_addr) { - EnterResource<PPB_Flash_TCPSocket_API> enter(tcp_socket, true); + EnterResource<PPB_TCPSocket_Private_API> enter(tcp_socket, true); if (enter.failed()) return PP_FALSE; return enter.object()->GetLocalAddress(local_addr); @@ -59,7 +59,7 @@ PP_Bool GetLocalAddress(PP_Resource tcp_socket, PP_Bool GetRemoteAddress(PP_Resource tcp_socket, PP_NetAddress_Private* remote_addr) { - EnterResource<PPB_Flash_TCPSocket_API> enter(tcp_socket, true); + EnterResource<PPB_TCPSocket_Private_API> enter(tcp_socket, true); if (enter.failed()) return PP_FALSE; return enter.object()->GetRemoteAddress(remote_addr); @@ -69,7 +69,7 @@ int32_t SSLHandshake(PP_Resource tcp_socket, const char* server_name, uint16_t server_port, PP_CompletionCallback callback) { - EnterResource<PPB_Flash_TCPSocket_API> enter(tcp_socket, true); + EnterResource<PPB_TCPSocket_Private_API> enter(tcp_socket, true); if (enter.failed()) return MayForceCallback(callback, PP_ERROR_BADRESOURCE); int32_t result = enter.object()->SSLHandshake(server_name, server_port, @@ -81,7 +81,7 @@ int32_t Read(PP_Resource tcp_socket, char* buffer, int32_t bytes_to_read, PP_CompletionCallback callback) { - EnterResource<PPB_Flash_TCPSocket_API> enter(tcp_socket, true); + EnterResource<PPB_TCPSocket_Private_API> enter(tcp_socket, true); if (enter.failed()) return MayForceCallback(callback, PP_ERROR_BADRESOURCE); int32_t result = enter.object()->Read(buffer, bytes_to_read, callback); @@ -92,7 +92,7 @@ int32_t Write(PP_Resource tcp_socket, const char* buffer, int32_t bytes_to_write, PP_CompletionCallback callback) { - EnterResource<PPB_Flash_TCPSocket_API> enter(tcp_socket, true); + EnterResource<PPB_TCPSocket_Private_API> enter(tcp_socket, true); if (enter.failed()) return MayForceCallback(callback, PP_ERROR_BADRESOURCE); int32_t result = enter.object()->Write(buffer, bytes_to_write, callback); @@ -100,14 +100,14 @@ int32_t Write(PP_Resource tcp_socket, } void Disconnect(PP_Resource tcp_socket) { - EnterResource<PPB_Flash_TCPSocket_API> enter(tcp_socket, true); + EnterResource<PPB_TCPSocket_Private_API> enter(tcp_socket, true); if (enter.succeeded()) enter.object()->Disconnect(); } -const PPB_Flash_TCPSocket g_ppb_flash_tcp_socket_thunk = { +const PPB_TCPSocket_Private g_ppb_tcp_socket_thunk = { &Create, - &IsFlashTCPSocket, + &IsTCPSocket, &Connect, &ConnectWithNetAddress, &GetLocalAddress, @@ -120,8 +120,8 @@ const PPB_Flash_TCPSocket g_ppb_flash_tcp_socket_thunk = { } // namespace -const PPB_Flash_TCPSocket* GetPPB_Flash_TCPSocket_Thunk() { - return &g_ppb_flash_tcp_socket_thunk; +const PPB_TCPSocket_Private* GetPPB_TCPSocket_Private_Thunk() { + return &g_ppb_tcp_socket_thunk; } } // namespace thunk diff --git a/ppapi/thunk/ppb_flash_udp_socket_api.h b/ppapi/thunk/ppb_udp_socket_private_api.h index 9a30aef..e79b313 100644 --- a/ppapi/thunk/ppb_flash_udp_socket_api.h +++ b/ppapi/thunk/ppb_udp_socket_private_api.h @@ -2,17 +2,17 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef PPAPI_THUNK_PPB_FLASH_UDP_SOCKET_API_H_ -#define PPAPI_THUNK_PPB_FLASH_UDP_SOCKET_API_H_ +#ifndef PPAPI_THUNK_PPB_UDP_SOCKET_PRIVATE_API_H_ +#define PPAPI_THUNK_PPB_UDP_SOCKET_PRIVATE_API_H_ -#include "ppapi/c/private/ppb_flash_udp_socket.h" +#include "ppapi/c/private/ppb_udp_socket_private.h" namespace ppapi { namespace thunk { -class PPB_Flash_UDPSocket_API { +class PPB_UDPSocket_Private_API { public: - virtual ~PPB_Flash_UDPSocket_API() {} + virtual ~PPB_UDPSocket_Private_API() {} virtual int32_t Bind(const PP_NetAddress_Private* addr, PP_CompletionCallback callback) = 0; @@ -30,5 +30,4 @@ class PPB_Flash_UDPSocket_API { } // namespace thunk } // namespace ppapi -#endif // PPAPI_THUNK_PPB_FLASH_UDP_SOCKET_API_H_ - +#endif // PPAPI_THUNK_PPB_UDP_SOCKET_PRIVATE_API_H_ diff --git a/ppapi/thunk/ppb_flash_udp_socket_thunk.cc b/ppapi/thunk/ppb_udp_socket_private_thunk.cc index 7618008..c2c4b5f 100644 --- a/ppapi/thunk/ppb_flash_udp_socket_thunk.cc +++ b/ppapi/thunk/ppb_udp_socket_private_thunk.cc @@ -4,10 +4,10 @@ #include "ppapi/c/pp_completion_callback.h" #include "ppapi/c/pp_errors.h" -#include "ppapi/c/private/ppb_flash_udp_socket.h" +#include "ppapi/c/private/ppb_udp_socket_private.h" #include "ppapi/thunk/common.h" #include "ppapi/thunk/enter.h" -#include "ppapi/thunk/ppb_flash_udp_socket_api.h" +#include "ppapi/thunk/ppb_udp_socket_private_api.h" #include "ppapi/thunk/resource_creation_api.h" #include "ppapi/thunk/thunk.h" @@ -20,18 +20,18 @@ PP_Resource Create(PP_Instance instance) { EnterFunction<ResourceCreationAPI> enter(instance, true); if (enter.failed()) return 0; - return enter.functions()->CreateFlashUDPSocket(instance); + return enter.functions()->CreateUDPSocketPrivate(instance); } -PP_Bool IsFlashUDPSocket(PP_Resource resource) { - EnterResource<PPB_Flash_UDPSocket_API> enter(resource, false); +PP_Bool IsUDPSocket(PP_Resource resource) { + EnterResource<PPB_UDPSocket_Private_API> enter(resource, false); return PP_FromBool(enter.succeeded()); } int32_t Bind(PP_Resource udp_socket, const PP_NetAddress_Private *addr, PP_CompletionCallback callback) { - EnterResource<PPB_Flash_UDPSocket_API> enter(udp_socket, true); + EnterResource<PPB_UDPSocket_Private_API> enter(udp_socket, true); if (enter.failed()) return MayForceCallback(callback, PP_ERROR_BADRESOURCE); int32_t result = enter.object()->Bind(addr, callback); @@ -42,7 +42,7 @@ int32_t RecvFrom(PP_Resource udp_socket, char* buffer, int32_t num_bytes, PP_CompletionCallback callback) { - EnterResource<PPB_Flash_UDPSocket_API> enter(udp_socket, true); + EnterResource<PPB_UDPSocket_Private_API> enter(udp_socket, true); if (enter.failed()) return MayForceCallback(callback, PP_ERROR_BADRESOURCE); int32_t result = enter.object()->RecvFrom(buffer, @@ -53,7 +53,7 @@ int32_t RecvFrom(PP_Resource udp_socket, PP_Bool GetRecvFromAddress(PP_Resource udp_socket, PP_NetAddress_Private* addr) { - EnterResource<PPB_Flash_UDPSocket_API> enter(udp_socket, true); + EnterResource<PPB_UDPSocket_Private_API> enter(udp_socket, true); if (enter.failed()) return PP_FALSE; return enter.object()->GetRecvFromAddress(addr); @@ -64,7 +64,7 @@ int32_t SendTo(PP_Resource udp_socket, int32_t num_bytes, const PP_NetAddress_Private* addr, PP_CompletionCallback callback) { - EnterResource<PPB_Flash_UDPSocket_API> enter(udp_socket, true); + EnterResource<PPB_UDPSocket_Private_API> enter(udp_socket, true); if (enter.failed()) return MayForceCallback(callback, PP_ERROR_BADRESOURCE); int32_t result = enter.object()->SendTo(buffer, num_bytes, addr, callback); @@ -72,14 +72,14 @@ int32_t SendTo(PP_Resource udp_socket, } void Close(PP_Resource udp_socket) { - EnterResource<PPB_Flash_UDPSocket_API> enter(udp_socket, true); + EnterResource<PPB_UDPSocket_Private_API> enter(udp_socket, true); if (enter.succeeded()) enter.object()->Close(); } -const PPB_Flash_UDPSocket g_ppb_flash_udp_socket_thunk = { +const PPB_UDPSocket_Private g_ppb_udp_socket_thunk = { &Create, - &IsFlashUDPSocket, + &IsUDPSocket, &Bind, &RecvFrom, &GetRecvFromAddress, @@ -89,8 +89,8 @@ const PPB_Flash_UDPSocket g_ppb_flash_udp_socket_thunk = { } // namespace -const PPB_Flash_UDPSocket* GetPPB_Flash_UDPSocket_Thunk() { - return &g_ppb_flash_udp_socket_thunk; +const PPB_UDPSocket_Private* GetPPB_UDPSocket_Private_Thunk() { + return &g_ppb_udp_socket_thunk; } } // namespace thunk diff --git a/ppapi/thunk/resource_creation_api.h b/ppapi/thunk/resource_creation_api.h index d1566cd..dd37bed 100644 --- a/ppapi/thunk/resource_creation_api.h +++ b/ppapi/thunk/resource_creation_api.h @@ -70,8 +70,6 @@ class ResourceCreationAPI { virtual PP_Resource CreateFlashMenu(PP_Instance instance, const PP_Flash_Menu* menu_data) = 0; virtual PP_Resource CreateFlashNetConnector(PP_Instance instance) = 0; - virtual PP_Resource CreateFlashTCPSocket(PP_Instance instace) = 0; - virtual PP_Resource CreateFlashUDPSocket(PP_Instance instace) = 0; // Note: can't be called CreateFont due to Windows #defines. virtual PP_Resource CreateFontObject( PP_Instance instance, @@ -110,9 +108,11 @@ class ResourceCreationAPI { virtual PP_Resource CreateSurface3D(PP_Instance instance, PP_Config3D_Dev config, const int32_t* attrib_list) = 0; + virtual PP_Resource CreateTCPSocketPrivate(PP_Instance instace) = 0; virtual PP_Resource CreateTransport(PP_Instance instance, const char* name, PP_TransportType type) = 0; + virtual PP_Resource CreateUDPSocketPrivate(PP_Instance instace) = 0; virtual PP_Resource CreateURLLoader(PP_Instance instance) = 0; virtual PP_Resource CreateURLRequestInfo( PP_Instance instance, diff --git a/ppapi/thunk/thunk.h b/ppapi/thunk/thunk.h index c197745..8990b94 100644 --- a/ppapi/thunk/thunk.h +++ b/ppapi/thunk/thunk.h @@ -36,12 +36,12 @@ struct PPB_FileIOTrusted; struct PPB_Flash_Clipboard; struct PPB_Flash_Menu; struct PPB_Flash_NetConnector; -struct PPB_Flash_TCPSocket; -struct PPB_Flash_UDPSocket; struct PPB_Graphics3D; struct PPB_Graphics3DTrusted; struct PPB_ImageDataTrusted; struct PPB_Instance_Private; +struct PPB_TCPSocket_Private; +struct PPB_UDPSocket_Private; struct PPB_URLLoaderTrusted; typedef PPB_Instance PPB_Instance_1_0; @@ -64,12 +64,14 @@ PPAPI_THUNK_EXPORT const PPB_Flash_Clipboard* GetPPB_Flash_Clipboard_Thunk(); PPAPI_THUNK_EXPORT const PPB_Flash_Menu* GetPPB_Flash_Menu_Thunk(); PPAPI_THUNK_EXPORT const PPB_Flash_NetConnector* GetPPB_Flash_NetConnector_Thunk(); -PPAPI_THUNK_EXPORT const PPB_Flash_TCPSocket* GetPPB_Flash_TCPSocket_Thunk(); -PPAPI_THUNK_EXPORT const PPB_Flash_UDPSocket* GetPPB_Flash_UDPSocket_Thunk(); PPAPI_THUNK_EXPORT const PPB_Graphics3DTrusted* GetPPB_Graphics3DTrusted_Thunk(); PPAPI_THUNK_EXPORT const PPB_ImageDataTrusted* GetPPB_ImageDataTrusted_Thunk(); PPAPI_THUNK_EXPORT const PPB_Instance_Private* GetPPB_Instance_Private_Thunk(); +PPAPI_THUNK_EXPORT const PPB_TCPSocket_Private* + GetPPB_TCPSocket_Private_Thunk(); +PPAPI_THUNK_EXPORT const PPB_UDPSocket_Private* + GetPPB_UDPSocket_Private_Thunk(); PPAPI_THUNK_EXPORT const PPB_URLLoaderTrusted* GetPPB_URLLoaderTrusted_Thunk(); } // namespace thunk |