Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Side by Side Diff: webkit/plugins/ppapi/ppb_tcp_socket_private_impl.h

Issue 9283022: Exposed Listen and Accept methods to plugin. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Sync. Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_TCP_SOCKET_PRIVATE_IMPL_H_ 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_TCP_SOCKET_PRIVATE_IMPL_H_
6 #define WEBKIT_PLUGINS_PPAPI_PPB_TCP_SOCKET_PRIVATE_IMPL_H_ 6 #define WEBKIT_PLUGINS_PPAPI_PPB_TCP_SOCKET_PRIVATE_IMPL_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "ppapi/shared_impl/private/tcp_socket_private_impl.h" 9 #include "ppapi/shared_impl/private/tcp_socket_private_impl.h"
10 10
11 namespace webkit { 11 namespace webkit {
12 namespace ppapi { 12 namespace ppapi {
13 13
14 class PluginDelegate;
15
14 class PPB_TCPSocket_Private_Impl : public ::ppapi::TCPSocketPrivateImpl { 16 class PPB_TCPSocket_Private_Impl : public ::ppapi::TCPSocketPrivateImpl {
15 public: 17 public:
16 static PP_Resource CreateResource(PP_Instance instance); 18 static PP_Resource CreateResource(PP_Instance instance);
19 static PP_Resource CreateConnectedSocket(
20 PP_Instance instance,
21 uint32 socket_id,
22 const PP_NetAddress_Private& local_addr,
23 const PP_NetAddress_Private& remote_addr);
17 24
18 virtual void SendConnect(const std::string& host, uint16_t port) OVERRIDE; 25 virtual void SendConnect(const std::string& host, uint16_t port) OVERRIDE;
19 virtual void SendConnectWithNetAddress( 26 virtual void SendConnectWithNetAddress(
20 const PP_NetAddress_Private& addr) OVERRIDE; 27 const PP_NetAddress_Private& addr) OVERRIDE;
21 virtual void SendSSLHandshake(const std::string& server_name, 28 virtual void SendSSLHandshake(const std::string& server_name,
22 uint16_t server_port) OVERRIDE; 29 uint16_t server_port) OVERRIDE;
23 virtual void SendRead(int32_t bytes_to_read) OVERRIDE; 30 virtual void SendRead(int32_t bytes_to_read) OVERRIDE;
24 virtual void SendWrite(const std::string& buffer) OVERRIDE; 31 virtual void SendWrite(const std::string& buffer) OVERRIDE;
25 virtual void SendDisconnect() OVERRIDE; 32 virtual void SendDisconnect() OVERRIDE;
26 33
27 private: 34 private:
28 PPB_TCPSocket_Private_Impl(PP_Instance instance, uint32 socket_id); 35 PPB_TCPSocket_Private_Impl(PP_Instance instance, uint32 socket_id);
29 virtual ~PPB_TCPSocket_Private_Impl(); 36 virtual ~PPB_TCPSocket_Private_Impl();
30 37
38 static PluginDelegate* GetPluginDelegate(PP_Instance instance);
39
31 DISALLOW_COPY_AND_ASSIGN(PPB_TCPSocket_Private_Impl); 40 DISALLOW_COPY_AND_ASSIGN(PPB_TCPSocket_Private_Impl);
32 }; 41 };
33 42
34 } // namespace ppapi 43 } // namespace ppapi
35 } // namespace webkit 44 } // namespace webkit
36 45
37 #endif // WEBKIT_PLUGINS_PPAPI_PPB_TCP_SOCKET_PRIVATE_IMPL_H_ 46 #endif // WEBKIT_PLUGINS_PPAPI_PPB_TCP_SOCKET_PRIVATE_IMPL_H_
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/ppb_tcp_server_socket_private_impl.cc ('k') | webkit/plugins/ppapi/ppb_tcp_socket_private_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698