diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-30 22:44:53 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-30 22:44:53 +0000 |
commit | 4fb0f20f7cd1e2b82eb7295f62dc6cb31bb262c5 (patch) | |
tree | 50be96f44d854af30b3c1d10ad0b7658da2e1155 /ppapi | |
parent | b5b1563868c6771a52110ab93fa0c12ce6c545ec (diff) | |
download | chromium_src-4fb0f20f7cd1e2b82eb7295f62dc6cb31bb262c5.zip chromium_src-4fb0f20f7cd1e2b82eb7295f62dc6cb31bb262c5.tar.gz chromium_src-4fb0f20f7cd1e2b82eb7295f62dc6cb31bb262c5.tar.bz2 |
Remove PPB_Transport_Dev API.
BUG=109630
Review URL: https://chromiumcodereview.appspot.com/10454058
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139660 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi')
-rw-r--r-- | ppapi/api/dev/ppb_transport_dev.idl | 183 | ||||
-rw-r--r-- | ppapi/c/dev/ppb_transport_dev.h | 186 | ||||
-rw-r--r-- | ppapi/cpp/dev/transport_dev.cc | 94 | ||||
-rw-r--r-- | ppapi/cpp/dev/transport_dev.h | 37 | ||||
-rw-r--r-- | ppapi/ppapi_proxy_untrusted.gypi | 1 | ||||
-rw-r--r-- | ppapi/ppapi_shared.gypi | 2 | ||||
-rw-r--r-- | ppapi/ppapi_sources.gypi | 13 | ||||
-rw-r--r-- | ppapi/ppapi_tests.gypi | 6 | ||||
-rw-r--r-- | ppapi/proxy/resource_creation_proxy.cc | 7 | ||||
-rw-r--r-- | ppapi/proxy/resource_creation_proxy.h | 3 | ||||
-rw-r--r-- | ppapi/shared_impl/resource.h | 1 | ||||
-rw-r--r-- | ppapi/tests/all_c_includes.h | 1 | ||||
-rw-r--r-- | ppapi/tests/all_cpp_includes.h | 1 | ||||
-rw-r--r-- | ppapi/tests/test_transport.cc | 373 | ||||
-rw-r--r-- | ppapi/tests/test_transport.h | 51 | ||||
-rw-r--r-- | ppapi/thunk/interfaces_ppb_public_dev.h | 3 | ||||
-rw-r--r-- | ppapi/thunk/ppb_transport_api.h | 33 | ||||
-rw-r--r-- | ppapi/thunk/ppb_transport_thunk.cc | 112 | ||||
-rw-r--r-- | ppapi/thunk/resource_creation_api.h | 4 |
19 files changed, 0 insertions, 1111 deletions
diff --git a/ppapi/api/dev/ppb_transport_dev.idl b/ppapi/api/dev/ppb_transport_dev.idl deleted file mode 100644 index 24d552e..0000000 --- a/ppapi/api/dev/ppb_transport_dev.idl +++ /dev/null @@ -1,183 +0,0 @@ -/* Copyright (c) 2012 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. - */ - -/** - * This file defines the <code>PPB_Transport_Dev</code> interface. - */ -label Chrome { - M14 = 0.7 -}; - -[assert_size(4)] -enum PP_TransportType { - PP_TRANSPORTTYPE_DATAGRAM = 0, - PP_TRANSPORTTYPE_STREAM = 1 -}; - -[assert_size(4)] -enum PP_TransportProperty { - /** - * STUN server address and port, e.g "stun.example.com:19302". - */ - PP_TRANSPORTPROPERTY_STUN_SERVER = 0, - - /** - * Relay server address and port, e.g. "relay.example.com:12344". - */ - PP_TRANSPORTPROPERTY_RELAY_SERVER = 1, - - /** - * Username for the relay server. - */ - PP_TRANSPORTPROPERTY_RELAY_USERNAME = 2, - - /** - * Password for the relay server. - */ - PP_TRANSPORTPROPERTY_RELAY_PASSWORD = 3, - - /** - * Type of Relay server. Must be one of the PP_TransportRelayMode values. By - * default is set to PP_TRANSPORTRELAYMODE_TURN. - */ - PP_TRANSPORTPROPERTY_RELAY_MODE = 4, - - /** - * TCP receive window in bytes. Takes effect only for PseudoTCP connections. - */ - PP_TRANSPORTPROPERTY_TCP_RECEIVE_WINDOW = 5, - - /** - * TCP send window in bytes. Takes effect only for PseudoTCP connections. - */ - PP_TRANSPORTPROPERTY_TCP_SEND_WINDOW = 6, - - /** - * Boolean value that disables Neagle's algorithm when set to true. When - * Neagle's algorithm is disabled, all outgoing packets are sent as soon as - * possible. When set to false (by default) data may be buffered until there - * is a sufficient amount to send. - */ - PP_TRANSPORTPROPERTY_TCP_NO_DELAY = 7, - - /** - * Delay for ACK packets in milliseconds. By default set to 100ms. - */ - PP_TRANSPORTPROPERTY_TCP_ACK_DELAY = 8, - - /** - * Boolean value that disables TCP-based transports when set to true. By - * default set to false. - */ - PP_TRANSPORTPROPERTY_DISABLE_TCP_TRANSPORT = 9 -}; - -[assert_size(4)] -enum PP_TransportRelayMode { - /** - * RFC5766 compliant relay server. - */ - PP_TRANSPORTRELAYMODE_TURN = 0, - - /** - * Legacy Google relay server. - */ - PP_TRANSPORTRELAYMODE_GOOGLE = 1 -}; - -/** - * The transport interface provides peer-to-peer communication. - * - * TODO(juberti): other getters/setters - * connect state - * connect type, protocol - * RTT - */ -interface PPB_Transport_Dev { - /** - * Creates a new transport object with the specified name using the - * specified protocol. - */ - PP_Resource CreateTransport( - [in] PP_Instance instance, - [in] str_t name, - [in] PP_TransportType type); - - /** - * Returns PP_TRUE if resource is a Transport, PP_FALSE otherwise. - */ - PP_Bool IsTransport( - [in] PP_Resource resource); - - /** - * Returns PP_TRUE if the transport is currently writable (i.e. can - * send data to the remote peer), PP_FALSE otherwise. - */ - PP_Bool IsWritable( - [in] PP_Resource transport); - - /** - * Sets various configuration properties of the transport. - */ - int32_t SetProperty( - [in] PP_Resource transport, - [in] PP_TransportProperty property, - [in] PP_Var value); - - /** - * Establishes a connection to the remote peer. Returns - * PP_OK_COMPLETIONPENDING and notifies on |cb| when connectivity is - * established (or timeout occurs). - */ - int32_t Connect( - [in] PP_Resource transport, - [in] PP_CompletionCallback cb); - - /** - * Obtains another ICE candidate address to be provided to the - * remote peer. Returns PP_OK_COMPLETIONPENDING if there are no more - * addresses to be sent. After the callback is called - * GetNextAddress() must be called again to get the address. - */ - int32_t GetNextAddress( - [in] PP_Resource transport, - [out] PP_Var address, - [in] PP_CompletionCallback cb); - - /** - * Provides an ICE candidate address that was received from the remote peer. - */ - int32_t ReceiveRemoteAddress( - [in] PP_Resource transport, - [in] PP_Var address); - - /** - * Like recv(), receives data. Returns PP_OK_COMPLETIONPENDING if there is - * currently no data to receive. In that case, the |data| pointer should - * remain valid until the callback is called. - */ - int32_t Recv( - [in] PP_Resource transport, - [out] mem_t data, - [in] uint32_t len, - [in] PP_CompletionCallback cb); - - /** - * Like send(), sends data. Returns PP_OK_COMPLETIONPENDING if the socket is - * currently flow-controlled. In that case, the |data| pointer should remain - * valid until the callback is called. - */ - int32_t Send( - [in] PP_Resource transport, - [in] mem_t data, - [in] uint32_t len, - [in] PP_CompletionCallback cb); - - /** - * Disconnects from the remote peer. - */ - int32_t Close( - [in] PP_Resource transport); -}; diff --git a/ppapi/c/dev/ppb_transport_dev.h b/ppapi/c/dev/ppb_transport_dev.h deleted file mode 100644 index 47c4f3c..0000000 --- a/ppapi/c/dev/ppb_transport_dev.h +++ /dev/null @@ -1,186 +0,0 @@ -/* Copyright (c) 2012 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_transport_dev.idl modified Wed Oct 5 14:06:02 2011. */ - -#ifndef PPAPI_C_DEV_PPB_TRANSPORT_DEV_H_ -#define PPAPI_C_DEV_PPB_TRANSPORT_DEV_H_ - -#include "ppapi/c/pp_bool.h" -#include "ppapi/c/pp_completion_callback.h" -#include "ppapi/c/pp_instance.h" -#include "ppapi/c/pp_macros.h" -#include "ppapi/c/pp_resource.h" -#include "ppapi/c/pp_stdint.h" -#include "ppapi/c/pp_var.h" - -#define PPB_TRANSPORT_DEV_INTERFACE_0_7 "PPB_Transport(Dev);0.7" -#define PPB_TRANSPORT_DEV_INTERFACE PPB_TRANSPORT_DEV_INTERFACE_0_7 - -/** - * @file - * This file defines the <code>PPB_Transport_Dev</code> interface. - */ - - -/** - * @addtogroup Enums - * @{ - */ -typedef enum { - PP_TRANSPORTTYPE_DATAGRAM = 0, - PP_TRANSPORTTYPE_STREAM = 1 -} PP_TransportType; -PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_TransportType, 4); - -typedef enum { - /** - * STUN server address and port, e.g "stun.example.com:19302". - */ - PP_TRANSPORTPROPERTY_STUN_SERVER = 0, - /** - * Relay server address and port, e.g. "relay.example.com:12344". - */ - PP_TRANSPORTPROPERTY_RELAY_SERVER = 1, - /** - * Username for the relay server. - */ - PP_TRANSPORTPROPERTY_RELAY_USERNAME = 2, - /** - * Password for the relay server. - */ - PP_TRANSPORTPROPERTY_RELAY_PASSWORD = 3, - /** - * Type of Relay server. Must be one of the PP_TransportRelayMode values. By - * default is set to PP_TRANSPORTRELAYMODE_TURN. - */ - PP_TRANSPORTPROPERTY_RELAY_MODE = 4, - /** - * TCP receive window in bytes. Takes effect only for PseudoTCP connections. - */ - PP_TRANSPORTPROPERTY_TCP_RECEIVE_WINDOW = 5, - /** - * TCP send window in bytes. Takes effect only for PseudoTCP connections. - */ - PP_TRANSPORTPROPERTY_TCP_SEND_WINDOW = 6, - /** - * Boolean value that disables Neagle's algorithm when set to true. When - * Neagle's algorithm is disabled, all outgoing packets are sent as soon as - * possible. When set to false (by default) data may be buffered until there - * is a sufficient amount to send. - */ - PP_TRANSPORTPROPERTY_TCP_NO_DELAY = 7, - /** - * Delay for ACK packets in milliseconds. By default set to 100ms. - */ - PP_TRANSPORTPROPERTY_TCP_ACK_DELAY = 8, - /** - * Boolean value that disables TCP-based transports when set to true. By - * default set to false. - */ - PP_TRANSPORTPROPERTY_DISABLE_TCP_TRANSPORT = 9 -} PP_TransportProperty; -PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_TransportProperty, 4); - -typedef enum { - /** - * RFC5766 compliant relay server. - */ - PP_TRANSPORTRELAYMODE_TURN = 0, - /** - * Legacy Google relay server. - */ - PP_TRANSPORTRELAYMODE_GOOGLE = 1 -} PP_TransportRelayMode; -PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_TransportRelayMode, 4); -/** - * @} - */ - -/** - * @addtogroup Interfaces - * @{ - */ -/** - * The transport interface provides peer-to-peer communication. - * - * TODO(juberti): other getters/setters - * connect state - * connect type, protocol - * RTT - */ -struct PPB_Transport_Dev_0_7 { - /** - * Creates a new transport object with the specified name using the - * specified protocol. - */ - PP_Resource (*CreateTransport)(PP_Instance instance, - const char* name, - PP_TransportType type); - /** - * Returns PP_TRUE if resource is a Transport, PP_FALSE otherwise. - */ - PP_Bool (*IsTransport)(PP_Resource resource); - /** - * Returns PP_TRUE if the transport is currently writable (i.e. can - * send data to the remote peer), PP_FALSE otherwise. - */ - PP_Bool (*IsWritable)(PP_Resource transport); - /** - * Sets various configuration properties of the transport. - */ - int32_t (*SetProperty)(PP_Resource transport, - PP_TransportProperty property, - struct PP_Var value); - /** - * Establishes a connection to the remote peer. Returns - * PP_OK_COMPLETIONPENDING and notifies on |cb| when connectivity is - * established (or timeout occurs). - */ - int32_t (*Connect)(PP_Resource transport, struct PP_CompletionCallback cb); - /** - * Obtains another ICE candidate address to be provided to the - * remote peer. Returns PP_OK_COMPLETIONPENDING if there are no more - * addresses to be sent. After the callback is called - * GetNextAddress() must be called again to get the address. - */ - int32_t (*GetNextAddress)(PP_Resource transport, - struct PP_Var* address, - struct PP_CompletionCallback cb); - /** - * Provides an ICE candidate address that was received from the remote peer. - */ - int32_t (*ReceiveRemoteAddress)(PP_Resource transport, struct PP_Var address); - /** - * Like recv(), receives data. Returns PP_OK_COMPLETIONPENDING if there is - * currently no data to receive. In that case, the |data| pointer should - * remain valid until the callback is called. - */ - int32_t (*Recv)(PP_Resource transport, - void* data, - uint32_t len, - struct PP_CompletionCallback cb); - /** - * Like send(), sends data. Returns PP_OK_COMPLETIONPENDING if the socket is - * currently flow-controlled. In that case, the |data| pointer should remain - * valid until the callback is called. - */ - int32_t (*Send)(PP_Resource transport, - const void* data, - uint32_t len, - struct PP_CompletionCallback cb); - /** - * Disconnects from the remote peer. - */ - int32_t (*Close)(PP_Resource transport); -}; - -typedef struct PPB_Transport_Dev_0_7 PPB_Transport_Dev; -/** - * @} - */ - -#endif /* PPAPI_C_DEV_PPB_TRANSPORT_DEV_H_ */ - diff --git a/ppapi/cpp/dev/transport_dev.cc b/ppapi/cpp/dev/transport_dev.cc deleted file mode 100644 index c1153b8..0000000 --- a/ppapi/cpp/dev/transport_dev.cc +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) 2011 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. - -#include "ppapi/cpp/dev/transport_dev.h" - -#include "ppapi/c/pp_errors.h" -#include "ppapi/cpp/instance_handle.h" -#include "ppapi/cpp/resource.h" -#include "ppapi/cpp/module.h" -#include "ppapi/cpp/module_impl.h" -#include "ppapi/cpp/var.h" - -namespace pp { - -namespace { - -template <> const char* interface_name<PPB_Transport_Dev>() { - return PPB_TRANSPORT_DEV_INTERFACE; -} - -} // namespace - -Transport_Dev::Transport_Dev(const InstanceHandle& instance, - const char* name, - PP_TransportType type) { - if (has_interface<PPB_Transport_Dev>()) - PassRefFromConstructor(get_interface<PPB_Transport_Dev>()->CreateTransport( - instance.pp_instance(), name, type)); -} - -bool Transport_Dev::IsWritable() { - if (!has_interface<PPB_Transport_Dev>()) - return false; - return PP_ToBool( - get_interface<PPB_Transport_Dev>()->IsWritable(pp_resource())); -} - -int32_t Transport_Dev::SetProperty(PP_TransportProperty property, - const Var& value) { - if (!has_interface<PPB_Transport_Dev>()) - return PP_ERROR_NOINTERFACE; - return get_interface<PPB_Transport_Dev>()->SetProperty( - pp_resource(), property, value.pp_var()); -} - -int32_t Transport_Dev::Connect(const CompletionCallback& cc) { - if (!has_interface<PPB_Transport_Dev>()) - return cc.MayForce(PP_ERROR_NOINTERFACE); - return get_interface<PPB_Transport_Dev>()->Connect( - pp_resource(), cc.pp_completion_callback()); -} - -int32_t Transport_Dev::GetNextAddress(Var* address, - const CompletionCallback& cc) { - if (!has_interface<PPB_Transport_Dev>()) - return cc.MayForce(PP_ERROR_NOINTERFACE); - PP_Var temp_address = PP_MakeUndefined(); - int32_t ret_val = get_interface<PPB_Transport_Dev>()->GetNextAddress( - pp_resource(), &temp_address, cc.pp_completion_callback()); - *address = Var(PASS_REF, temp_address); - return ret_val; -} - -int32_t Transport_Dev::ReceiveRemoteAddress(const pp::Var& address) { - if (!has_interface<PPB_Transport_Dev>()) - return PP_ERROR_NOINTERFACE; - return get_interface<PPB_Transport_Dev>()->ReceiveRemoteAddress( - pp_resource(), address.pp_var()); -} - -int32_t Transport_Dev::Recv(void* data, uint32_t len, - const CompletionCallback& cc) { - if (!has_interface<PPB_Transport_Dev>()) - return cc.MayForce(PP_ERROR_NOINTERFACE); - return get_interface<PPB_Transport_Dev>()->Recv( - pp_resource(), data, len, cc.pp_completion_callback()); -} - -int32_t Transport_Dev::Send(const void* data, uint32_t len, - const CompletionCallback& cc) { - if (!has_interface<PPB_Transport_Dev>()) - return cc.MayForce(PP_ERROR_NOINTERFACE); - return get_interface<PPB_Transport_Dev>()->Send( - pp_resource(), data, len, cc.pp_completion_callback()); -} - -int32_t Transport_Dev::Close() { - if (!has_interface<PPB_Transport_Dev>()) - return PP_ERROR_NOINTERFACE; - return get_interface<PPB_Transport_Dev>()->Close(pp_resource()); -} - -} // namespace pp diff --git a/ppapi/cpp/dev/transport_dev.h b/ppapi/cpp/dev/transport_dev.h deleted file mode 100644 index 8545583..0000000 --- a/ppapi/cpp/dev/transport_dev.h +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2011 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. - -#ifndef PPAPI_CPP_DEV_TRANSPORT_DEV_H_ -#define PPAPI_CPP_DEV_TRANSPORT_DEV_H_ - -#include "ppapi/c/dev/ppb_transport_dev.h" -#include "ppapi/cpp/completion_callback.h" -#include "ppapi/cpp/resource.h" - -namespace pp { - -class InstanceHandle; -class Var; - -class Transport_Dev : public Resource { - public: - Transport_Dev(const InstanceHandle& instance, - const char* name, - PP_TransportType type); - - bool IsWritable(); - int32_t SetProperty(PP_TransportProperty property, const Var& value); - int32_t Connect(const CompletionCallback& cc); - int32_t GetNextAddress(pp::Var* address, const CompletionCallback& cc); - int32_t ReceiveRemoteAddress(const pp::Var& address); - int32_t Recv(void* data, uint32_t len, - const CompletionCallback& cc); - int32_t Send(const void* data, uint32_t len, - const CompletionCallback& cb); - int32_t Close(); -}; - -} // namespace pp - -#endif // PPAPI_CPP_DEV_TRANSPORT_DEV_H_ diff --git a/ppapi/ppapi_proxy_untrusted.gypi b/ppapi/ppapi_proxy_untrusted.gypi index c6d117a..4f86d63 100644 --- a/ppapi/ppapi_proxy_untrusted.gypi +++ b/ppapi/ppapi_proxy_untrusted.gypi @@ -323,7 +323,6 @@ # 'thunk/ppb_tcp_server_socket_private_thunk.cc', # 'thunk/ppb_tcp_socket_private_thunk.cc', 'thunk/ppb_text_input_thunk.cc', -# 'thunk/ppb_transport_thunk.cc', # 'thunk/ppb_udp_socket_private_thunk.cc', 'thunk/ppb_url_loader_thunk.cc', 'thunk/ppb_url_request_info_thunk.cc', diff --git a/ppapi/ppapi_shared.gypi b/ppapi/ppapi_shared.gypi index f04a0c6..d9d0140 100644 --- a/ppapi/ppapi_shared.gypi +++ b/ppapi/ppapi_shared.gypi @@ -231,8 +231,6 @@ 'thunk/ppb_tcp_socket_private_api.h', 'thunk/ppb_tcp_socket_private_thunk.cc', 'thunk/ppb_text_input_thunk.cc', - 'thunk/ppb_transport_api.h', - 'thunk/ppb_transport_thunk.cc', 'thunk/ppb_udp_socket_private_api.h', 'thunk/ppb_udp_socket_private_thunk.cc', 'thunk/ppb_url_loader_api.h', diff --git a/ppapi/ppapi_sources.gypi b/ppapi/ppapi_sources.gypi index 6e6d617..6b14eaf 100644 --- a/ppapi/ppapi_sources.gypi +++ b/ppapi/ppapi_sources.gypi @@ -443,17 +443,4 @@ 'tests/test_var_deprecated.h', ], }, - 'conditions': [ - ['p2p_apis==1', { - 'variables': { - 'c_source_files': [ - 'c/dev/ppb_transport_dev.h', - ], - 'cpp_source_files': [ - 'cpp/dev/transport_dev.cc', - 'cpp/dev/transport_dev.h', - ], - }, - }], - ], } diff --git a/ppapi/ppapi_tests.gypi b/ppapi/ppapi_tests.gypi index 10f30e6..9956c66 100644 --- a/ppapi/ppapi_tests.gypi +++ b/ppapi/ppapi_tests.gypi @@ -94,12 +94,6 @@ 'product_name': 'ppapi_tests', 'product_extension': 'plugin', }], - ['p2p_apis==1', { - 'sources': [ - 'tests/test_transport.cc', - 'tests/test_transport.h', - ], - }], ], # TODO(dmichael): Figure out what is wrong with the script on Windows and add # it as an automated action. diff --git a/ppapi/proxy/resource_creation_proxy.cc b/ppapi/proxy/resource_creation_proxy.cc index 41a6c7c..f25d9de 100644 --- a/ppapi/proxy/resource_creation_proxy.cc +++ b/ppapi/proxy/resource_creation_proxy.cc @@ -296,13 +296,6 @@ PP_Resource ResourceCreationProxy::CreateTCPSocketPrivate( return PPB_TCPSocket_Private_Proxy::CreateProxyResource(instance); } -PP_Resource ResourceCreationProxy::CreateTransport(PP_Instance instance, - const char* name, - PP_TransportType type) { - NOTIMPLEMENTED(); // Not proxied yet. - return 0; -} - PP_Resource ResourceCreationProxy::CreateUDPSocketPrivate( PP_Instance instance) { return PPB_UDPSocket_Private_Proxy::CreateProxyResource(instance); diff --git a/ppapi/proxy/resource_creation_proxy.h b/ppapi/proxy/resource_creation_proxy.h index d6a2e76..9c18f27 100644 --- a/ppapi/proxy/resource_creation_proxy.h +++ b/ppapi/proxy/resource_creation_proxy.h @@ -135,9 +135,6 @@ class ResourceCreationProxy : public InterfaceProxy, virtual PP_Resource CreateTCPServerSocketPrivate( PP_Instance instance) OVERRIDE; virtual PP_Resource CreateTCPSocketPrivate(PP_Instance instance) OVERRIDE; - virtual PP_Resource CreateTransport(PP_Instance instance, - const char* name, - PP_TransportType type) OVERRIDE; virtual PP_Resource CreateUDPSocketPrivate(PP_Instance instance) OVERRIDE; virtual PP_Resource CreateVideoCapture(PP_Instance instance) OVERRIDE; virtual PP_Resource CreateVideoDecoder( diff --git a/ppapi/shared_impl/resource.h b/ppapi/shared_impl/resource.h index 5b03f53..f920262 100644 --- a/ppapi/shared_impl/resource.h +++ b/ppapi/shared_impl/resource.h @@ -52,7 +52,6 @@ F(PPB_Talk_Private_API) \ F(PPB_TCPServerSocket_Private_API) \ F(PPB_TCPSocket_Private_API) \ - F(PPB_Transport_API) \ F(PPB_UDPSocket_Private_API) \ F(PPB_URLLoader_API) \ F(PPB_URLRequestInfo_API) \ diff --git a/ppapi/tests/all_c_includes.h b/ppapi/tests/all_c_includes.h index 0732ded..d4f3a0c 100644 --- a/ppapi/tests/all_c_includes.h +++ b/ppapi/tests/all_c_includes.h @@ -29,7 +29,6 @@ #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_transport_dev.h" #include "ppapi/c/dev/ppb_url_util_dev.h" #include "ppapi/c/dev/ppb_var_deprecated.h" #include "ppapi/c/dev/ppb_video_decoder_dev.h" diff --git a/ppapi/tests/all_cpp_includes.h b/ppapi/tests/all_cpp_includes.h index 0db1b77..0aca7aa 100644 --- a/ppapi/tests/all_cpp_includes.h +++ b/ppapi/tests/all_cpp_includes.h @@ -28,7 +28,6 @@ #include "ppapi/cpp/dev/scrollbar_dev.h" #include "ppapi/cpp/dev/selection_dev.h" #include "ppapi/cpp/dev/text_input_dev.h" -#include "ppapi/cpp/dev/transport_dev.h" #include "ppapi/cpp/dev/url_util_dev.h" #include "ppapi/cpp/dev/video_decoder_dev.h" #include "ppapi/cpp/dev/widget_client_dev.h" diff --git a/ppapi/tests/test_transport.cc b/ppapi/tests/test_transport.cc deleted file mode 100644 index d8bb134..0000000 --- a/ppapi/tests/test_transport.cc +++ /dev/null @@ -1,373 +0,0 @@ -// Copyright (c) 2012 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. - -#include "ppapi/tests/test_transport.h" - -#include <stdlib.h> -#include <string.h> - -#include <list> -#include <map> - -#include "ppapi/c/dev/ppb_testing_dev.h" -#include "ppapi/c/pp_errors.h" -#include "ppapi/c/pp_macros.h" -#include "ppapi/cpp/dev/transport_dev.h" -#include "ppapi/cpp/instance.h" -#include "ppapi/cpp/module.h" -#include "ppapi/cpp/var.h" -#include "ppapi/tests/test_utils.h" -#include "ppapi/tests/testing_instance.h" -#include "ppapi/utility/completion_callback_factory.h" - -REGISTER_TEST_CASE(Transport); - -namespace { - -const char kTestChannelName[] = "test"; -const int kReadBufferSize = 65536; - -class StreamReader { - public: - StreamReader(pp::Transport_Dev* transport, - int expected_size, - pp::CompletionCallback done_callback) - : expected_size_(expected_size), - done_callback_(done_callback), - PP_ALLOW_THIS_IN_INITIALIZER_LIST(callback_factory_(this)), - transport_(transport), - received_size_(0) { - Read(); - } - - const std::list<std::vector<char> >& received() { return received_; } - std::list<std::string> errors() { return errors_; } - - private: - void Read() { - while (true) { - buffer_.resize(kReadBufferSize); - int result = transport_->Recv( - &buffer_[0], buffer_.size(), - callback_factory_.NewOptionalCallback(&StreamReader::OnReadFinished)); - if (result > 0) - DidFinishRead(result); - else - break; - } - } - - void OnReadFinished(int result) { - DidFinishRead(result); - if (result > 0) - Read(); - } - - void DidFinishRead(int result) { - if (result > 0) { - if (result > static_cast<int>(buffer_.size())) { - errors_.push_back(TestCase::MakeFailureMessage( - __FILE__, __LINE__, - "Recv() returned value that is bigger than the buffer.")); - } - buffer_.resize(result); - received_.push_back(buffer_); - received_size_ += buffer_.size(); - if (received_size_ >= expected_size_) - done_callback_.Run(0); - } - } - - int expected_size_; - pp::CompletionCallback done_callback_; - pp::CompletionCallbackFactory<StreamReader> callback_factory_; - pp::Transport_Dev* transport_; - std::vector<char> buffer_; - std::list<std::vector<char> > received_; - int received_size_; - std::list<std::string> errors_; -}; - -} // namespace - -TestTransport::~TestTransport() { - delete transport1_; - delete transport2_; -} - -bool TestTransport::Init() { - transport_interface_ = static_cast<const PPB_Transport_Dev*>( - pp::Module::Get()->GetBrowserInterface(PPB_TRANSPORT_DEV_INTERFACE)); - return transport_interface_ && CheckTestingInterface(); -} - -void TestTransport::RunTests(const std::string& filter) { - RUN_TEST(Create, filter); - RUN_TEST_FORCEASYNC_AND_NOT(Connect, filter); - RUN_TEST(SetProperty, filter); - RUN_TEST_FORCEASYNC_AND_NOT(SendDataUdp, filter); - RUN_TEST_FORCEASYNC_AND_NOT(SendDataTcp, filter); - RUN_TEST_FORCEASYNC_AND_NOT(ConnectAndCloseUdp, filter); - RUN_TEST_FORCEASYNC_AND_NOT(ConnectAndCloseTcp, filter); -} - -std::string TestTransport::InitTargets(PP_TransportType type) { - transport1_ = new pp::Transport_Dev(instance_, kTestChannelName, type); - transport2_ = new pp::Transport_Dev(instance_, kTestChannelName, type); - - ASSERT_NE(NULL, transport1_); - ASSERT_NE(NULL, transport2_); - - PASS(); -} - -std::string TestTransport::Connect() { - TestCompletionCallback connect_cb1(instance_->pp_instance()); - TestCompletionCallback connect_cb2(instance_->pp_instance()); - ASSERT_EQ(transport1_->Connect(connect_cb1), PP_OK_COMPLETIONPENDING); - ASSERT_EQ(transport2_->Connect(connect_cb2), PP_OK_COMPLETIONPENDING); - - pp::Var address1; - pp::Var address2; - TestCompletionCallback next_address_cb1(instance_->pp_instance()); - TestCompletionCallback next_address_cb2(instance_->pp_instance()); - ASSERT_EQ(transport1_->GetNextAddress(&address1, next_address_cb1), - PP_OK_COMPLETIONPENDING); - ASSERT_EQ(transport2_->GetNextAddress(&address2, next_address_cb2), - PP_OK_COMPLETIONPENDING); - ASSERT_EQ(next_address_cb1.WaitForResult(), PP_OK); - ASSERT_EQ(next_address_cb2.WaitForResult(), PP_OK); - ASSERT_EQ(transport1_->GetNextAddress(&address1, next_address_cb1), PP_OK); - ASSERT_EQ(transport2_->GetNextAddress(&address2, next_address_cb2), PP_OK); - - ASSERT_EQ(transport1_->ReceiveRemoteAddress(address2), PP_OK); - ASSERT_EQ(transport2_->ReceiveRemoteAddress(address1), PP_OK); - - - ASSERT_EQ(connect_cb1.WaitForResult(), PP_OK); - ASSERT_EQ(connect_cb2.WaitForResult(), PP_OK); - - ASSERT_TRUE(transport1_->IsWritable()); - ASSERT_TRUE(transport2_->IsWritable()); - - PASS(); -} - -std::string TestTransport::Clean() { - delete transport1_; - transport1_ = NULL; - delete transport2_; - transport2_ = NULL; - - PASS(); -} - -std::string TestTransport::TestCreate() { - ASSERT_SUBTEST_SUCCESS(InitTargets(PP_TRANSPORTTYPE_DATAGRAM)); - - Clean(); - - PASS(); -} - -std::string TestTransport::TestSetProperty() { - ASSERT_SUBTEST_SUCCESS(InitTargets(PP_TRANSPORTTYPE_STREAM)); - - // Try settings STUN and Relay properties. - ASSERT_EQ(transport1_->SetProperty( - PP_TRANSPORTPROPERTY_STUN_SERVER, - pp::Var("stun.example.com:19302")), PP_OK); - - ASSERT_EQ(transport1_->SetProperty( - PP_TRANSPORTPROPERTY_RELAY_SERVER, - pp::Var("ralay.example.com:80")), PP_OK); - - ASSERT_EQ(transport1_->SetProperty( - PP_TRANSPORTPROPERTY_RELAY_USERNAME, - pp::Var("USERNAME")), PP_OK); - ASSERT_EQ(transport1_->SetProperty( - PP_TRANSPORTPROPERTY_RELAY_PASSWORD, - pp::Var("PASSWORD")), PP_OK); - - // Try changing TCP window size. - ASSERT_EQ(transport1_->SetProperty(PP_TRANSPORTPROPERTY_TCP_RECEIVE_WINDOW, - pp::Var(65536)), PP_OK); - ASSERT_EQ(transport1_->SetProperty(PP_TRANSPORTPROPERTY_TCP_RECEIVE_WINDOW, - pp::Var(10000000)), PP_ERROR_BADARGUMENT); - - ASSERT_EQ(transport1_->SetProperty(PP_TRANSPORTPROPERTY_TCP_SEND_WINDOW, - pp::Var(65536)), PP_OK); - ASSERT_EQ(transport1_->SetProperty(PP_TRANSPORTPROPERTY_TCP_SEND_WINDOW, - pp::Var(10000000)), PP_ERROR_BADARGUMENT); - - ASSERT_EQ(transport1_->SetProperty(PP_TRANSPORTPROPERTY_TCP_NO_DELAY, - pp::Var(true)), PP_OK); - - ASSERT_EQ(transport1_->SetProperty(PP_TRANSPORTPROPERTY_TCP_ACK_DELAY, - pp::Var(10)), PP_OK); - ASSERT_EQ(transport1_->SetProperty(PP_TRANSPORTPROPERTY_TCP_ACK_DELAY, - pp::Var(10000)), PP_ERROR_BADARGUMENT); - - TestCompletionCallback connect_cb(instance_->pp_instance()); - ASSERT_EQ(transport1_->Connect(connect_cb), PP_OK_COMPLETIONPENDING); - - // SetProperty() should fail after we've connected. - ASSERT_EQ(transport1_->SetProperty( - PP_TRANSPORTPROPERTY_STUN_SERVER, - pp::Var("stun.example.com:31323")), PP_ERROR_FAILED); - - Clean(); - ASSERT_EQ(connect_cb.WaitForResult(), PP_ERROR_ABORTED); - - PASS(); -} - -std::string TestTransport::TestConnect() { - ASSERT_SUBTEST_SUCCESS(InitTargets(PP_TRANSPORTTYPE_DATAGRAM)); - ASSERT_SUBTEST_SUCCESS(Connect()); - - Clean(); - - PASS(); -} - -// Creating datagram connection and try sending data over it. Verify -// that at least some packets are received (some packets may be lost). -std::string TestTransport::TestSendDataUdp() { - ASSERT_SUBTEST_SUCCESS(InitTargets(PP_TRANSPORTTYPE_DATAGRAM)); - ASSERT_SUBTEST_SUCCESS(Connect()); - - const int kNumPackets = 100; - const int kSendBufferSize = 1200; - const int kUdpWaitTimeMs = 1000; // 1 second. - - TestCompletionCallback done_cb(instance_->pp_instance()); - StreamReader reader(transport1_, kSendBufferSize * kNumPackets, done_cb); - - std::map<int, std::vector<char> > sent_packets; - for (int i = 0; i < kNumPackets; ++i) { - std::vector<char> send_buffer(kSendBufferSize); - for (size_t j = 0; j < send_buffer.size(); ++j) { - send_buffer[j] = rand() % 256; - } - // Put packet index in the beginning. - memcpy(&send_buffer[0], &i, sizeof(i)); - - TestCompletionCallback send_cb(instance_->pp_instance(), force_async_); - int32_t result = transport2_->Send(&send_buffer[0], send_buffer.size(), - send_cb); - if (force_async_) { - ASSERT_EQ(result, PP_OK_COMPLETIONPENDING); - ASSERT_EQ(send_cb.WaitForResult(), static_cast<int>(send_buffer.size())); - } else { - ASSERT_EQ(result, static_cast<int>(send_buffer.size())); - } - sent_packets[i] = send_buffer; - } - - // Limit waiting time. - TestCompletionCallback timeout_cb(instance_->pp_instance()); - pp::Module::Get()->core()->CallOnMainThread(kUdpWaitTimeMs, timeout_cb); - ASSERT_EQ(timeout_cb.WaitForResult(), PP_OK); - - ASSERT_TRUE(reader.errors().size() == 0); - ASSERT_TRUE(reader.received().size() > 0); - for (std::list<std::vector<char> >::const_iterator it = - reader.received().begin(); it != reader.received().end(); ++it) { - int index; - memcpy(&index, &(*it)[0], sizeof(index)); - ASSERT_TRUE(sent_packets[index] == *it); - } - - Clean(); - - PASS(); -} - -// Creating reliable (TCP-like) connection and try sending data over -// it. Verify that all data is received correctly. -std::string TestTransport::TestSendDataTcp() { - ASSERT_SUBTEST_SUCCESS(InitTargets(PP_TRANSPORTTYPE_STREAM)); - ASSERT_SUBTEST_SUCCESS(Connect()); - - const int kTcpSendSize = 100000; - - TestCompletionCallback done_cb(instance_->pp_instance()); - StreamReader reader(transport1_, kTcpSendSize, done_cb); - - std::vector<char> send_buffer(kTcpSendSize); - for (size_t j = 0; j < send_buffer.size(); ++j) { - send_buffer[j] = rand() % 256; - } - - int pos = 0; - while (pos < static_cast<int>(send_buffer.size())) { - TestCompletionCallback send_cb(instance_->pp_instance(), force_async_); - int result = transport2_->Send( - &send_buffer[0] + pos, send_buffer.size() - pos, send_cb); - if (force_async_) - ASSERT_EQ(result, PP_OK_COMPLETIONPENDING); - if (result == PP_OK_COMPLETIONPENDING) - result = send_cb.WaitForResult(); - ASSERT_TRUE(result > 0); - pos += result; - } - - ASSERT_EQ(done_cb.WaitForResult(), PP_OK); - - ASSERT_TRUE(reader.errors().size() == 0); - - std::vector<char> received_data; - for (std::list<std::vector<char> >::const_iterator it = - reader.received().begin(); it != reader.received().end(); ++it) { - received_data.insert(received_data.end(), it->begin(), it->end()); - } - ASSERT_EQ(send_buffer, received_data); - - Clean(); - - PASS(); -} - -std::string TestTransport::TestConnectAndCloseUdp() { - ASSERT_SUBTEST_SUCCESS(InitTargets(PP_TRANSPORTTYPE_DATAGRAM)); - ASSERT_SUBTEST_SUCCESS(Connect()); - - std::vector<char> recv_buffer(kReadBufferSize); - TestCompletionCallback recv_cb(instance_->pp_instance()); - ASSERT_EQ( - transport1_->Recv(&recv_buffer[0], recv_buffer.size(), recv_cb), - PP_OK_COMPLETIONPENDING); - - // Close the transport and verify that callback is aborted. - ASSERT_EQ(transport1_->Close(), PP_OK); - - ASSERT_EQ(recv_cb.run_count(), 1); - ASSERT_EQ(recv_cb.result(), PP_ERROR_ABORTED); - - Clean(); - - PASS(); -} - -std::string TestTransport::TestConnectAndCloseTcp() { - ASSERT_SUBTEST_SUCCESS(InitTargets(PP_TRANSPORTTYPE_STREAM)); - ASSERT_SUBTEST_SUCCESS(Connect()); - - std::vector<char> recv_buffer(kReadBufferSize); - TestCompletionCallback recv_cb(instance_->pp_instance()); - ASSERT_EQ( - transport1_->Recv(&recv_buffer[0], recv_buffer.size(), recv_cb), - PP_OK_COMPLETIONPENDING); - - // Close the transport and verify that callback is aborted. - ASSERT_EQ(transport1_->Close(), PP_OK); - - ASSERT_EQ(recv_cb.run_count(), 1); - ASSERT_EQ(recv_cb.result(), PP_ERROR_ABORTED); - - Clean(); - - PASS(); -} diff --git a/ppapi/tests/test_transport.h b/ppapi/tests/test_transport.h deleted file mode 100644 index eee1c2d..0000000 --- a/ppapi/tests/test_transport.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2012 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. - -#ifndef PPAPI_TESTS_TEST_TRANSPORT_H_ -#define PPAPI_TESTS_TEST_TRANSPORT_H_ - -#include <string> - -#include "ppapi/c/dev/ppb_transport_dev.h" -#include "ppapi/tests/test_case.h" - -namespace pp { -class Transport_Dev; -} // namespace pp - -class TestTransport : public TestCase { - public: - explicit TestTransport(TestingInstance* instance) - : TestCase(instance), - transport1_(NULL), - transport2_(NULL) { - } - virtual ~TestTransport(); - - - // TestCase implementation. - virtual bool Init(); - virtual void RunTests(const std::string& filter); - - private: - std::string InitTargets(PP_TransportType type); - std::string Connect(); - std::string Clean(); - - std::string TestCreate(); - std::string TestConnect(); - std::string TestSetProperty(); - std::string TestSendDataTcp(); - std::string TestSendDataUdp(); - std::string TestConnectAndCloseTcp(); - std::string TestConnectAndCloseUdp(); - - // Used by the tests that access the C API directly. - const PPB_Transport_Dev* transport_interface_; - - pp::Transport_Dev* transport1_; - pp::Transport_Dev* transport2_; -}; - -#endif // PPAPI_TESTS_TEST_TRANSPORT_H_ diff --git a/ppapi/thunk/interfaces_ppb_public_dev.h b/ppapi/thunk/interfaces_ppb_public_dev.h index 692b4f3..f23bb48 100644 --- a/ppapi/thunk/interfaces_ppb_public_dev.h +++ b/ppapi/thunk/interfaces_ppb_public_dev.h @@ -14,7 +14,6 @@ PROXIED_API(PPB_FileChooser) PROXIED_API(PPB_Graphics3D) UNPROXIED_API(PPB_LayerCompositor) UNPROXIED_API(PPB_Scrollbar) -UNPROXIED_API(PPB_Transport) PROXIED_API(PPB_VideoCapture) PROXIED_API(PPB_VideoDecoder) UNPROXIED_API(PPB_WebSocket) @@ -60,8 +59,6 @@ PROXIED_IFACE(PPB_Instance, PPB_TEXTINPUT_DEV_INTERFACE_0_1, PPB_TextInput_Dev_0_1) PROXIED_IFACE(PPB_Instance, PPB_TEXTINPUT_DEV_INTERFACE_0_2, PPB_TextInput_Dev_0_2) -UNPROXIED_IFACE(PPB_Transport, PPB_TRANSPORT_DEV_INTERFACE_0_7, - PPB_Transport_Dev_0_7) PROXIED_IFACE(PPB_VideoCapture, PPB_VIDEOCAPTURE_DEV_INTERFACE_0_1, PPB_VideoCapture_Dev_0_1) PROXIED_IFACE(PPB_VideoCapture, PPB_VIDEOCAPTURE_DEV_INTERFACE_0_2, diff --git a/ppapi/thunk/ppb_transport_api.h b/ppapi/thunk/ppb_transport_api.h deleted file mode 100644 index 256d920..0000000 --- a/ppapi/thunk/ppb_transport_api.h +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2011 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. - -#ifndef PPAPI_THUNK_PPB_TRANSPORT_API_H_ -#define PPAPI_THUNK_PPB_TRANSPORT_API_H_ - -#include "ppapi/c/dev/ppb_transport_dev.h" - -namespace ppapi { -namespace thunk { - -class PPB_Transport_API { - public: - virtual ~PPB_Transport_API() {} - - virtual PP_Bool IsWritable() = 0; - virtual int32_t SetProperty(PP_TransportProperty property, PP_Var value) = 0; - virtual int32_t Connect(PP_CompletionCallback callback) = 0; - virtual int32_t GetNextAddress(PP_Var* address, - PP_CompletionCallback callback) = 0; - virtual int32_t ReceiveRemoteAddress(PP_Var address) = 0; - virtual int32_t Recv(void* data, uint32_t len, - PP_CompletionCallback callback) = 0; - virtual int32_t Send(const void* data, uint32_t len, - PP_CompletionCallback callback) = 0; - virtual int32_t Close() = 0; -}; - -} // namespace thunk -} // namespace ppapi - -#endif // PPAPI_THUNK_PPB_TRANSPORT_API_H_ diff --git a/ppapi/thunk/ppb_transport_thunk.cc b/ppapi/thunk/ppb_transport_thunk.cc deleted file mode 100644 index d739e89..0000000 --- a/ppapi/thunk/ppb_transport_thunk.cc +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) 2012 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. - -#include "ppapi/c/pp_completion_callback.h" -#include "ppapi/c/pp_errors.h" -#include "ppapi/thunk/enter.h" -#include "ppapi/thunk/thunk.h" -#include "ppapi/thunk/ppb_transport_api.h" -#include "ppapi/thunk/resource_creation_api.h" - -namespace ppapi { -namespace thunk { - -namespace { - -typedef EnterResource<PPB_Transport_API> EnterTransport; - -PP_Resource Create(PP_Instance instance, const char* name, - PP_TransportType type) { - EnterResourceCreation enter(instance); - if (enter.failed()) - return 0; - return enter.functions()->CreateTransport(instance, name, type); -} - -PP_Bool IsTransport(PP_Resource resource) { - EnterTransport enter(resource, false); - return PP_FromBool(enter.succeeded()); -} - -PP_Bool IsWritable(PP_Resource transport) { - EnterTransport enter(transport, true); - if (enter.failed()) - return PP_FALSE; - return enter.object()->IsWritable(); -} - -int32_t SetProperty(PP_Resource transport, PP_TransportProperty property, - PP_Var value) { - EnterTransport enter(transport, true); - if (enter.failed()) - return enter.retval(); - return enter.object()->SetProperty(property, value); -} - -int32_t Connect(PP_Resource transport, PP_CompletionCallback callback) { - EnterTransport enter(transport, callback, true); - if (enter.failed()) - return enter.retval(); - return enter.SetResult(enter.object()->Connect(callback)); -} - -int32_t GetNextAddress(PP_Resource transport, PP_Var* address, - PP_CompletionCallback callback) { - EnterTransport enter(transport, callback, true); - if (enter.failed()) - return enter.retval(); - return enter.SetResult(enter.object()->GetNextAddress(address, callback)); -} - -int32_t ReceiveRemoteAddress(PP_Resource transport, PP_Var address) { - EnterTransport enter(transport, true); - if (enter.failed()) - return enter.retval(); - return enter.object()->ReceiveRemoteAddress(address); -} - -int32_t Recv(PP_Resource transport, void* data, uint32_t len, - PP_CompletionCallback callback) { - EnterTransport enter(transport, callback, true); - if (enter.failed()) - return enter.retval(); - return enter.SetResult(enter.object()->Recv(data, len, callback)); -} - -int32_t Send(PP_Resource transport, const void* data, uint32_t len, - PP_CompletionCallback callback) { - EnterTransport enter(transport, callback, true); - if (enter.failed()) - return enter.retval(); - return enter.SetResult(enter.object()->Send(data, len, callback)); -} - -int32_t Close(PP_Resource transport) { - EnterTransport enter(transport, true); - if (enter.failed()) - return enter.retval(); - return enter.object()->Close(); -} - -const PPB_Transport_Dev g_ppb_transport_thunk = { - &Create, - &IsTransport, - &IsWritable, - &SetProperty, - &Connect, - &GetNextAddress, - &ReceiveRemoteAddress, - &Recv, - &Send, - &Close, -}; - -} // namespace - -const PPB_Transport_Dev_0_7* GetPPB_Transport_Dev_0_7_Thunk() { - return &g_ppb_transport_thunk; -} - -} // namespace thunk -} // namespace ppapi diff --git a/ppapi/thunk/resource_creation_api.h b/ppapi/thunk/resource_creation_api.h index 2f214e7..3cd1752 100644 --- a/ppapi/thunk/resource_creation_api.h +++ b/ppapi/thunk/resource_creation_api.h @@ -19,7 +19,6 @@ #include "ppapi/c/ppb_input_event.h" #include "ppapi/c/ppb_websocket.h" #include "ppapi/c/dev/pp_video_dev.h" -#include "ppapi/c/dev/ppb_transport_dev.h" #include "ppapi/c/private/ppb_network_monitor_private.h" #include "ppapi/shared_impl/api_id.h" @@ -138,9 +137,6 @@ class ResourceCreationAPI { virtual PP_Resource CreateTalk(PP_Instance instance) = 0; virtual PP_Resource CreateTCPServerSocketPrivate(PP_Instance instance) = 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 CreateVideoCapture(PP_Instance instance) = 0; virtual PP_Resource CreateVideoDecoder( |