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

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

Issue 19005006: Switched proxy for TCPServerSocketPrivate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync, fix. Created 7 years, 4 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_server_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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef PPAPI_PROXY_PPB_TCP_SERVER_SOCKET_PRIVATE_PROXY_H_
6 #define PPAPI_PROXY_PPB_TCP_SERVER_SOCKET_PRIVATE_PROXY_H_
7
8 #include <map>
9 #include <string>
10
11 #include "base/basictypes.h"
12 #include "ppapi/c/pp_instance.h"
13 #include "ppapi/c/pp_resource.h"
14 #include "ppapi/c/private/ppb_net_address_private.h"
15 #include "ppapi/proxy/interface_proxy.h"
16
17 namespace ppapi {
18
19 class PPB_TCPServerSocket_Shared;
20
21 namespace proxy {
22
23 class PPB_TCPServerSocket_Private_Proxy : public InterfaceProxy {
24 public:
25 explicit PPB_TCPServerSocket_Private_Proxy(Dispatcher* dispatcher);
26 virtual ~PPB_TCPServerSocket_Private_Proxy();
27
28 static PP_Resource CreateProxyResource(PP_Instance instance);
29
30 void ObjectDestroyed(uint32 socket_id);
31
32 // InterfaceProxy implementation.
33 virtual bool OnMessageReceived(const IPC::Message& msg);
34
35 static const ApiID kApiID = API_ID_PPB_TCPSERVERSOCKET_PRIVATE;
36
37 private:
38 typedef std::map<uint32, PPB_TCPServerSocket_Shared*>
39 IDToServerSocketMap;
40
41 void OnMsgListenACK(uint32 plugin_dispatcher_id,
42 PP_Resource socket_resource,
43 uint32 socket_id,
44 const PP_NetAddress_Private& local_addr,
45 int32_t status);
46 void OnMsgAcceptACK(uint32 plugin_dispatcher_id,
47 uint32 server_socket_id,
48 uint32 accepted_socket_id,
49 const PP_NetAddress_Private& local_addr,
50 const PP_NetAddress_Private& remote_addr);
51
52 IDToServerSocketMap id_to_server_socket_;
53
54 DISALLOW_COPY_AND_ASSIGN(PPB_TCPServerSocket_Private_Proxy);
55 };
56
57 } // namespace proxy
58 } // namespace ppapi
59
60 #endif // PPAPI_PROXY_PPB_TCP_SERVER_SOCKET_PRIVATE_PROXY_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/ppapi_messages.h ('k') | ppapi/proxy/ppb_tcp_server_socket_private_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698