| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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 WEBKIT_PLUGINS_PPAPI_PPB_FLASH_NET_CONNECTOR_IMPL_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_FLASH_NET_CONNECTOR_IMPL_H_ |
| 6 #define WEBKIT_PLUGINS_PPAPI_PPB_FLASH_NET_CONNECTOR_IMPL_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_PPB_FLASH_NET_CONNECTOR_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 virtual ~PPB_Flash_NetConnector_Impl(); | 24 virtual ~PPB_Flash_NetConnector_Impl(); |
| 25 | 25 |
| 26 // Resource override. | 26 // Resource override. |
| 27 virtual ::ppapi::thunk::PPB_Flash_NetConnector_API* | 27 virtual ::ppapi::thunk::PPB_Flash_NetConnector_API* |
| 28 AsPPB_Flash_NetConnector_API() OVERRIDE; | 28 AsPPB_Flash_NetConnector_API() OVERRIDE; |
| 29 | 29 |
| 30 // PPB_Flash_NetConnector implementation. | 30 // PPB_Flash_NetConnector implementation. |
| 31 virtual int32_t ConnectTcp(const char* host, | 31 virtual int32_t ConnectTcp(const char* host, |
| 32 uint16_t port, | 32 uint16_t port, |
| 33 PP_FileHandle* socket_out, | 33 PP_FileHandle* socket_out, |
| 34 PP_Flash_NetAddress* local_addr_out, | 34 PP_NetAddress_Private* local_addr_out, |
| 35 PP_Flash_NetAddress* remote_addr_out, | 35 PP_NetAddress_Private* remote_addr_out, |
| 36 PP_CompletionCallback callback) OVERRIDE; | 36 PP_CompletionCallback callback) OVERRIDE; |
| 37 virtual int32_t ConnectTcpAddress(const PP_Flash_NetAddress* addr, | 37 virtual int32_t ConnectTcpAddress(const PP_NetAddress_Private* addr, |
| 38 PP_FileHandle* socket_out, | 38 PP_FileHandle* socket_out, |
| 39 PP_Flash_NetAddress* local_addr_out, | 39 PP_NetAddress_Private* local_addr_out, |
| 40 PP_Flash_NetAddress* remote_addr_out, | 40 PP_NetAddress_Private* remote_addr_out, |
| 41 PP_CompletionCallback callback) OVERRIDE; | 41 PP_CompletionCallback callback) OVERRIDE; |
| 42 | 42 |
| 43 // Called to complete |ConnectTcp()| and |ConnectTcpAddress()|. | 43 // Called to complete |ConnectTcp()| and |ConnectTcpAddress()|. |
| 44 void CompleteConnectTcp(PP_FileHandle socket, | 44 void CompleteConnectTcp(PP_FileHandle socket, |
| 45 const PP_Flash_NetAddress& local_addr, | 45 const PP_NetAddress_Private& local_addr, |
| 46 const PP_Flash_NetAddress& remote_addr); | 46 const PP_NetAddress_Private& remote_addr); |
| 47 | 47 |
| 48 private: | 48 private: |
| 49 // Any pending callback (for |ConnectTcp()| or |ConnectTcpAddress()|). | 49 // Any pending callback (for |ConnectTcp()| or |ConnectTcpAddress()|). |
| 50 scoped_refptr<TrackedCompletionCallback> callback_; | 50 scoped_refptr<TrackedCompletionCallback> callback_; |
| 51 | 51 |
| 52 // Output buffers to be filled in when the callback is completed successfully | 52 // Output buffers to be filled in when the callback is completed successfully |
| 53 // (|{local,remote}_addr_out| are optional and may be null). | 53 // (|{local,remote}_addr_out| are optional and may be null). |
| 54 PP_FileHandle* socket_out_; | 54 PP_FileHandle* socket_out_; |
| 55 PP_Flash_NetAddress* local_addr_out_; | 55 PP_NetAddress_Private* local_addr_out_; |
| 56 PP_Flash_NetAddress* remote_addr_out_; | 56 PP_NetAddress_Private* remote_addr_out_; |
| 57 | 57 |
| 58 DISALLOW_COPY_AND_ASSIGN(PPB_Flash_NetConnector_Impl); | 58 DISALLOW_COPY_AND_ASSIGN(PPB_Flash_NetConnector_Impl); |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 } // namespace ppapi | 61 } // namespace ppapi |
| 62 } // namespace webkit | 62 } // namespace webkit |
| 63 | 63 |
| 64 #endif // WEBKIT_PLUGINS_PPAPI_PPB_FLASH_NET_CONNECTOR_IMPL_H_ | 64 #endif // WEBKIT_PLUGINS_PPAPI_PPB_FLASH_NET_CONNECTOR_IMPL_H_ |
| OLD | NEW |