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

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

Issue 7745005: Initial work for UDP Pepper API (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: A few more changes after self-review Created 9 years, 3 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
OLDNEW
(Empty)
1 // Copyright (c) 2011 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_FLASH_UDP_SOCKET_PROXY_H_
6 #define PPAPI_PROXY_PPB_FLASH_UDP_SOCKET_PROXY_H_
7
8 #include <string>
9
10 #include "base/basictypes.h"
11 #include "ppapi/c/pp_instance.h"
12 #include "ppapi/c/pp_resource.h"
13 #include "ppapi/c/private/ppb_flash_udp_socket.h"
14 #include "ppapi/proxy/interface_proxy.h"
15
16 namespace ppapi {
17 namespace proxy {
18
19 // The maximum number of bytes that each PpapiHostMsg_PPBFlashUDPSocket_Read
yzshen1 2011/09/17 02:10:07 Update the message name, please. Same for line 22.
mtilburg 2011/09/21 01:46:43 Done.
20 // message is allowed to request.
21 extern const int32_t kFlashUDPSocketMaxReadSize;
22 // The maximum number of bytes that each PpapiHostMsg_PPBFlashUDPSocket_Write
23 // message is allowed to carry.
24 extern const int32_t kFlashUDPSocketMaxWriteSize;
25
26 class PPB_Flash_UDPSocket_Proxy : public InterfaceProxy {
27 public:
28 PPB_Flash_UDPSocket_Proxy(Dispatcher* dispatcher,
29 const void* target_interface);
brettw 2011/09/16 17:50:17 Unfortunately, I changed this stuff around and you
mtilburg 2011/09/21 01:46:43 Done.
30 virtual ~PPB_Flash_UDPSocket_Proxy();
31
32 static const Info* GetInfo();
33
34 static PP_Resource CreateProxyResource(PP_Instance instance, int32_t family);
35
36 // InterfaceProxy implementation.
37 virtual bool OnMessageReceived(const IPC::Message& msg);
38
39 private:
40 // Browser->plugin message handlers.
41 void OnMsgBindACK(uint32 plugin_dispatcher_id,
42 uint32 socket_id,
43 bool succeeded,
44 int32_t result);
45 void OnMsgRecvFromACK(uint32 plugin_dispatcher_id,
46 uint32 socket_id,
47 bool succeeded,
48 const std::string& data,
49 const PP_Flash_NetAddress& addr);
50 void OnMsgSendToACK(uint32 plugin_dispatcher_id,
51 uint32 socket_id,
52 bool succeeded,
53 int32_t bytes_written);
54
55 DISALLOW_COPY_AND_ASSIGN(PPB_Flash_UDPSocket_Proxy);
56 };
57
58 } // namespace proxy
59 } // namespace ppapi
60
61 #endif // PPAPI_PROXY_PPB_FLASH_UDP_SOCKET_PROXY_H_
62
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698