diff options
36 files changed, 1 insertions, 1238 deletions
diff --git a/build/common.gypi b/build/common.gypi index f091100..a098a1c 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -356,13 +356,6 @@ 'use_titlecase_in_grd_files%': 1, }], - # Enable some hacks to support Flapper only on Chrome OS. - ['chromeos==1', { - 'enable_flapper_hacks%': 1, - }, { - 'enable_flapper_hacks%': 0, - }], - # Enable file manager extension on Chrome OS. ['chromeos==1', { 'file_manager_extension%': 1, @@ -460,7 +453,6 @@ 'use_x11%': '<(use_x11)', 'use_gnome_keyring%': '<(use_gnome_keyring)', 'linux_fpic%': '<(linux_fpic)', - 'enable_flapper_hacks%': '<(enable_flapper_hacks)', 'enable_pepper_threading%': '<(enable_pepper_threading)', 'chromeos%': '<(chromeos)', 'use_virtual_keyboard%': '<(use_virtual_keyboard)', @@ -1225,9 +1217,6 @@ ['proprietary_codecs==1', { 'defines': ['USE_PROPRIETARY_CODECS'], }], - ['enable_flapper_hacks==1', { - 'defines': ['ENABLE_FLAPPER_HACKS=1'], - }], ['enable_pepper_threading==1', { 'defines': ['ENABLE_PEPPER_THREADING'], }], diff --git a/content/browser/renderer_host/pepper_message_filter.cc b/content/browser/renderer_host/pepper_message_filter.cc index 283dfd7c..ef913b2 100644 --- a/content/browser/renderer_host/pepper_message_filter.cc +++ b/content/browser/renderer_host/pepper_message_filter.cc @@ -34,22 +34,12 @@ #include "net/base/host_port_pair.h" #include "net/base/sys_addrinfo.h" #include "ppapi/c/pp_errors.h" -#include "ppapi/c/private/ppb_flash_net_connector.h" #include "ppapi/c/private/ppb_host_resolver_private.h" #include "ppapi/c/private/ppb_net_address_private.h" #include "ppapi/proxy/ppapi_messages.h" #include "ppapi/shared_impl/api_id.h" #include "ppapi/shared_impl/private/net_address_private_impl.h" #include "ppapi/shared_impl/private/ppb_host_resolver_shared.h" -#include "webkit/plugins/ppapi/ppb_flash_net_connector_impl.h" - -#if defined(ENABLE_FLAPPER_HACKS) -#include <sys/types.h> -#include <unistd.h> - -#include "net/base/net_log.h" -#include "net/base/sys_addrinfo.h" -#endif // ENABLE_FLAPPER_HACKS using content::BrowserThread; using content::RenderViewHostImpl; @@ -107,10 +97,6 @@ bool PepperMessageFilter::OnMessageReceived(const IPC::Message& msg, bool* message_was_ok) { bool handled = true; IPC_BEGIN_MESSAGE_MAP_EX(PepperMessageFilter, msg, *message_was_ok) -#if defined(ENABLE_FLAPPER_HACKS) - IPC_MESSAGE_HANDLER(PepperMsg_ConnectTcp, OnConnectTcp) - IPC_MESSAGE_HANDLER(PepperMsg_ConnectTcpAddress, OnConnectTcpAddress) -#endif // ENABLE_FLAPPER_HACKS IPC_MESSAGE_HANDLER(PepperMsg_GetLocalTimeZoneOffset, OnGetLocalTimeZoneOffset) IPC_MESSAGE_HANDLER_DELAY_REPLY(PpapiHostMsg_PPBInstance_GetFontFamilies, @@ -203,170 +189,6 @@ void PepperMessageFilter::RemoveTCPServerSocket(uint32 socket_id) { tcp_server_sockets_.erase(iter); } -#if defined(ENABLE_FLAPPER_HACKS) - -namespace { - -int ConnectTcpSocket(const PP_NetAddress_Private& addr, - PP_NetAddress_Private* local_addr_out, - PP_NetAddress_Private* remote_addr_out) { - *local_addr_out = NetAddressPrivateImpl::kInvalidNetAddress; - *remote_addr_out = NetAddressPrivateImpl::kInvalidNetAddress; - - const struct sockaddr* sa = - reinterpret_cast<const struct sockaddr*>(addr.data); - socklen_t sa_len = addr.size; - int fd = socket(sa->sa_family, SOCK_STREAM, IPPROTO_TCP); - if (fd == -1) - return -1; - if (connect(fd, sa, sa_len) != 0) { - close(fd); - return -1; - } - - // Get the local address. - socklen_t local_length = sizeof(local_addr_out->data); - if (getsockname(fd, reinterpret_cast<struct sockaddr*>(local_addr_out->data), - &local_length) == -1 || - local_length > sizeof(local_addr_out->data)) { - close(fd); - return -1; - } - - // The remote address is just the address we connected to. - *remote_addr_out = addr; - - return fd; -} - -} // namespace - -void PepperMessageFilter::OnConnectTcp(int routing_id, - int request_id, - const std::string& host, - uint16 port) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); - - net::HostResolver::RequestInfo request_info(net::HostPortPair(host, port)); - - scoped_ptr<OnConnectTcpBoundInfo> bound_info(new OnConnectTcpBoundInfo); - bound_info->routing_id = routing_id; - bound_info->request_id = request_id; - - // The lookup request will delete itself on completion. - PepperLookupRequest<OnConnectTcpBoundInfo>* lookup_request = - new PepperLookupRequest<OnConnectTcpBoundInfo>( - GetHostResolver(), - request_info, - bound_info.release(), - base::Bind(&PepperMessageFilter::ConnectTcpLookupFinished, - this)); - lookup_request->Start(); -} - -void PepperMessageFilter::OnConnectTcpAddress( - int routing_id, - int request_id, - const PP_NetAddress_Private& addr) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); - - // Validate the address and then continue (doing |connect()|) on a worker - // thread. - if (!NetAddressPrivateImpl::ValidateNetAddress(addr) || - !base::WorkerPool::PostTask( - FROM_HERE, - base::Bind( - &PepperMessageFilter::ConnectTcpAddressOnWorkerThread, this, - routing_id, request_id, addr), - true)) { - SendConnectTcpACKError(routing_id, request_id); - } -} - -bool PepperMessageFilter::SendConnectTcpACKError(int routing_id, - int request_id) { - return Send(new PepperMsg_ConnectTcpACK( - routing_id, request_id, IPC::InvalidPlatformFileForTransit(), - NetAddressPrivateImpl::kInvalidNetAddress, - NetAddressPrivateImpl::kInvalidNetAddress)); -} - -void PepperMessageFilter::ConnectTcpLookupFinished( - int result, - const net::AddressList& addresses, - const OnConnectTcpBoundInfo& bound_info) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); - - // If the lookup returned addresses, continue (doing |connect()|) on a worker - // thread. - if (!addresses.head() || - !base::WorkerPool::PostTask( - FROM_HERE, - base::Bind( - &PepperMessageFilter::ConnectTcpOnWorkerThread, this, - bound_info.routing_id, bound_info.request_id, addresses), - true)) { - SendConnectTcpACKError(bound_info.routing_id, bound_info.request_id); - } -} - -void PepperMessageFilter::ConnectTcpOnWorkerThread(int routing_id, - int request_id, - net::AddressList addresses) { - IPC::PlatformFileForTransit socket_for_transit = - IPC::InvalidPlatformFileForTransit(); - PP_NetAddress_Private local_addr = NetAddressPrivateImpl::kInvalidNetAddress; - PP_NetAddress_Private remote_addr = NetAddressPrivateImpl::kInvalidNetAddress; - PP_NetAddress_Private addr = NetAddressPrivateImpl::kInvalidNetAddress; - - for (const struct addrinfo* ai = addresses.head(); ai; ai = ai->ai_next) { - if (NetAddressPrivateImpl::SockaddrToNetAddress(ai->ai_addr, ai->ai_addrlen, - &addr)) { - int fd = ConnectTcpSocket(addr, &local_addr, &remote_addr); - if (fd != -1) { - socket_for_transit = base::FileDescriptor(fd, true); - break; - } - } - } - - BrowserThread::PostTask( - BrowserThread::IO, - FROM_HERE, - base::Bind( - base::IgnoreResult(&PepperMessageFilter::Send), this, - new PepperMsg_ConnectTcpACK( - routing_id, request_id, - socket_for_transit, local_addr, remote_addr))); -} - -// TODO(vluu): Eliminate duplication between this and -// |ConnectTcpOnWorkerThread()|. -void PepperMessageFilter::ConnectTcpAddressOnWorkerThread( - int routing_id, - int request_id, - PP_NetAddress_Private addr) { - IPC::PlatformFileForTransit socket_for_transit = - IPC::InvalidPlatformFileForTransit(); - PP_NetAddress_Private local_addr = NetAddressPrivateImpl::kInvalidNetAddress; - PP_NetAddress_Private remote_addr = NetAddressPrivateImpl::kInvalidNetAddress; - - int fd = ConnectTcpSocket(addr, &local_addr, &remote_addr); - if (fd != -1) - socket_for_transit = base::FileDescriptor(fd, true); - - BrowserThread::PostTask( - BrowserThread::IO, - FROM_HERE, - base::Bind( - base::IgnoreResult(&PepperMessageFilter::Send), this, - new PepperMsg_ConnectTcpACK( - routing_id, request_id, - socket_for_transit, local_addr, remote_addr))); -} - -#endif // ENABLE_FLAPPER_HACKS - void PepperMessageFilter::OnGetLocalTimeZoneOffset(base::Time t, double* result) { // Explode it to local time and then unexplode it as if it were UTC. Also diff --git a/content/browser/renderer_host/pepper_message_filter.h b/content/browser/renderer_host/pepper_message_filter.h index 85ebfdf..ae64d26 100644 --- a/content/browser/renderer_host/pepper_message_filter.h +++ b/content/browser/renderer_host/pepper_message_filter.h @@ -119,34 +119,6 @@ class PepperMessageFilter // notifications. typedef std::set<uint32> NetworkMonitorIdSet; -#if defined(ENABLE_FLAPPER_HACKS) - // Message handlers. - void OnConnectTcp(int routing_id, - int request_id, - const std::string& host, - uint16 port); - void OnConnectTcpAddress(int routing_id, - int request_id, - const PP_NetAddress_Private& address); - - // |Send()| a |PepperMsg_ConnectTcpACK|, which reports an error. - bool SendConnectTcpACKError(int routing_id, - int request_id); - - // Continuation of |OnConnectTcp()|. - void ConnectTcpLookupFinished(int result, - const net::AddressList& addresses, - const OnConnectTcpBoundInfo& bound_info); - void ConnectTcpOnWorkerThread(int routing_id, - int request_id, - net::AddressList addresses); - - // Continuation of |OnConnectTcpAddress()|. - void ConnectTcpAddressOnWorkerThread(int routing_id, - int request_id, - PP_NetAddress_Private addr); -#endif // ENABLE_FLAPPER_HACKS - void OnGetLocalTimeZoneOffset(base::Time t, double* result); void OnGetFontFamilies(IPC::Message* reply); diff --git a/content/common/pepper_messages.h b/content/common/pepper_messages.h index bf86c4e..7fa1f11 100644 --- a/content/common/pepper_messages.h +++ b/content/common/pepper_messages.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// 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. @@ -6,35 +6,14 @@ #include "content/common/content_export.h" #include "ipc/ipc_message_macros.h" #include "ipc/ipc_platform_file.h" -#include "ppapi/c/private/ppb_flash_net_connector.h" #include "ppapi/proxy/ppapi_param_traits.h" #undef IPC_MESSAGE_EXPORT #define IPC_MESSAGE_EXPORT CONTENT_EXPORT #define IPC_MESSAGE_START PepperMsgStart -// Pepper (non-file-system) messages sent from the browser to the renderer. - -// The response to PepperMsg_ConnectTcp(Address). -IPC_MESSAGE_ROUTED4(PepperMsg_ConnectTcpACK, - int /* request_id */, - IPC::PlatformFileForTransit /* socket */, - PP_NetAddress_Private /* local_addr */, - PP_NetAddress_Private /* remote_addr */) - // Pepper (non-file-system) messages sent from the renderer to the browser. -IPC_MESSAGE_CONTROL4(PepperMsg_ConnectTcp, - int /* routing_id */, - int /* request_id */, - std::string /* host */, - uint16 /* port */) - -IPC_MESSAGE_CONTROL3(PepperMsg_ConnectTcpAddress, - int /* routing_id */, - int /* request_id */, - PP_NetAddress_Private /* addr */) - IPC_SYNC_MESSAGE_CONTROL1_1(PepperMsg_GetLocalTimeZoneOffset, base::Time /* t */, double /* result */) diff --git a/content/renderer/pepper/pepper_plugin_delegate_impl.cc b/content/renderer/pepper/pepper_plugin_delegate_impl.cc index 4d12e67..feab360 100644 --- a/content/renderer/pepper/pepper_plugin_delegate_impl.cc +++ b/content/renderer/pepper/pepper_plugin_delegate_impl.cc @@ -58,7 +58,6 @@ #include "ppapi/c/dev/pp_video_dev.h" #include "ppapi/c/pp_errors.h" #include "ppapi/c/private/ppb_flash.h" -#include "ppapi/c/private/ppb_flash_net_connector.h" #include "ppapi/proxy/host_dispatcher.h" #include "ppapi/proxy/ppapi_messages.h" #include "ppapi/shared_impl/platform_file.h" @@ -83,7 +82,6 @@ #include "webkit/plugins/ppapi/plugin_module.h" #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" #include "webkit/plugins/ppapi/ppb_flash_impl.h" -#include "webkit/plugins/ppapi/ppb_flash_net_connector_impl.h" #include "webkit/plugins/ppapi/ppb_tcp_server_socket_private_impl.h" #include "webkit/plugins/ppapi/ppb_tcp_socket_private_impl.h" #include "webkit/plugins/ppapi/ppb_udp_socket_private_impl.h" @@ -923,54 +921,6 @@ PepperPluginDelegateImpl::GetFileThreadMessageLoopProxy() { return RenderThreadImpl::current()->GetFileThreadMessageLoopProxy(); } -int32_t PepperPluginDelegateImpl::ConnectTcp( - webkit::ppapi::PPB_Flash_NetConnector_Impl* connector, - const char* host, - uint16_t port) { - int request_id = pending_connect_tcps_.Add( - new scoped_refptr<webkit::ppapi::PPB_Flash_NetConnector_Impl>(connector)); - IPC::Message* msg = - new PepperMsg_ConnectTcp(render_view_->routing_id(), - request_id, - std::string(host), - port); - if (!render_view_->Send(msg)) { - pending_connect_tcps_.Remove(request_id); - return PP_ERROR_FAILED; - } - - return PP_OK_COMPLETIONPENDING; -} - -int32_t PepperPluginDelegateImpl::ConnectTcpAddress( - webkit::ppapi::PPB_Flash_NetConnector_Impl* connector, - const struct PP_NetAddress_Private* addr) { - int request_id = pending_connect_tcps_.Add( - new scoped_refptr<webkit::ppapi::PPB_Flash_NetConnector_Impl>(connector)); - IPC::Message* msg = - new PepperMsg_ConnectTcpAddress(render_view_->routing_id(), - request_id, - *addr); - if (!render_view_->Send(msg)) { - pending_connect_tcps_.Remove(request_id); - return PP_ERROR_FAILED; - } - - return PP_OK_COMPLETIONPENDING; -} - -void PepperPluginDelegateImpl::OnConnectTcpACK( - int request_id, - base::PlatformFile socket, - const PP_NetAddress_Private& local_addr, - const PP_NetAddress_Private& remote_addr) { - scoped_refptr<webkit::ppapi::PPB_Flash_NetConnector_Impl> connector = - *pending_connect_tcps_.Lookup(request_id); - pending_connect_tcps_.Remove(request_id); - - connector->CompleteConnectTcp(socket, local_addr, remote_addr); -} - uint32 PepperPluginDelegateImpl::TCPSocketCreate() { uint32 socket_id = 0; render_view_->Send(new PpapiHostMsg_PPBTCPSocket_Create( diff --git a/content/renderer/pepper/pepper_plugin_delegate_impl.h b/content/renderer/pepper/pepper_plugin_delegate_impl.h index 25cb8e2..2988955 100644 --- a/content/renderer/pepper/pepper_plugin_delegate_impl.h +++ b/content/renderer/pepper/pepper_plugin_delegate_impl.h @@ -256,19 +256,6 @@ class PepperPluginDelegateImpl FilePath* platform_path) OVERRIDE; virtual scoped_refptr<base::MessageLoopProxy> GetFileThreadMessageLoopProxy() OVERRIDE; - virtual int32_t ConnectTcp( - webkit::ppapi::PPB_Flash_NetConnector_Impl* connector, - const char* host, - uint16_t port) OVERRIDE; - virtual int32_t ConnectTcpAddress( - webkit::ppapi::PPB_Flash_NetConnector_Impl* connector, - const struct PP_NetAddress_Private* addr) OVERRIDE; - // This is the completion for both |ConnectTcp()| and |ConnectTcpAddress()|. - void OnConnectTcpACK( - int request_id, - base::PlatformFile socket, - const PP_NetAddress_Private& local_addr, - const PP_NetAddress_Private& remote_addr); virtual uint32 TCPSocketCreate() OVERRIDE; virtual void TCPSocketConnect( @@ -462,9 +449,6 @@ class PepperPluginDelegateImpl IDMap<AsyncOpenFileCallback> pending_async_open_files_; - IDMap<scoped_refptr<webkit::ppapi::PPB_Flash_NetConnector_Impl>, - IDMapOwnPointer> pending_connect_tcps_; - IDMap<webkit::ppapi::PPB_TCPSocket_Private_Impl> tcp_sockets_; IDMap<webkit::ppapi::PPB_UDPSocket_Private_Impl> udp_sockets_; diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc index 89756e4..dcc4a62 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc @@ -98,7 +98,6 @@ #include "net/base/escape.h" #include "net/base/net_errors.h" #include "net/http/http_util.h" -#include "ppapi/c/private/ppb_flash_net_connector.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebAccessibilityObject.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" @@ -822,9 +821,6 @@ bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) { #endif IPC_MESSAGE_HANDLER(ViewMsg_ContextMenuClosed, OnContextMenuClosed) // TODO(viettrungluu): Move to a separate message filter. -#if defined(ENABLE_FLAPPER_HACKS) - IPC_MESSAGE_HANDLER(PepperMsg_ConnectTcpACK, OnConnectTcpACK) -#endif #if defined(OS_MACOSX) IPC_MESSAGE_HANDLER(ViewMsg_SetInLiveResize, OnSetInLiveResize) #endif @@ -5192,20 +5188,6 @@ void RenderViewImpl::OnSelectPopupMenuItem(int selected_index) { } #endif -#if defined(ENABLE_FLAPPER_HACKS) -void RenderViewImpl::OnConnectTcpACK( - int request_id, - IPC::PlatformFileForTransit socket_for_transit, - const PP_NetAddress_Private& local_addr, - const PP_NetAddress_Private& remote_addr) { - pepper_delegate_.OnConnectTcpACK( - request_id, - IPC::PlatformFileForTransitToPlatformFile(socket_for_transit), - local_addr, - remote_addr); -} -#endif - void RenderViewImpl::OnContextMenuClosed( const content::CustomContextMenuContext& custom_context) { if (custom_context.is_pepper_menu) diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h index 7462f0a..fc00977 100644 --- a/content/renderer/render_view_impl.h +++ b/content/renderer/render_view_impl.h @@ -792,12 +792,6 @@ class RenderViewImpl : public RenderWidget, void OnCancelDownload(int32 download_id); void OnClearFocusedNode(); void OnClosePage(); -#if defined(ENABLE_FLAPPER_HACKS) - void OnConnectTcpACK(int request_id, - IPC::PlatformFileForTransit socket_for_transit, - const PP_NetAddress_Private& local_addr, - const PP_NetAddress_Private& remote_addr); -#endif void OnContextMenuClosed( const content::CustomContextMenuContext& custom_context); void OnCopy(); diff --git a/ppapi/c/private/ppb_flash_net_connector.h b/ppapi/c/private/ppb_flash_net_connector.h deleted file mode 100644 index b3bda63..0000000 --- a/ppapi/c/private/ppb_flash_net_connector.h +++ /dev/null @@ -1,46 +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_C_PRIVATE_PPB_FLASH_NET_CONNECTOR_H_ -#define PPAPI_C_PRIVATE_PPB_FLASH_NET_CONNECTOR_H_ - -// TODO(viettrungluu): Remove this interface; it's on life-support right now. - -#include "ppapi/c/pp_bool.h" -#include "ppapi/c/pp_instance.h" -#include "ppapi/c/pp_resource.h" -#include "ppapi/c/private/ppb_flash_file.h" // For |PP_FileHandle|. -#include "ppapi/c/private/ppb_net_address_private.h" - -#define PPB_FLASH_NETCONNECTOR_INTERFACE_0_2 "PPB_Flash_NetConnector;0.2" -#define PPB_FLASH_NETCONNECTOR_INTERFACE PPB_FLASH_NETCONNECTOR_INTERFACE_0_2 - -struct PPB_Flash_NetConnector_0_2 { - PP_Resource (*Create)(PP_Instance instance_id); - PP_Bool (*IsFlashNetConnector)(PP_Resource resource_id); - - // Connect to a TCP port given as a host-port pair. The local and remote - // addresses of the connection (if successful) are returned in - // |local_addr_out| and |remote_addr_out|, respectively, if non-null. - int32_t (*ConnectTcp)(PP_Resource connector_id, - const char* host, - uint16_t port, - PP_FileHandle* socket_out, - struct PP_NetAddress_Private* local_addr_out, - struct PP_NetAddress_Private* remote_addr_out, - struct PP_CompletionCallback callback); - - // Same as |ConnectTcp()|, but connecting to the address given by |addr|. A - // typical use-case would be for reconnections. - int32_t (*ConnectTcpAddress)(PP_Resource connector_id, - const struct PP_NetAddress_Private* addr, - PP_FileHandle* socket_out, - struct PP_NetAddress_Private* local_addr_out, - struct PP_NetAddress_Private* remote_addr_out, - struct PP_CompletionCallback callback); -}; - -typedef struct PPB_Flash_NetConnector_0_2 PPB_Flash_NetConnector; - -#endif // PPAPI_C_PRIVATE_PPB_FLASH_NET_CONNECTOR_H_ diff --git a/ppapi/cpp/private/flash_net_connector.cc b/ppapi/cpp/private/flash_net_connector.cc deleted file mode 100644 index b448e7e..0000000 --- a/ppapi/cpp/private/flash_net_connector.cc +++ /dev/null @@ -1,62 +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/private/flash_net_connector.h" - -#include "ppapi/c/pp_errors.h" -#include "ppapi/cpp/completion_callback.h" -#include "ppapi/cpp/instance_handle.h" -#include "ppapi/cpp/module.h" -#include "ppapi/cpp/module_impl.h" - -namespace pp { - -namespace { - -template <> const char* interface_name<PPB_Flash_NetConnector>() { - return PPB_FLASH_NETCONNECTOR_INTERFACE; -} - -} // namespace - -namespace flash { - -NetConnector::NetConnector(const InstanceHandle& instance) { - if (has_interface<PPB_Flash_NetConnector>()) { - PassRefFromConstructor(get_interface<PPB_Flash_NetConnector>()->Create( - instance.pp_instance())); - } -} - -int32_t NetConnector::ConnectTcp(const char* host, - uint16_t port, - PP_FileHandle* socket_out, - PP_NetAddress_Private* local_addr_out, - PP_NetAddress_Private* remote_addr_out, - const CompletionCallback& cc) { - if (!has_interface<PPB_Flash_NetConnector>()) - return cc.MayForce(PP_ERROR_NOINTERFACE); - return get_interface<PPB_Flash_NetConnector>()->ConnectTcp( - pp_resource(), - host, port, - socket_out, local_addr_out, remote_addr_out, - cc.pp_completion_callback()); -} - -int32_t NetConnector::ConnectTcpAddress(const PP_NetAddress_Private* addr, - PP_FileHandle* socket_out, - PP_NetAddress_Private* local_addr_out, - PP_NetAddress_Private* remote_addr_out, - const CompletionCallback& cc) { - if (!has_interface<PPB_Flash_NetConnector>()) - return cc.MayForce(PP_ERROR_NOINTERFACE); - return get_interface<PPB_Flash_NetConnector>()->ConnectTcpAddress( - pp_resource(), - addr, - socket_out, local_addr_out, remote_addr_out, - cc.pp_completion_callback()); -} - -} // namespace flash -} // namespace pp diff --git a/ppapi/cpp/private/flash_net_connector.h b/ppapi/cpp/private/flash_net_connector.h deleted file mode 100644 index eb064ba..0000000 --- a/ppapi/cpp/private/flash_net_connector.h +++ /dev/null @@ -1,38 +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_PRIVATE_FLASH_NET_CONNECTOR_H_ -#define PPAPI_CPP_PRIVATE_FLASH_NET_CONNECTOR_H_ - -#include "ppapi/c/private/ppb_flash_net_connector.h" -#include "ppapi/cpp/resource.h" - -namespace pp { - -class CompletionCallback; -class InstanceHandle; - -namespace flash { - -class NetConnector : public Resource { - public: - explicit NetConnector(const InstanceHandle& instance); - - int32_t ConnectTcp(const char* host, - uint16_t port, - PP_FileHandle* socket_out, - PP_NetAddress_Private* local_addr_out, - PP_NetAddress_Private* remote_addr_out, - const CompletionCallback& cc); - int32_t ConnectTcpAddress(const PP_NetAddress_Private* addr, - PP_FileHandle* socket_out, - PP_NetAddress_Private* local_addr_out, - PP_NetAddress_Private* remote_addr_out, - const CompletionCallback& cc); -}; - -} // namespace flash -} // namespace pp - -#endif // PPAPI_CPP_PRIVATE_FLASH_NET_CONNECTOR_H_ diff --git a/ppapi/ppapi_proxy.gypi b/ppapi/ppapi_proxy.gypi index 17850f1..c623f73 100644 --- a/ppapi/ppapi_proxy.gypi +++ b/ppapi/ppapi_proxy.gypi @@ -100,8 +100,6 @@ 'proxy/ppb_flash_menu_proxy.h', 'proxy/ppb_flash_message_loop_proxy.cc', 'proxy/ppb_flash_message_loop_proxy.h', - 'proxy/ppb_flash_net_connector_proxy.cc', - 'proxy/ppb_flash_net_connector_proxy.h', 'proxy/ppb_graphics_2d_proxy.cc', 'proxy/ppb_graphics_2d_proxy.h', 'proxy/ppb_graphics_3d_proxy.cc', diff --git a/ppapi/ppapi_proxy_untrusted.gyp b/ppapi/ppapi_proxy_untrusted.gyp index 9893599..fa611fa 100644 --- a/ppapi/ppapi_proxy_untrusted.gyp +++ b/ppapi/ppapi_proxy_untrusted.gyp @@ -306,7 +306,6 @@ 'thunk/ppb_flash_fullscreen_thunk.cc', 'thunk/ppb_flash_menu_thunk.cc', 'thunk/ppb_flash_message_loop_thunk.cc', - 'thunk/ppb_flash_net_connector_thunk.cc', 'thunk/ppb_fullscreen_thunk.cc', 'thunk/ppb_gamepad_thunk.cc', 'thunk/ppb_gles_chromium_texture_mapping_thunk.cc', diff --git a/ppapi/ppapi_shared.gypi b/ppapi/ppapi_shared.gypi index f1621e2..1055660 100644 --- a/ppapi/ppapi_shared.gypi +++ b/ppapi/ppapi_shared.gypi @@ -190,8 +190,6 @@ 'thunk/ppb_flash_menu_thunk.cc', 'thunk/ppb_flash_message_loop_api.h', 'thunk/ppb_flash_message_loop_thunk.cc', - 'thunk/ppb_flash_net_connector_api.h', - 'thunk/ppb_flash_net_connector_thunk.cc', 'thunk/ppb_fullscreen_thunk.cc', 'thunk/ppb_gamepad_thunk.cc', 'thunk/ppb_gles_chromium_texture_mapping_thunk.cc', diff --git a/ppapi/ppapi_sources.gypi b/ppapi/ppapi_sources.gypi index 536f8f3..19d8919 100644 --- a/ppapi/ppapi_sources.gypi +++ b/ppapi/ppapi_sources.gypi @@ -94,7 +94,6 @@ 'c/private/ppb_flash_fullscreen.h', 'c/private/ppb_flash_menu.h', 'c/private/ppb_flash_message_loop.h', - 'c/private/ppb_flash_net_connector.h', 'c/private/ppb_flash_tcp_socket.h', 'c/private/ppb_flash_udp_socket.h', 'c/private/ppb_gpu_blacklist_private.h', @@ -256,8 +255,6 @@ 'cpp/private/flash_menu.h', 'cpp/private/flash_message_loop.cc', 'cpp/private/flash_message_loop.h', - 'cpp/private/flash_net_connector.cc', - 'cpp/private/flash_net_connector.h', 'cpp/private/host_resolver_private.cc', 'cpp/private/host_resolver_private.h', 'cpp/private/instance_private.cc', diff --git a/ppapi/proxy/interface_list.cc b/ppapi/proxy/interface_list.cc index 5728b54..b63a309 100644 --- a/ppapi/proxy/interface_list.cc +++ b/ppapi/proxy/interface_list.cc @@ -55,7 +55,6 @@ #include "ppapi/c/private/ppb_flash.h" #include "ppapi/c/private/ppb_flash_menu.h" #include "ppapi/c/private/ppb_flash_message_loop.h" -#include "ppapi/c/private/ppb_flash_net_connector.h" #include "ppapi/c/private/ppb_flash_tcp_socket.h" #include "ppapi/c/private/ppb_net_address_private.h" #include "ppapi/c/private/ppb_network_list_private.h" @@ -84,7 +83,6 @@ #include "ppapi/proxy/ppb_flash_file_proxy.h" #include "ppapi/proxy/ppb_flash_menu_proxy.h" #include "ppapi/proxy/ppb_flash_message_loop_proxy.h" -#include "ppapi/proxy/ppb_flash_net_connector_proxy.h" #include "ppapi/proxy/ppb_flash_proxy.h" #include "ppapi/proxy/ppb_graphics_2d_proxy.h" #include "ppapi/proxy/ppb_graphics_3d_proxy.h" @@ -335,13 +333,6 @@ void InterfaceList::AddFlashInterfaces() { // Only add the interface; PPB_TCPSocket_Private provides the API ID's proxy. AddPPB(PPB_FLASH_TCPSOCKET_INTERFACE_0_2, API_ID_PPB_TCPSOCKET_PRIVATE, thunk::GetPPB_TCPSocket_Private_0_3_Thunk()); - -#ifdef ENABLE_FLAPPER_HACKS - AddProxy(API_ID_PPB_FLASH_NETCONNECTOR, - &ProxyFactory<PPB_Flash_NetConnector_Proxy>); - AddPPB(PPB_FLASH_NETCONNECTOR_INTERFACE_0_2, API_ID_PPB_FLASH_NETCONNECTOR, - thunk::GetPPB_Flash_NetConnector_0_2_Thunk()); -#endif #endif // !defined(OS_NACL) } diff --git a/ppapi/proxy/ppapi_messages.h b/ppapi/proxy/ppapi_messages.h index dc46b5a..0a2dcf2 100644 --- a/ppapi/proxy/ppapi_messages.h +++ b/ppapi/proxy/ppapi_messages.h @@ -1139,14 +1139,6 @@ IPC_SYNC_MESSAGE_ROUTED1_0(PpapiHostMsg_PPBVideoDecoder_Destroy, ppapi::HostResource /* video_decoder */) #if !defined(OS_NACL) -// PPB_Flash_NetConnector. -IPC_MESSAGE_ROUTED5(PpapiMsg_PPBFlashNetConnector_ConnectACK, - ppapi::HostResource /* net_connector */, - int32_t /* result */, - IPC::PlatformFileForTransit /* handle */, - std::string /* local_addr_as_string */, - std::string /* remote_addr_as_string */) - // PPB_Flash. IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBFlash_SetInstanceAlwaysOnTop, PP_Instance /* instance */, @@ -1265,18 +1257,6 @@ IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBFlashMessageLoop_Run, IPC_SYNC_MESSAGE_ROUTED1_0(PpapiHostMsg_PPBFlashMessageLoop_Quit, ppapi::HostResource /* flash_message_loop */) -// PPB_Flash_NetConnector. -IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBFlashNetConnector_Create, - PP_Instance /* instance_id */, - ppapi::HostResource /* result */) -IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBFlashNetConnector_ConnectTcp, - ppapi::HostResource /* connector */, - std::string /* host */, - uint16_t /* port */) -IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBFlashNetConnector_ConnectTcpAddress, - ppapi::HostResource /* connector */, - std::string /* net_address_as_string */) - // PPB_TCPSocket_Private. IPC_SYNC_MESSAGE_CONTROL2_1(PpapiHostMsg_PPBTCPSocket_Create, int32 /* routing_id */, diff --git a/ppapi/proxy/ppb_flash_net_connector_proxy.cc b/ppapi/proxy/ppb_flash_net_connector_proxy.cc deleted file mode 100644 index 0b7ba10..0000000 --- a/ppapi/proxy/ppb_flash_net_connector_proxy.cc +++ /dev/null @@ -1,306 +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/proxy/ppb_flash_net_connector_proxy.h" - -#include <algorithm> - -#include "base/bind.h" -#include "ppapi/c/pp_errors.h" -#include "ppapi/c/private/ppb_flash_net_connector.h" -#include "ppapi/proxy/enter_proxy.h" -#include "ppapi/proxy/plugin_dispatcher.h" -#include "ppapi/proxy/ppapi_messages.h" -#include "ppapi/proxy/serialized_var.h" -#include "ppapi/shared_impl/tracked_callback.h" -#include "ppapi/thunk/enter.h" -#include "ppapi/thunk/ppb_flash_net_connector_api.h" -#include "ppapi/thunk/resource_creation_api.h" -#include "ppapi/thunk/thunk.h" - -using ppapi::thunk::EnterFunctionNoLock; -using ppapi::thunk::PPB_Flash_NetConnector_API; -using ppapi::thunk::ResourceCreationAPI; - -namespace ppapi { -namespace proxy { - -std::string NetAddressToString(const PP_NetAddress_Private& addr) { - return std::string(addr.data, std::min(static_cast<size_t>(addr.size), - sizeof(addr.data))); -} - -void StringToNetAddress(const std::string& str, PP_NetAddress_Private* addr) { - addr->size = std::min(str.size(), sizeof(addr->data)); - memcpy(addr->data, str.data(), addr->size); -} - -class FlashNetConnector : public PPB_Flash_NetConnector_API, - public Resource { - public: - explicit FlashNetConnector(const HostResource& resource); - virtual ~FlashNetConnector(); - - // Resource overrides. - virtual PPB_Flash_NetConnector_API* AsPPB_Flash_NetConnector_API() OVERRIDE; - - // PPB_Flash_NetConnector_API implementation. - virtual int32_t ConnectTcp(const char* host, - uint16_t port, - PP_FileHandle* socket_out, - PP_NetAddress_Private* local_addr_out, - PP_NetAddress_Private* remote_addr_out, - PP_CompletionCallback callback) OVERRIDE; - virtual int32_t ConnectTcpAddress(const PP_NetAddress_Private* addr, - PP_FileHandle* socket_out, - PP_NetAddress_Private* local_addr_out, - PP_NetAddress_Private* remote_addr_out, - PP_CompletionCallback callback) OVERRIDE; - - void ConnectComplete(int32_t result, - base::PlatformFile file, - const std::string& local_addr_as_string, - const std::string& remote_addr_as_string); - - private: - // Backend for both ConnectTcp and ConnectTcpAddress. To keep things generic, - // the message is passed in (on error, it's deleted). - int32_t ConnectWithMessage(IPC::Message* msg, - PP_FileHandle* socket_out, - PP_NetAddress_Private* local_addr_out, - PP_NetAddress_Private* remote_addr_out, - PP_CompletionCallback callback); - - scoped_refptr<TrackedCallback> callback_; - PP_FileHandle* socket_out_; - PP_NetAddress_Private* local_addr_out_; - PP_NetAddress_Private* remote_addr_out_; -}; - -FlashNetConnector::FlashNetConnector(const HostResource& resource) - : Resource(OBJECT_IS_PROXY, resource), - socket_out_(NULL), - local_addr_out_(NULL), - remote_addr_out_(NULL) { -} - -FlashNetConnector::~FlashNetConnector() { -} - -PPB_Flash_NetConnector_API* FlashNetConnector::AsPPB_Flash_NetConnector_API() { - return this; -} - -int32_t FlashNetConnector::ConnectTcp( - const char* host, - uint16_t port, - PP_FileHandle* socket_out, - PP_NetAddress_Private* local_addr_out, - PP_NetAddress_Private* remote_addr_out, - PP_CompletionCallback callback) { - return ConnectWithMessage( - new PpapiHostMsg_PPBFlashNetConnector_ConnectTcp( - API_ID_PPB_FLASH_NETCONNECTOR, host_resource(), host, port), - socket_out, local_addr_out, remote_addr_out, callback); -} - -int32_t FlashNetConnector::ConnectTcpAddress( - const PP_NetAddress_Private* addr, - PP_FileHandle* socket_out, - PP_NetAddress_Private* local_addr_out, - PP_NetAddress_Private* remote_addr_out, - PP_CompletionCallback callback) { - return ConnectWithMessage( - new PpapiHostMsg_PPBFlashNetConnector_ConnectTcpAddress( - API_ID_PPB_FLASH_NETCONNECTOR, - host_resource(), NetAddressToString(*addr)), - socket_out, local_addr_out, remote_addr_out, callback); -} - -void FlashNetConnector::ConnectComplete( - int32_t result, - base::PlatformFile file, - const std::string& local_addr_as_string, - const std::string& remote_addr_as_string) { - if (TrackedCallback::IsPending(callback_)) { - base::ClosePlatformFile(file); - return; - } - - *socket_out_ = static_cast<PP_FileHandle>(file); - StringToNetAddress(local_addr_as_string, local_addr_out_); - StringToNetAddress(remote_addr_as_string, remote_addr_out_); - - TrackedCallback::ClearAndRun(&callback_, result); -} - -int32_t FlashNetConnector::ConnectWithMessage( - IPC::Message* msg, - PP_FileHandle* socket_out, - PP_NetAddress_Private* local_addr_out, - PP_NetAddress_Private* remote_addr_out, - PP_CompletionCallback callback) { - scoped_ptr<IPC::Message> msg_deletor(msg); - if (TrackedCallback::IsPending(callback_)) - return PP_ERROR_INPROGRESS; // Can only have one pending request. - - // Send the request, it will call us back via ConnectACK. - PluginDispatcher::GetForResource(this)->Send(msg_deletor.release()); - - callback_ = new TrackedCallback(this, callback); - socket_out_ = socket_out; - local_addr_out_ = local_addr_out; - remote_addr_out_ = remote_addr_out; - return PP_OK_COMPLETIONPENDING; -} - -// Contains the data that the host interface will write to so we can send it -// to the plugin. This is created when a request is initiated, and deleted in -// the callback handler. -struct PPB_Flash_NetConnector_Proxy::ConnectCallbackInfo { - ConnectCallbackInfo(const HostResource& r) : resource(r), handle(0) { - memset(&local_addr, 0, sizeof(local_addr)); - memset(&remote_addr, 0, sizeof(remote_addr)); - } - - HostResource resource; - - PP_FileHandle handle; - PP_NetAddress_Private local_addr; - PP_NetAddress_Private remote_addr; -}; - -PPB_Flash_NetConnector_Proxy::PPB_Flash_NetConnector_Proxy( - Dispatcher* dispatcher) - : InterfaceProxy(dispatcher), - callback_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { -} - -PPB_Flash_NetConnector_Proxy::~PPB_Flash_NetConnector_Proxy() { -} - -// static -PP_Resource PPB_Flash_NetConnector_Proxy::CreateProxyResource( - PP_Instance instance) { - PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance); - if (!dispatcher) - return 0; - - HostResource result; - dispatcher->Send(new PpapiHostMsg_PPBFlashNetConnector_Create( - API_ID_PPB_FLASH_NETCONNECTOR, instance, &result)); - if (result.is_null()) - return 0; - return (new FlashNetConnector(result))->GetReference(); -} - -bool PPB_Flash_NetConnector_Proxy::OnMessageReceived(const IPC::Message& msg) { - bool handled = true; - IPC_BEGIN_MESSAGE_MAP(PPB_Flash_NetConnector_Proxy, msg) - IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBFlashNetConnector_Create, - OnMsgCreate) - IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBFlashNetConnector_ConnectTcp, - OnMsgConnectTcp) - IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBFlashNetConnector_ConnectTcpAddress, - OnMsgConnectTcpAddress) - IPC_MESSAGE_HANDLER(PpapiMsg_PPBFlashNetConnector_ConnectACK, - OnMsgConnectACK) - IPC_MESSAGE_UNHANDLED(handled = false) - IPC_END_MESSAGE_MAP() - return handled; -} - -void PPB_Flash_NetConnector_Proxy::OnMsgCreate(PP_Instance instance, - HostResource* result) { - thunk::EnterResourceCreation enter(instance); - if (enter.succeeded()) { - result->SetHostResource( - instance, - enter.functions()->CreateFlashNetConnector(instance)); - } -} - -void PPB_Flash_NetConnector_Proxy::OnMsgConnectTcp( - const HostResource& resource, - const std::string& host, - uint16_t port) { - ConnectCallbackInfo* info = new ConnectCallbackInfo(resource); - pp::CompletionCallback callback = callback_factory_.NewOptionalCallback( - &PPB_Flash_NetConnector_Proxy::OnCompleteCallbackInHost, info); - - EnterHostFromHostResource<PPB_Flash_NetConnector_API> enter(resource); - int32_t result = PP_ERROR_BADRESOURCE; - if (enter.succeeded()) { - result = enter.object()->ConnectTcp( - host.c_str(), port, &info->handle, &info->local_addr, - &info->remote_addr, callback.pp_completion_callback()); - } - if (result != PP_OK_COMPLETIONPENDING) - OnCompleteCallbackInHost(result, info); -} - -void PPB_Flash_NetConnector_Proxy::OnMsgConnectTcpAddress( - const HostResource& resource, - const std::string& net_address_as_string) { - ConnectCallbackInfo* info = new ConnectCallbackInfo(resource); - pp::CompletionCallback callback = callback_factory_.NewOptionalCallback( - &PPB_Flash_NetConnector_Proxy::OnCompleteCallbackInHost, info); - - PP_NetAddress_Private net_address; - StringToNetAddress(net_address_as_string, &net_address); - - EnterHostFromHostResource<PPB_Flash_NetConnector_API> enter(resource); - int32_t result = PP_ERROR_BADRESOURCE; - if (enter.succeeded()) { - result = enter.object()->ConnectTcpAddress( - &net_address, &info->handle, &info->local_addr, &info->remote_addr, - callback.pp_completion_callback()); - } - if (result != PP_OK_COMPLETIONPENDING) - OnCompleteCallbackInHost(result, info); -} - -void PPB_Flash_NetConnector_Proxy::OnMsgConnectACK( - const HostResource& host_resource, - int32_t result, - IPC::PlatformFileForTransit handle, - const std::string& load_addr_as_string, - const std::string& remote_addr_as_string) { - base::PlatformFile platform_file = - IPC::PlatformFileForTransitToPlatformFile(handle); - - EnterPluginFromHostResource<PPB_Flash_NetConnector_API> enter(host_resource); - if (enter.failed()) { - base::ClosePlatformFile(platform_file); - return; - } - FlashNetConnector* object = static_cast<FlashNetConnector*>(enter.object()); - object->ConnectComplete(result, platform_file, - load_addr_as_string, remote_addr_as_string); -} - -void PPB_Flash_NetConnector_Proxy::OnCompleteCallbackInHost( - int32_t result, - ConnectCallbackInfo* info) { - // Callback must always delete the info. - scoped_ptr<ConnectCallbackInfo> info_deletor(info); - - if (result == PP_OK) { - dispatcher()->Send(new PpapiMsg_PPBFlashNetConnector_ConnectACK( - API_ID_PPB_FLASH_NETCONNECTOR, - info->resource, result, - dispatcher()->ShareHandleWithRemote( - static_cast<base::PlatformFile>(info->handle), true), - NetAddressToString(info->local_addr), - NetAddressToString(info->remote_addr))); - } else { - dispatcher()->Send(new PpapiMsg_PPBFlashNetConnector_ConnectACK( - API_ID_PPB_FLASH_NETCONNECTOR, - info->resource, result, - IPC::InvalidPlatformFileForTransit(), std::string(), std::string())); - } -} - -} // namespace proxy -} // namespace ppapi diff --git a/ppapi/proxy/ppb_flash_net_connector_proxy.h b/ppapi/proxy/ppb_flash_net_connector_proxy.h deleted file mode 100644 index 14269d9..0000000 --- a/ppapi/proxy/ppb_flash_net_connector_proxy.h +++ /dev/null @@ -1,59 +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_PROXY_PPB_FLASH_NET_CONNECTOR_PROXY_H_ -#define PPAPI_PROXY_PPB_FLASH_NET_CONNECTOR_PROXY_H_ - -#include "base/platform_file.h" -#include "ipc/ipc_platform_file.h" -#include "ppapi/c/pp_instance.h" -#include "ppapi/proxy/interface_proxy.h" -#include "ppapi/proxy/proxy_non_thread_safe_ref_count.h" -#include "ppapi/utility/completion_callback_factory.h" - -namespace ppapi { - -class HostResource; - -namespace proxy { - -class PPB_Flash_NetConnector_Proxy : public InterfaceProxy { - public: - PPB_Flash_NetConnector_Proxy(Dispatcher* dispatcher); - virtual ~PPB_Flash_NetConnector_Proxy(); - - static PP_Resource CreateProxyResource(PP_Instance instance); - - // InterfaceProxy implementation. - virtual bool OnMessageReceived(const IPC::Message& msg); - - private: - struct ConnectCallbackInfo; - - // Plugin->host message handlers. - void OnMsgCreate(PP_Instance instance, - ppapi::HostResource* result); - void OnMsgConnectTcp(const ppapi::HostResource& resource, - const std::string& host, - uint16_t port); - void OnMsgConnectTcpAddress(const ppapi::HostResource& resource_id, - const std::string& net_address_as_string); - - // Host->plugin message handler. - void OnMsgConnectACK(const ppapi::HostResource& host_resource, - int32_t result, - IPC::PlatformFileForTransit handle, - const std::string& load_addr_as_string, - const std::string& remote_addr_as_string); - - void OnCompleteCallbackInHost(int32_t result, ConnectCallbackInfo* info); - - pp::CompletionCallbackFactory<PPB_Flash_NetConnector_Proxy, - ProxyNonThreadSafeRefCount> callback_factory_; -}; - -} // namespace proxy -} // namespace ppapi - -#endif // PPAPI_PROXY_PPB_FLASH_NET_CONNECTOR_PROXY_H_ diff --git a/ppapi/proxy/resource_creation_proxy.cc b/ppapi/proxy/resource_creation_proxy.cc index 5e9cecf..601d314 100644 --- a/ppapi/proxy/resource_creation_proxy.cc +++ b/ppapi/proxy/resource_creation_proxy.cc @@ -20,7 +20,6 @@ #include "ppapi/proxy/ppb_file_system_proxy.h" #include "ppapi/proxy/ppb_flash_menu_proxy.h" #include "ppapi/proxy/ppb_flash_message_loop_proxy.h" -#include "ppapi/proxy/ppb_flash_net_connector_proxy.h" #include "ppapi/proxy/ppb_graphics_2d_proxy.h" #include "ppapi/proxy/ppb_graphics_3d_proxy.h" #include "ppapi/proxy/ppb_host_resolver_private_proxy.h" @@ -162,11 +161,6 @@ PP_Resource ResourceCreationProxy::CreateFlashMessageLoop( PP_Instance instance) { return PPB_Flash_MessageLoop_Proxy::CreateProxyResource(instance); } - -PP_Resource ResourceCreationProxy::CreateFlashNetConnector( - PP_Instance instance) { - return PPB_Flash_NetConnector_Proxy::CreateProxyResource(instance); -} #endif // !defined(OS_NACL) PP_Resource ResourceCreationProxy::CreateGraphics2D(PP_Instance instance, diff --git a/ppapi/proxy/resource_creation_proxy.h b/ppapi/proxy/resource_creation_proxy.h index 60c98fb..9b942ae 100644 --- a/ppapi/proxy/resource_creation_proxy.h +++ b/ppapi/proxy/resource_creation_proxy.h @@ -71,7 +71,6 @@ class ResourceCreationProxy : public InterfaceProxy, virtual PP_Resource CreateFlashMenu(PP_Instance instance, const PP_Flash_Menu* menu_data) OVERRIDE; virtual PP_Resource CreateFlashMessageLoop(PP_Instance instance) OVERRIDE; - virtual PP_Resource CreateFlashNetConnector(PP_Instance instance) OVERRIDE; virtual PP_Resource CreateGraphics2D(PP_Instance pp_instance, const PP_Size& size, PP_Bool is_always_opaque) OVERRIDE; diff --git a/ppapi/shared_impl/api_id.h b/ppapi/shared_impl/api_id.h index 61af629..ea6ed67 100644 --- a/ppapi/shared_impl/api_id.h +++ b/ppapi/shared_impl/api_id.h @@ -30,7 +30,6 @@ enum ApiID { API_ID_PPB_FLASH_FILE_MODULELOCAL, API_ID_PPB_FLASH_MENU, API_ID_PPB_FLASH_MESSAGELOOP, - API_ID_PPB_FLASH_NETCONNECTOR, API_ID_PPB_FONT, API_ID_PPB_GRAPHICS_2D, API_ID_PPB_GRAPHICS_3D, diff --git a/ppapi/shared_impl/resource.h b/ppapi/shared_impl/resource.h index cccc999..86f5168 100644 --- a/ppapi/shared_impl/resource.h +++ b/ppapi/shared_impl/resource.h @@ -37,7 +37,6 @@ F(PPB_Find_API) \ F(PPB_Flash_Menu_API) \ F(PPB_Flash_MessageLoop_API) \ - F(PPB_Flash_NetConnector_API) \ F(PPB_Graphics2D_API) \ F(PPB_Graphics3D_API) \ F(PPB_HostResolver_Private_API) \ diff --git a/ppapi/thunk/ppb_flash_net_connector_api.h b/ppapi/thunk/ppb_flash_net_connector_api.h deleted file mode 100644 index 5bf0198..0000000 --- a/ppapi/thunk/ppb_flash_net_connector_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_FLASH_NET_CONNECTOR_API_H_ -#define PPAPI_THUNK_PPB_FLASH_NET_CONNECTOR_API_H_ - -#include "ppapi/c/private/ppb_flash_net_connector.h" - -namespace ppapi { -namespace thunk { - -class PPB_Flash_NetConnector_API { - public: - virtual ~PPB_Flash_NetConnector_API() {} - - virtual int32_t ConnectTcp(const char* host, - uint16_t port, - PP_FileHandle* socket_out, - PP_NetAddress_Private* local_addr_out, - PP_NetAddress_Private* remote_addr_out, - PP_CompletionCallback callback) = 0; - virtual int32_t ConnectTcpAddress(const PP_NetAddress_Private* addr, - PP_FileHandle* socket_out, - PP_NetAddress_Private* local_addr_out, - PP_NetAddress_Private* remote_addr_out, - PP_CompletionCallback callback) = 0; -}; - -} // namespace thunk -} // namespace ppapi - -#endif // PPAPI_THUNK_PPB_FLASH_NET_CONNECTOR_API_H_ diff --git a/ppapi/thunk/ppb_flash_net_connector_thunk.cc b/ppapi/thunk/ppb_flash_net_connector_thunk.cc deleted file mode 100644 index 0be5043..0000000 --- a/ppapi/thunk/ppb_flash_net_connector_thunk.cc +++ /dev/null @@ -1,73 +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/private/ppb_flash_net_connector.h" -#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_flash_net_connector_api.h" -#include "ppapi/thunk/resource_creation_api.h" - -namespace ppapi { -namespace thunk { - -namespace { - -typedef EnterResource<PPB_Flash_NetConnector_API> EnterNetConnector; - -PP_Resource Create(PP_Instance instance) { - EnterResourceCreation enter(instance); - if (enter.failed()) - return 0; - return enter.functions()->CreateFlashNetConnector(instance); -} - -PP_Bool IsFlashNetConnector(PP_Resource resource) { - EnterNetConnector enter(resource, false); - return PP_FromBool(enter.succeeded()); -} - -int32_t ConnectTcp(PP_Resource resource, - const char* host, - uint16_t port, - PP_FileHandle* socket_out, - PP_NetAddress_Private* local_addr_out, - PP_NetAddress_Private* remote_addr_out, - PP_CompletionCallback callback) { - EnterNetConnector enter(resource, callback, true); - if (enter.failed()) - return enter.retval(); - return enter.SetResult(enter.object()->ConnectTcp( - host, port, socket_out, local_addr_out, remote_addr_out, callback)); -} - -int32_t ConnectTcpAddress(PP_Resource resource, - const PP_NetAddress_Private* addr, - PP_FileHandle* socket_out, - PP_NetAddress_Private* local_addr_out, - PP_NetAddress_Private* remote_addr_out, - PP_CompletionCallback callback) { - EnterNetConnector enter(resource, callback, true); - if (enter.failed()) - return enter.retval(); - return enter.SetResult(enter.object()->ConnectTcpAddress( - addr, socket_out, local_addr_out, remote_addr_out, callback)); -} - -const PPB_Flash_NetConnector g_ppb_flash_net_connector_thunk = { - &Create, - &IsFlashNetConnector, - &ConnectTcp, - &ConnectTcpAddress -}; - -} // namespace - -const PPB_Flash_NetConnector* GetPPB_Flash_NetConnector_0_2_Thunk() { - return &g_ppb_flash_net_connector_thunk; -} - -} // namespace thunk -} // namespace ppapi diff --git a/ppapi/thunk/resource_creation_api.h b/ppapi/thunk/resource_creation_api.h index 536c967..5a6ccb5 100644 --- a/ppapi/thunk/resource_creation_api.h +++ b/ppapi/thunk/resource_creation_api.h @@ -74,7 +74,6 @@ class ResourceCreationAPI { virtual PP_Resource CreateFlashMenu(PP_Instance instance, const PP_Flash_Menu* menu_data) = 0; virtual PP_Resource CreateFlashMessageLoop(PP_Instance instance) = 0; - virtual PP_Resource CreateFlashNetConnector(PP_Instance instance) = 0; virtual PP_Resource CreateGraphics2D(PP_Instance instance, const PP_Size& size, PP_Bool is_always_opaque) = 0; diff --git a/ppapi/thunk/thunk.h b/ppapi/thunk/thunk.h index 37698b6..e98e71b 100644 --- a/ppapi/thunk/thunk.h +++ b/ppapi/thunk/thunk.h @@ -9,7 +9,6 @@ #include "ppapi/c/private/ppb_flash_clipboard.h" #include "ppapi/c/private/ppb_flash_menu.h" #include "ppapi/c/private/ppb_flash_message_loop.h" -#include "ppapi/c/private/ppb_flash_net_connector.h" #include "ppapi/c/private/ppb_flash_fullscreen.h" #include "ppapi/c/private/ppb_host_resolver_private.h" #include "ppapi/c/private/ppb_instance_private.h" @@ -67,8 +66,6 @@ PPAPI_THUNK_EXPORT const PPB_Flash_Clipboard_3_0* PPAPI_THUNK_EXPORT const PPB_Flash_Menu_0_2* GetPPB_Flash_Menu_0_2_Thunk(); PPAPI_THUNK_EXPORT const PPB_Flash_MessageLoop_0_1* GetPPB_Flash_MessageLoop_0_1_Thunk(); -PPAPI_THUNK_EXPORT const PPB_Flash_NetConnector_0_2* - GetPPB_Flash_NetConnector_0_2_Thunk(); PPAPI_THUNK_EXPORT const PPB_Graphics3DTrusted_1_0* GetPPB_Graphics3DTrusted_1_0_Thunk(); PPAPI_THUNK_EXPORT const PPB_HostResolver_Private_0_1* diff --git a/webkit/glue/webkit_glue.gypi b/webkit/glue/webkit_glue.gypi index a5a3743..987eb2c 100644 --- a/webkit/glue/webkit_glue.gypi +++ b/webkit/glue/webkit_glue.gypi @@ -283,8 +283,6 @@ '../plugins/ppapi/ppb_flash_menu_impl.h', '../plugins/ppapi/ppb_flash_message_loop_impl.cc', '../plugins/ppapi/ppb_flash_message_loop_impl.h', - '../plugins/ppapi/ppb_flash_net_connector_impl.cc', - '../plugins/ppapi/ppb_flash_net_connector_impl.h', '../plugins/ppapi/ppb_gpu_blacklist_private_impl.cc', '../plugins/ppapi/ppb_gpu_blacklist_private_impl.h', '../plugins/ppapi/ppb_graphics_2d_impl.cc', diff --git a/webkit/plugins/ppapi/mock_plugin_delegate.cc b/webkit/plugins/ppapi/mock_plugin_delegate.cc index 44b815e..ab55d97 100644 --- a/webkit/plugins/ppapi/mock_plugin_delegate.cc +++ b/webkit/plugins/ppapi/mock_plugin_delegate.cc @@ -234,19 +234,6 @@ MockPluginDelegate::GetFileThreadMessageLoopProxy() { return scoped_refptr<base::MessageLoopProxy>(); } -int32_t MockPluginDelegate::ConnectTcp( - webkit::ppapi::PPB_Flash_NetConnector_Impl* connector, - const char* host, - uint16_t port) { - return PP_ERROR_FAILED; -} - -int32_t MockPluginDelegate::ConnectTcpAddress( - webkit::ppapi::PPB_Flash_NetConnector_Impl* connector, - const PP_NetAddress_Private* addr) { - return PP_ERROR_FAILED; -} - uint32 MockPluginDelegate::TCPSocketCreate() { return 0; } diff --git a/webkit/plugins/ppapi/mock_plugin_delegate.h b/webkit/plugins/ppapi/mock_plugin_delegate.h index 214a868..d20b05e 100644 --- a/webkit/plugins/ppapi/mock_plugin_delegate.h +++ b/webkit/plugins/ppapi/mock_plugin_delegate.h @@ -104,13 +104,6 @@ class MockPluginDelegate : public PluginDelegate { FilePath* platform_path); virtual scoped_refptr<base::MessageLoopProxy> GetFileThreadMessageLoopProxy(); - virtual int32_t ConnectTcp( - webkit::ppapi::PPB_Flash_NetConnector_Impl* connector, - const char* host, - uint16_t port); - virtual int32_t ConnectTcpAddress( - webkit::ppapi::PPB_Flash_NetConnector_Impl* connector, - const PP_NetAddress_Private* addr); virtual uint32 TCPSocketCreate(); virtual void TCPSocketConnect(PPB_TCPSocket_Private_Impl* socket, uint32 socket_id, diff --git a/webkit/plugins/ppapi/plugin_delegate.h b/webkit/plugins/ppapi/plugin_delegate.h index 8b6f443..1003a6fb 100644 --- a/webkit/plugins/ppapi/plugin_delegate.h +++ b/webkit/plugins/ppapi/plugin_delegate.h @@ -88,7 +88,6 @@ class PluginInstance; class PluginModule; class PPB_Broker_Impl; class PPB_Flash_Menu_Impl; -class PPB_Flash_NetConnector_Impl; class PPB_TCPSocket_Private_Impl; class PPB_UDPSocket_Private_Impl; @@ -459,14 +458,6 @@ class PluginDelegate { virtual scoped_refptr<base::MessageLoopProxy> GetFileThreadMessageLoopProxy() = 0; - virtual int32_t ConnectTcp( - webkit::ppapi::PPB_Flash_NetConnector_Impl* connector, - const char* host, - uint16_t port) = 0; - virtual int32_t ConnectTcpAddress( - webkit::ppapi::PPB_Flash_NetConnector_Impl* connector, - const PP_NetAddress_Private* addr) = 0; - // For PPB_TCPSocket_Private. virtual uint32 TCPSocketCreate() = 0; virtual void TCPSocketConnect(PPB_TCPSocket_Private_Impl* socket, diff --git a/webkit/plugins/ppapi/plugin_module.cc b/webkit/plugins/ppapi/plugin_module.cc index e485905..0d640b1 100644 --- a/webkit/plugins/ppapi/plugin_module.cc +++ b/webkit/plugins/ppapi/plugin_module.cc @@ -111,7 +111,6 @@ #include "webkit/plugins/ppapi/ppb_flash_file_impl.h" #include "webkit/plugins/ppapi/ppb_flash_impl.h" #include "webkit/plugins/ppapi/ppb_flash_menu_impl.h" -#include "webkit/plugins/ppapi/ppb_flash_net_connector_impl.h" #include "webkit/plugins/ppapi/ppb_gpu_blacklist_private_impl.h" #include "webkit/plugins/ppapi/ppb_graphics_2d_impl.h" #include "webkit/plugins/ppapi/ppb_image_data_impl.h" @@ -374,11 +373,6 @@ const void* GetInterface(const char* name) { if (strcmp(name, PPB_VAR_ARRAY_BUFFER_INTERFACE_1_0) == 0) return ::ppapi::PPB_Var_Shared::GetVarArrayBufferInterface1_0(); -#ifdef ENABLE_FLAPPER_HACKS - if (strcmp(name, PPB_FLASH_NETCONNECTOR_INTERFACE) == 0) - return ::ppapi::thunk::GetPPB_Flash_NetConnector_0_2_Thunk(); -#endif // ENABLE_FLAPPER_HACKS - // Only support the testing interface when the command line switch is // specified. This allows us to prevent people from (ab)using this interface // in production code. diff --git a/webkit/plugins/ppapi/ppb_flash_net_connector_impl.cc b/webkit/plugins/ppapi/ppb_flash_net_connector_impl.cc deleted file mode 100644 index b3db5ac..0000000 --- a/webkit/plugins/ppapi/ppb_flash_net_connector_impl.cc +++ /dev/null @@ -1,132 +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 "webkit/plugins/ppapi/ppb_flash_net_connector_impl.h" - -#include "ppapi/c/pp_completion_callback.h" -#include "ppapi/c/private/ppb_flash_net_connector.h" -#include "webkit/plugins/ppapi/common.h" -#include "webkit/plugins/ppapi/plugin_delegate.h" -#include "webkit/plugins/ppapi/plugin_module.h" -#include "webkit/plugins/ppapi/ppapi_plugin_instance.h" -#include "webkit/plugins/ppapi/resource_helper.h" - -using ppapi::thunk::PPB_Flash_NetConnector_API; -using ppapi::TrackedCallback; - -namespace webkit { -namespace ppapi { - -PPB_Flash_NetConnector_Impl::PPB_Flash_NetConnector_Impl(PP_Instance instance) - : Resource(::ppapi::OBJECT_IS_IMPL, instance), - socket_out_(NULL), - local_addr_out_(NULL), - remote_addr_out_(NULL) { -} - -PPB_Flash_NetConnector_Impl::~PPB_Flash_NetConnector_Impl() { -} - -PPB_Flash_NetConnector_API* - PPB_Flash_NetConnector_Impl::AsPPB_Flash_NetConnector_API() { - return this; -} - -int32_t PPB_Flash_NetConnector_Impl::ConnectTcp( - const char* host, - uint16_t port, - PP_FileHandle* socket_out, - PP_NetAddress_Private* local_addr_out, - PP_NetAddress_Private* remote_addr_out, - PP_CompletionCallback callback) { - // |socket_out| is not optional. - if (!socket_out) - return PP_ERROR_BADARGUMENT; - - if (!callback.func) - return PP_ERROR_BLOCKS_MAIN_THREAD; - - if (TrackedCallback::IsPending(callback_)) - return PP_ERROR_INPROGRESS; - - PluginInstance* plugin_instance = ResourceHelper::GetPluginInstance(this); - if (!plugin_instance) - return false; - int32_t rv = plugin_instance->delegate()->ConnectTcp(this, host, port); - if (rv == PP_OK_COMPLETIONPENDING) { - // Record callback and output buffers. - callback_ = new TrackedCallback(this, callback); - socket_out_ = socket_out; - local_addr_out_ = local_addr_out; - remote_addr_out_ = remote_addr_out; - } else { - // This should never be completed synchronously successfully. - DCHECK_NE(rv, PP_OK); - } - return rv; -} - -int32_t PPB_Flash_NetConnector_Impl::ConnectTcpAddress( - const PP_NetAddress_Private* addr, - PP_FileHandle* socket_out, - PP_NetAddress_Private* local_addr_out, - PP_NetAddress_Private* remote_addr_out, - PP_CompletionCallback callback) { - // |socket_out| is not optional. - if (!socket_out) - return PP_ERROR_BADARGUMENT; - - if (!callback.func) - return PP_ERROR_BLOCKS_MAIN_THREAD; - - if (TrackedCallback::IsPending(callback_)) - return PP_ERROR_INPROGRESS; - - PluginInstance* plugin_instance = ResourceHelper::GetPluginInstance(this); - if (!plugin_instance) - return false; - int32_t rv = plugin_instance->delegate()->ConnectTcpAddress(this, addr); - if (rv == PP_OK_COMPLETIONPENDING) { - // Record callback and output buffers. - callback_ = new TrackedCallback(this, callback); - socket_out_ = socket_out; - local_addr_out_ = local_addr_out; - remote_addr_out_ = remote_addr_out; - } else { - // This should never be completed synchronously successfully. - DCHECK_NE(rv, PP_OK); - } - return rv; -} - -void PPB_Flash_NetConnector_Impl::CompleteConnectTcp( - PP_FileHandle socket, - const PP_NetAddress_Private& local_addr, - const PP_NetAddress_Private& remote_addr) { - int32_t rv = PP_ERROR_ABORTED; - if (!callback_->aborted()) { - CHECK(!callback_->completed()); - - // Write output data. - *socket_out_ = socket; - if (socket != PP_kInvalidFileHandle) { - if (local_addr_out_) - *local_addr_out_ = local_addr; - if (remote_addr_out_) - *remote_addr_out_ = remote_addr; - rv = PP_OK; - } else { - rv = PP_ERROR_FAILED; - } - } - - socket_out_ = NULL; - local_addr_out_ = NULL; - remote_addr_out_ = NULL; - TrackedCallback::ClearAndRun(&callback_, rv); -} - -} // namespace ppapi -} // namespace webkit - diff --git a/webkit/plugins/ppapi/ppb_flash_net_connector_impl.h b/webkit/plugins/ppapi/ppb_flash_net_connector_impl.h deleted file mode 100644 index 801ba2e..0000000 --- a/webkit/plugins/ppapi/ppb_flash_net_connector_impl.h +++ /dev/null @@ -1,66 +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 WEBKIT_PLUGINS_PPAPI_PPB_FLASH_NET_CONNECTOR_IMPL_H_ -#define WEBKIT_PLUGINS_PPAPI_PPB_FLASH_NET_CONNECTOR_IMPL_H_ - -#include "base/basictypes.h" -#include "base/compiler_specific.h" -#include "base/memory/ref_counted.h" -#include "ppapi/c/private/ppb_flash_net_connector.h" -#include "ppapi/shared_impl/resource.h" -#include "ppapi/shared_impl/tracked_callback.h" -#include "ppapi/thunk/ppb_flash_net_connector_api.h" -#include "webkit/plugins/webkit_plugins_export.h" - -namespace webkit { -namespace ppapi { - -class PPB_Flash_NetConnector_Impl - : public ::ppapi::Resource, - public ::ppapi::thunk::PPB_Flash_NetConnector_API { - public: - explicit PPB_Flash_NetConnector_Impl(PP_Instance instance); - virtual ~PPB_Flash_NetConnector_Impl(); - - // Resource override. - virtual ::ppapi::thunk::PPB_Flash_NetConnector_API* - AsPPB_Flash_NetConnector_API() OVERRIDE; - - // PPB_Flash_NetConnector implementation. - virtual int32_t ConnectTcp(const char* host, - uint16_t port, - PP_FileHandle* socket_out, - PP_NetAddress_Private* local_addr_out, - PP_NetAddress_Private* remote_addr_out, - PP_CompletionCallback callback) OVERRIDE; - virtual int32_t ConnectTcpAddress(const PP_NetAddress_Private* addr, - PP_FileHandle* socket_out, - PP_NetAddress_Private* local_addr_out, - PP_NetAddress_Private* remote_addr_out, - PP_CompletionCallback callback) OVERRIDE; - - // Called to complete |ConnectTcp()| and |ConnectTcpAddress()|. - WEBKIT_PLUGINS_EXPORT void CompleteConnectTcp( - PP_FileHandle socket, - const PP_NetAddress_Private& local_addr, - const PP_NetAddress_Private& remote_addr); - - private: - // Any pending callback (for |ConnectTcp()| or |ConnectTcpAddress()|). - scoped_refptr< ::ppapi::TrackedCallback> callback_; - - // Output buffers to be filled in when the callback is completed successfully - // (|{local,remote}_addr_out| are optional and may be null). - PP_FileHandle* socket_out_; - PP_NetAddress_Private* local_addr_out_; - PP_NetAddress_Private* remote_addr_out_; - - DISALLOW_COPY_AND_ASSIGN(PPB_Flash_NetConnector_Impl); -}; - -} // namespace ppapi -} // namespace webkit - -#endif // WEBKIT_PLUGINS_PPAPI_PPB_FLASH_NET_CONNECTOR_IMPL_H_ diff --git a/webkit/plugins/ppapi/resource_creation_impl.cc b/webkit/plugins/ppapi/resource_creation_impl.cc index e1b540c..d701b9d 100644 --- a/webkit/plugins/ppapi/resource_creation_impl.cc +++ b/webkit/plugins/ppapi/resource_creation_impl.cc @@ -22,7 +22,6 @@ #include "webkit/plugins/ppapi/ppb_file_system_impl.h" #include "webkit/plugins/ppapi/ppb_flash_menu_impl.h" #include "webkit/plugins/ppapi/ppb_flash_message_loop_impl.h" -#include "webkit/plugins/ppapi/ppb_flash_net_connector_impl.h" #include "webkit/plugins/ppapi/ppb_graphics_2d_impl.h" #include "webkit/plugins/ppapi/ppb_graphics_3d_impl.h" #include "webkit/plugins/ppapi/ppb_host_resolver_private_impl.h" @@ -154,11 +153,6 @@ PP_Resource ResourceCreationImpl::CreateFlashMessageLoop(PP_Instance instance) { return PPB_Flash_MessageLoop_Impl::Create(instance); } -PP_Resource ResourceCreationImpl::CreateFlashNetConnector( - PP_Instance instance) { - return (new PPB_Flash_NetConnector_Impl(instance))->GetReference(); -} - PP_Resource ResourceCreationImpl::CreateGraphics2D( PP_Instance instance, const PP_Size& size, diff --git a/webkit/plugins/ppapi/resource_creation_impl.h b/webkit/plugins/ppapi/resource_creation_impl.h index b918cda..439bd5c 100644 --- a/webkit/plugins/ppapi/resource_creation_impl.h +++ b/webkit/plugins/ppapi/resource_creation_impl.h @@ -58,7 +58,6 @@ class ResourceCreationImpl : public ::ppapi::FunctionGroupBase, virtual PP_Resource CreateFlashMenu(PP_Instance instance, const PP_Flash_Menu* menu_data) OVERRIDE; virtual PP_Resource CreateFlashMessageLoop(PP_Instance instance) OVERRIDE; - virtual PP_Resource CreateFlashNetConnector(PP_Instance instance) OVERRIDE; virtual PP_Resource CreateGraphics2D(PP_Instance pp_instance, const PP_Size& size, PP_Bool is_always_opaque) OVERRIDE; |