| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_UDP_SOCKET_RESOURCE_BASE_H_ | 5 #ifndef PPAPI_PROXY_UDP_SOCKET_RESOURCE_BASE_H_ |
| 6 #define PPAPI_PROXY_UDP_SOCKET_RESOURCE_BASE_H_ | 6 #define PPAPI_PROXY_UDP_SOCKET_RESOURCE_BASE_H_ |
| 7 | 7 |
| 8 #include <queue> | 8 #include <queue> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 int32_t RecvFromImpl(char* buffer, | 66 int32_t RecvFromImpl(char* buffer, |
| 67 int32_t num_bytes, | 67 int32_t num_bytes, |
| 68 PP_Resource* addr, | 68 PP_Resource* addr, |
| 69 scoped_refptr<TrackedCallback> callback); | 69 scoped_refptr<TrackedCallback> callback); |
| 70 PP_Bool GetRecvFromAddressImpl(PP_NetAddress_Private* addr); | 70 PP_Bool GetRecvFromAddressImpl(PP_NetAddress_Private* addr); |
| 71 int32_t SendToImpl(const char* buffer, | 71 int32_t SendToImpl(const char* buffer, |
| 72 int32_t num_bytes, | 72 int32_t num_bytes, |
| 73 const PP_NetAddress_Private* addr, | 73 const PP_NetAddress_Private* addr, |
| 74 scoped_refptr<TrackedCallback> callback); | 74 scoped_refptr<TrackedCallback> callback); |
| 75 void CloseImpl(); | 75 void CloseImpl(); |
| 76 int32_t JoinGroupImpl(const PP_NetAddress_Private *group, |
| 77 scoped_refptr<TrackedCallback> callback); |
| 78 int32_t LeaveGroupImpl(const PP_NetAddress_Private *group, |
| 79 scoped_refptr<TrackedCallback> callback); |
| 76 | 80 |
| 77 private: | 81 private: |
| 78 struct RecvBuffer { | 82 struct RecvBuffer { |
| 79 int32_t result; | 83 int32_t result; |
| 80 std::string data; | 84 std::string data; |
| 81 PP_NetAddress_Private addr; | 85 PP_NetAddress_Private addr; |
| 82 }; | 86 }; |
| 83 | 87 |
| 84 // Resource overrides. | 88 // Resource overrides. |
| 85 virtual void OnReplyReceived(const ResourceMessageReplyParams& params, | 89 virtual void OnReplyReceived(const ResourceMessageReplyParams& params, |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 | 136 |
| 133 std::queue<scoped_refptr<TrackedCallback>> sendto_callbacks_; | 137 std::queue<scoped_refptr<TrackedCallback>> sendto_callbacks_; |
| 134 | 138 |
| 135 DISALLOW_COPY_AND_ASSIGN(UDPSocketResourceBase); | 139 DISALLOW_COPY_AND_ASSIGN(UDPSocketResourceBase); |
| 136 }; | 140 }; |
| 137 | 141 |
| 138 } // namespace proxy | 142 } // namespace proxy |
| 139 } // namespace ppapi | 143 } // namespace ppapi |
| 140 | 144 |
| 141 #endif // PPAPI_PROXY_UDP_SOCKET_RESOURCE_BASE_H_ | 145 #endif // PPAPI_PROXY_UDP_SOCKET_RESOURCE_BASE_H_ |
| OLD | NEW |