| 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" |
| 11 #include "ppapi/c/private/ppb_flash_net_connector.h" | 11 #include "ppapi/c/private/ppb_flash_net_connector.h" |
| 12 #include "ppapi/shared_impl/resource.h" | 12 #include "ppapi/shared_impl/resource.h" |
| 13 #include "ppapi/shared_impl/tracked_callback.h" |
| 13 #include "ppapi/thunk/ppb_flash_net_connector_api.h" | 14 #include "ppapi/thunk/ppb_flash_net_connector_api.h" |
| 14 #include "webkit/plugins/ppapi/callbacks.h" | |
| 15 #include "webkit/plugins/webkit_plugins_export.h" | 15 #include "webkit/plugins/webkit_plugins_export.h" |
| 16 | 16 |
| 17 namespace webkit { | 17 namespace webkit { |
| 18 namespace ppapi { | 18 namespace ppapi { |
| 19 | 19 |
| 20 class PPB_Flash_NetConnector_Impl | 20 class PPB_Flash_NetConnector_Impl |
| 21 : public ::ppapi::Resource, | 21 : public ::ppapi::Resource, |
| 22 public ::ppapi::thunk::PPB_Flash_NetConnector_API { | 22 public ::ppapi::thunk::PPB_Flash_NetConnector_API { |
| 23 public: | 23 public: |
| 24 explicit PPB_Flash_NetConnector_Impl(PP_Instance instance); | 24 explicit PPB_Flash_NetConnector_Impl(PP_Instance instance); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 42 PP_CompletionCallback callback) OVERRIDE; | 42 PP_CompletionCallback callback) OVERRIDE; |
| 43 | 43 |
| 44 // Called to complete |ConnectTcp()| and |ConnectTcpAddress()|. | 44 // Called to complete |ConnectTcp()| and |ConnectTcpAddress()|. |
| 45 WEBKIT_PLUGINS_EXPORT void CompleteConnectTcp( | 45 WEBKIT_PLUGINS_EXPORT void CompleteConnectTcp( |
| 46 PP_FileHandle socket, | 46 PP_FileHandle socket, |
| 47 const PP_NetAddress_Private& local_addr, | 47 const PP_NetAddress_Private& local_addr, |
| 48 const PP_NetAddress_Private& remote_addr); | 48 const PP_NetAddress_Private& remote_addr); |
| 49 | 49 |
| 50 private: | 50 private: |
| 51 // Any pending callback (for |ConnectTcp()| or |ConnectTcpAddress()|). | 51 // Any pending callback (for |ConnectTcp()| or |ConnectTcpAddress()|). |
| 52 scoped_refptr<TrackedCompletionCallback> callback_; | 52 scoped_refptr< ::ppapi::TrackedCallback> callback_; |
| 53 | 53 |
| 54 // Output buffers to be filled in when the callback is completed successfully | 54 // Output buffers to be filled in when the callback is completed successfully |
| 55 // (|{local,remote}_addr_out| are optional and may be null). | 55 // (|{local,remote}_addr_out| are optional and may be null). |
| 56 PP_FileHandle* socket_out_; | 56 PP_FileHandle* socket_out_; |
| 57 PP_NetAddress_Private* local_addr_out_; | 57 PP_NetAddress_Private* local_addr_out_; |
| 58 PP_NetAddress_Private* remote_addr_out_; | 58 PP_NetAddress_Private* remote_addr_out_; |
| 59 | 59 |
| 60 DISALLOW_COPY_AND_ASSIGN(PPB_Flash_NetConnector_Impl); | 60 DISALLOW_COPY_AND_ASSIGN(PPB_Flash_NetConnector_Impl); |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 } // namespace ppapi | 63 } // namespace ppapi |
| 64 } // namespace webkit | 64 } // namespace webkit |
| 65 | 65 |
| 66 #endif // WEBKIT_PLUGINS_PPAPI_PPB_FLASH_NET_CONNECTOR_IMPL_H_ | 66 #endif // WEBKIT_PLUGINS_PPAPI_PPB_FLASH_NET_CONNECTOR_IMPL_H_ |
| OLD | NEW |