| OLD | NEW |
| 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_SHARED_IMPL_PRIVATE_PPB_TCP_SERVER_SOCKET_SHARED_H_ | 5 #ifndef PPAPI_SHARED_IMPL_PRIVATE_PPB_TCP_SERVER_SOCKET_SHARED_H_ |
| 6 #define PPAPI_SHARED_IMPL_PRIVATE_PPB_TCP_SERVER_SOCKET_SHARED_H_ | 6 #define PPAPI_SHARED_IMPL_PRIVATE_PPB_TCP_SERVER_SOCKET_SHARED_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "ppapi/c/pp_completion_callback.h" | 9 #include "ppapi/c/pp_completion_callback.h" |
| 10 #include "ppapi/shared_impl/resource.h" | 10 #include "ppapi/shared_impl/resource.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 virtual ~PPB_TCPServerSocket_Shared(); | 29 virtual ~PPB_TCPServerSocket_Shared(); |
| 30 | 30 |
| 31 // Resource overrides. | 31 // Resource overrides. |
| 32 virtual PPB_TCPServerSocket_Private_API* | 32 virtual PPB_TCPServerSocket_Private_API* |
| 33 AsPPB_TCPServerSocket_Private_API() OVERRIDE; | 33 AsPPB_TCPServerSocket_Private_API() OVERRIDE; |
| 34 | 34 |
| 35 // PPB_TCPServerSocket_Private_API implementation. | 35 // PPB_TCPServerSocket_Private_API implementation. |
| 36 virtual int32_t Listen(const PP_NetAddress_Private* addr, | 36 virtual int32_t Listen(const PP_NetAddress_Private* addr, |
| 37 int32_t backlog, | 37 int32_t backlog, |
| 38 PP_CompletionCallback callback) OVERRIDE; | 38 scoped_refptr<TrackedCallback> callback) OVERRIDE; |
| 39 virtual int32_t Accept(PP_Resource* tcp_socket, | 39 virtual int32_t Accept(PP_Resource* tcp_socket, |
| 40 PP_CompletionCallback callback) OVERRIDE; | 40 scoped_refptr<TrackedCallback> callback) OVERRIDE; |
| 41 virtual void StopListening() OVERRIDE; | 41 virtual void StopListening() OVERRIDE; |
| 42 | 42 |
| 43 void OnListenCompleted(uint32 socket_id, int32_t status); | 43 void OnListenCompleted(uint32 socket_id, int32_t status); |
| 44 virtual void OnAcceptCompleted(bool succeeded, | 44 virtual void OnAcceptCompleted(bool succeeded, |
| 45 uint32 accepted_socket_id, | 45 uint32 accepted_socket_id, |
| 46 const PP_NetAddress_Private& local_addr, | 46 const PP_NetAddress_Private& local_addr, |
| 47 const PP_NetAddress_Private& remote_addr) = 0; | 47 const PP_NetAddress_Private& remote_addr) = 0; |
| 48 | 48 |
| 49 // Send functions that need to be implemented differently for the | 49 // Send functions that need to be implemented differently for the |
| 50 // proxied and non-proxied derived classes. | 50 // proxied and non-proxied derived classes. |
| (...skipping 20 matching lines...) Expand all Loading... |
| 71 scoped_refptr<TrackedCallback> accept_callback_; | 71 scoped_refptr<TrackedCallback> accept_callback_; |
| 72 | 72 |
| 73 PP_Resource* tcp_socket_buffer_; | 73 PP_Resource* tcp_socket_buffer_; |
| 74 | 74 |
| 75 DISALLOW_COPY_AND_ASSIGN(PPB_TCPServerSocket_Shared); | 75 DISALLOW_COPY_AND_ASSIGN(PPB_TCPServerSocket_Shared); |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 } // namespace ppapi | 78 } // namespace ppapi |
| 79 | 79 |
| 80 #endif // PPAPI_SHARED_IMPL_PRIVATE_PPB_TCP_SERVER_SOCKET_SHARED_H_ | 80 #endif // PPAPI_SHARED_IMPL_PRIVATE_PPB_TCP_SERVER_SOCKET_SHARED_H_ |
| OLD | NEW |