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

Side by Side Diff: ppapi/proxy/ppb_tcp_socket_private_proxy.h

Issue 9699100: Add functionality to pppapi TCPSocket to support secure sockets in flash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « ppapi/proxy/ppapi_messages.h ('k') | ppapi/proxy/ppb_tcp_socket_private_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 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 PPAPI_PROXY_PPB_TCP_SOCKET_PRIVATE_PROXY_H_ 5 #ifndef PPAPI_PROXY_PPB_TCP_SOCKET_PRIVATE_PROXY_H_
6 #define PPAPI_PROXY_PPB_TCP_SOCKET_PRIVATE_PROXY_H_ 6 #define PPAPI_PROXY_PPB_TCP_SOCKET_PRIVATE_PROXY_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "ppapi/c/pp_instance.h" 11 #include "ppapi/c/pp_instance.h"
12 #include "ppapi/c/pp_resource.h" 12 #include "ppapi/c/pp_resource.h"
13 #include "ppapi/c/private/ppb_tcp_socket_private.h" 13 #include "ppapi/c/private/ppb_tcp_socket_private.h"
14 #include "ppapi/proxy/interface_proxy.h" 14 #include "ppapi/proxy/interface_proxy.h"
15 #include "ppapi/proxy/ppapi_proxy_export.h" 15 #include "ppapi/proxy/ppapi_proxy_export.h"
16 16
17 namespace ppapi { 17 namespace ppapi {
18
19 class PPB_X509Certificate_Fields;
20
18 namespace proxy { 21 namespace proxy {
19 22
20 class PPB_TCPSocket_Private_Proxy : public InterfaceProxy { 23 class PPB_TCPSocket_Private_Proxy : public InterfaceProxy {
21 public: 24 public:
22 PPB_TCPSocket_Private_Proxy(Dispatcher* dispatcher); 25 PPB_TCPSocket_Private_Proxy(Dispatcher* dispatcher);
23 virtual ~PPB_TCPSocket_Private_Proxy(); 26 virtual ~PPB_TCPSocket_Private_Proxy();
24 27
25 static PP_Resource CreateProxyResource(PP_Instance instance); 28 static PP_Resource CreateProxyResource(PP_Instance instance);
26 static PP_Resource CreateProxyResourceForConnectedSocket( 29 static PP_Resource CreateProxyResourceForConnectedSocket(
27 PP_Instance instance, 30 PP_Instance instance,
28 uint32 socket_id, 31 uint32 socket_id,
29 const PP_NetAddress_Private& local_addr, 32 const PP_NetAddress_Private& local_addr,
30 const PP_NetAddress_Private& remote_addr); 33 const PP_NetAddress_Private& remote_addr);
31 34
32 // InterfaceProxy implementation. 35 // InterfaceProxy implementation.
33 virtual bool OnMessageReceived(const IPC::Message& msg); 36 virtual bool OnMessageReceived(const IPC::Message& msg);
34 37
35 static const ApiID kApiID = API_ID_PPB_TCPSOCKET_PRIVATE; 38 static const ApiID kApiID = API_ID_PPB_TCPSOCKET_PRIVATE;
36 39
37 private: 40 private:
38 // Browser->plugin message handlers. 41 // Browser->plugin message handlers.
39 void OnMsgConnectACK(uint32 plugin_dispatcher_id, 42 void OnMsgConnectACK(uint32 plugin_dispatcher_id,
40 uint32 socket_id, 43 uint32 socket_id,
41 bool succeeded, 44 bool succeeded,
42 const PP_NetAddress_Private& local_addr, 45 const PP_NetAddress_Private& local_addr,
43 const PP_NetAddress_Private& remote_addr); 46 const PP_NetAddress_Private& remote_addr);
44 void OnMsgSSLHandshakeACK(uint32 plugin_dispatcher_id, 47 void OnMsgSSLHandshakeACK(
45 uint32 socket_id, 48 uint32 plugin_dispatcher_id,
46 bool succeeded); 49 uint32 socket_id,
50 bool succeeded,
51 const PPB_X509Certificate_Fields& certificate_fields);
47 void OnMsgReadACK(uint32 plugin_dispatcher_id, 52 void OnMsgReadACK(uint32 plugin_dispatcher_id,
48 uint32 socket_id, 53 uint32 socket_id,
49 bool succeeded, 54 bool succeeded,
50 const std::string& data); 55 const std::string& data);
51 void OnMsgWriteACK(uint32 plugin_dispatcher_id, 56 void OnMsgWriteACK(uint32 plugin_dispatcher_id,
52 uint32 socket_id, 57 uint32 socket_id,
53 bool succeeded, 58 bool succeeded,
54 int32_t bytes_written); 59 int32_t bytes_written);
55 60
56 DISALLOW_COPY_AND_ASSIGN(PPB_TCPSocket_Private_Proxy); 61 DISALLOW_COPY_AND_ASSIGN(PPB_TCPSocket_Private_Proxy);
57 }; 62 };
58 63
59 } // namespace proxy 64 } // namespace proxy
60 } // namespace ppapi 65 } // namespace ppapi
61 66
62 #endif // PPAPI_PROXY_PPB_TCP_SOCKET_PRIVATE_PROXY_H_ 67 #endif // PPAPI_PROXY_PPB_TCP_SOCKET_PRIVATE_PROXY_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/ppapi_messages.h ('k') | ppapi/proxy/ppb_tcp_socket_private_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698