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

Side by Side Diff: ppapi/cpp/private/udp_socket_private.h

Issue 9381010: Convert resources to take an instance key instead of an Instance*. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: USELESS PATCH TITLE Created 8 years, 9 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/cpp/private/tcp_socket_private.cc ('k') | ppapi/cpp/private/udp_socket_private.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_CPP_PRIVATE_UDP_SOCKET_PRIVATE_H_ 5 #ifndef PPAPI_CPP_PRIVATE_UDP_SOCKET_PRIVATE_H_
6 #define PPAPI_CPP_PRIVATE_UDP_SOCKET_PRIVATE_H_ 6 #define PPAPI_CPP_PRIVATE_UDP_SOCKET_PRIVATE_H_
7 7
8 #include "ppapi/c/pp_stdint.h" 8 #include "ppapi/c/pp_stdint.h"
9 #include "ppapi/c/private/ppb_udp_socket_private.h" 9 #include "ppapi/c/private/ppb_udp_socket_private.h"
10 #include "ppapi/cpp/resource.h" 10 #include "ppapi/cpp/resource.h"
11 11
12 namespace pp { 12 namespace pp {
13 13
14 class CompletionCallback; 14 class CompletionCallback;
15 class Instance; 15 class InstanceHandle;
16 16
17 class UDPSocketPrivate : public Resource { 17 class UDPSocketPrivate : public Resource {
18 public: 18 public:
19 explicit UDPSocketPrivate(Instance* instance); 19 explicit UDPSocketPrivate(const InstanceHandle& instance);
20 20
21 int32_t Bind(const PP_NetAddress_Private* addr, 21 int32_t Bind(const PP_NetAddress_Private* addr,
22 const CompletionCallback& callback); 22 const CompletionCallback& callback);
23 bool GetBoundAddress(PP_NetAddress_Private* addr); 23 bool GetBoundAddress(PP_NetAddress_Private* addr);
24 int32_t RecvFrom(char* buffer, 24 int32_t RecvFrom(char* buffer,
25 int32_t num_bytes, 25 int32_t num_bytes,
26 const CompletionCallback& callback); 26 const CompletionCallback& callback);
27 bool GetRecvFromAddress(PP_NetAddress_Private* addr); 27 bool GetRecvFromAddress(PP_NetAddress_Private* addr);
28 int32_t SendTo(const char* buffer, 28 int32_t SendTo(const char* buffer,
29 int32_t num_bytes, 29 int32_t num_bytes,
30 const PP_NetAddress_Private* addr, 30 const PP_NetAddress_Private* addr,
31 const CompletionCallback& callback); 31 const CompletionCallback& callback);
32 void Close(); 32 void Close();
33 }; 33 };
34 34
35 } // namespace pp 35 } // namespace pp
36 36
37 #endif // PPAPI_CPP_PRIVATE_UDP_SOCKET_PRIVATE_H_ 37 #endif // PPAPI_CPP_PRIVATE_UDP_SOCKET_PRIVATE_H_
38 38
OLDNEW
« no previous file with comments | « ppapi/cpp/private/tcp_socket_private.cc ('k') | ppapi/cpp/private/udp_socket_private.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698