summaryrefslogtreecommitdiffstats
path: root/ppapi/proxy/ppb_udp_socket_private_proxy.h
diff options
context:
space:
mode:
authordpolukhin@chromium.org <dpolukhin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-16 07:06:24 +0000
committerdpolukhin@chromium.org <dpolukhin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-16 07:06:24 +0000
commitfb575bc7182f8ecde6ede7a4978b64a72434fd02 (patch)
tree61d8a21e588aca63d0713d35148aff12e9a2fe89 /ppapi/proxy/ppb_udp_socket_private_proxy.h
parentfe0eca5c30281ae58cef01593f0e4aab7fd560f2 (diff)
downloadchromium_src-fb575bc7182f8ecde6ede7a4978b64a72434fd02.zip
chromium_src-fb575bc7182f8ecde6ede7a4978b64a72434fd02.tar.gz
chromium_src-fb575bc7182f8ecde6ede7a4978b64a72434fd02.tar.bz2
Remove 'Flash' from TCP/UDP Pepper interfaces names. This CL preserves old idl and C/C++ headers for backward compatibility. Also TCP interface should be returned by old name.
BUG=none TEST=build Review URL: http://codereview.chromium.org/8506016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110265 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy/ppb_udp_socket_private_proxy.h')
-rw-r--r--ppapi/proxy/ppb_udp_socket_private_proxy.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/ppapi/proxy/ppb_udp_socket_private_proxy.h b/ppapi/proxy/ppb_udp_socket_private_proxy.h
new file mode 100644
index 0000000..337cf6b
--- /dev/null
+++ b/ppapi/proxy/ppb_udp_socket_private_proxy.h
@@ -0,0 +1,60 @@
+// 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_PROXY_PPB_UDP_SOCKET_PRIVATE_PROXY_H_
+#define PPAPI_PROXY_PPB_UDP_SOCKET_PRIVATE_PROXY_H_
+
+#include <string>
+
+#include "base/basictypes.h"
+#include "ppapi/c/pp_instance.h"
+#include "ppapi/c/pp_resource.h"
+#include "ppapi/c/private/ppb_udp_socket_private.h"
+#include "ppapi/proxy/interface_proxy.h"
+
+namespace ppapi {
+namespace proxy {
+
+// The maximum number of bytes that each PpapiHostMsg_PPBUDPSocket_RecvFrom
+// message is allowed to request.
+extern const int32_t kUDPSocketMaxReadSize;
+// The maximum number of bytes that each PpapiHostMsg_PPBUDPSocket_SendTo
+// message is allowed to carry.
+extern const int32_t kUDPSocketMaxWriteSize;
+
+class PPB_UDPSocket_Private_Proxy : public InterfaceProxy {
+ public:
+ PPB_UDPSocket_Private_Proxy(Dispatcher* dispatcher);
+ virtual ~PPB_UDPSocket_Private_Proxy();
+
+ static PP_Resource CreateProxyResource(PP_Instance instance);
+
+ // InterfaceProxy implementation.
+ virtual bool OnMessageReceived(const IPC::Message& msg);
+
+ static const ApiID kApiID = API_ID_PPB_UDPSOCKET_PRIVATE;
+
+ private:
+ // Browser->plugin message handlers.
+ void OnMsgBindACK(uint32 plugin_dispatcher_id,
+ uint32 socket_id,
+ bool succeeded);
+ void OnMsgRecvFromACK(uint32 plugin_dispatcher_id,
+ uint32 socket_id,
+ bool succeeded,
+ const std::string& data,
+ const PP_NetAddress_Private& addr);
+ void OnMsgSendToACK(uint32 plugin_dispatcher_id,
+ uint32 socket_id,
+ bool succeeded,
+ int32_t bytes_written);
+
+ DISALLOW_COPY_AND_ASSIGN(PPB_UDPSocket_Private_Proxy);
+};
+
+} // namespace proxy
+} // namespace ppapi
+
+#endif // PPAPI_PROXY_PPB_UDP_SOCKET_PRIVATE_PROXY_H_
+