| OLD | NEW |
| 1 // Copyright (c) 2011 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 WEBKIT_PLUGINS_PPAPI_PPB_TRANSPORT_IMPL_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_TRANSPORT_IMPL_H_ |
| 6 #define WEBKIT_PLUGINS_PPAPI_PPB_TRANSPORT_IMPL_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_PPB_TRANSPORT_IMPL_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 29 const char* name, | 29 const char* name, |
| 30 PP_TransportType type); | 30 PP_TransportType type); |
| 31 | 31 |
| 32 // Resource override. | 32 // Resource override. |
| 33 virtual ::ppapi::thunk::PPB_Transport_API* AsPPB_Transport_API() OVERRIDE; | 33 virtual ::ppapi::thunk::PPB_Transport_API* AsPPB_Transport_API() OVERRIDE; |
| 34 | 34 |
| 35 // PPB_Transport_API implementation. | 35 // PPB_Transport_API implementation. |
| 36 virtual PP_Bool IsWritable() OVERRIDE; | 36 virtual PP_Bool IsWritable() OVERRIDE; |
| 37 virtual int32_t SetProperty(PP_TransportProperty property, | 37 virtual int32_t SetProperty(PP_TransportProperty property, |
| 38 PP_Var value) OVERRIDE; | 38 PP_Var value) OVERRIDE; |
| 39 virtual int32_t Connect(PP_CompletionCallback callback) OVERRIDE; | 39 virtual int32_t Connect( |
| 40 virtual int32_t GetNextAddress(PP_Var* address, | 40 scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE; |
| 41 PP_CompletionCallback callback) OVERRIDE; | 41 virtual int32_t GetNextAddress( |
| 42 PP_Var* address, |
| 43 scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE; |
| 42 virtual int32_t ReceiveRemoteAddress(PP_Var address) OVERRIDE; | 44 virtual int32_t ReceiveRemoteAddress(PP_Var address) OVERRIDE; |
| 43 virtual int32_t Recv(void* data, uint32_t len, | 45 virtual int32_t Recv(void* data, |
| 44 PP_CompletionCallback callback) OVERRIDE; | 46 uint32_t len, |
| 45 virtual int32_t Send(const void* data, uint32_t len, | 47 scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE; |
| 46 PP_CompletionCallback callback) OVERRIDE; | 48 virtual int32_t Send( |
| 49 const void* data, |
| 50 uint32_t len, |
| 51 scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE; |
| 47 virtual int32_t Close() OVERRIDE; | 52 virtual int32_t Close() OVERRIDE; |
| 48 | 53 |
| 49 // webkit_glue::P2PTransport::EventHandler implementation. | 54 // webkit_glue::P2PTransport::EventHandler implementation. |
| 50 virtual void OnCandidateReady(const std::string& address) OVERRIDE; | 55 virtual void OnCandidateReady(const std::string& address) OVERRIDE; |
| 51 virtual void OnStateChange(webkit_glue::P2PTransport::State state) OVERRIDE; | 56 virtual void OnStateChange(webkit_glue::P2PTransport::State state) OVERRIDE; |
| 52 virtual void OnError(int error) OVERRIDE; | 57 virtual void OnError(int error) OVERRIDE; |
| 53 | 58 |
| 54 private: | 59 private: |
| 55 explicit PPB_Transport_Impl(PP_Instance instance); | 60 explicit PPB_Transport_Impl(PP_Instance instance); |
| 56 | 61 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 73 scoped_refptr< ::ppapi::TrackedCallback> recv_callback_; | 78 scoped_refptr< ::ppapi::TrackedCallback> recv_callback_; |
| 74 scoped_refptr< ::ppapi::TrackedCallback> send_callback_; | 79 scoped_refptr< ::ppapi::TrackedCallback> send_callback_; |
| 75 | 80 |
| 76 DISALLOW_COPY_AND_ASSIGN(PPB_Transport_Impl); | 81 DISALLOW_COPY_AND_ASSIGN(PPB_Transport_Impl); |
| 77 }; | 82 }; |
| 78 | 83 |
| 79 } // namespace ppapi | 84 } // namespace ppapi |
| 80 } // namespace webkit | 85 } // namespace webkit |
| 81 | 86 |
| 82 #endif // WEBKIT_PLUGINS_PPAPI_PPB_TRANSPORT_IMPL_H_ | 87 #endif // WEBKIT_PLUGINS_PPAPI_PPB_TRANSPORT_IMPL_H_ |
| OLD | NEW |