| 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_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" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "net/base/completion_callback.h" | 13 #include "net/base/completion_callback.h" |
| 14 #include "ppapi/shared_impl/tracked_callback.h" |
| 14 #include "ppapi/shared_impl/resource.h" | 15 #include "ppapi/shared_impl/resource.h" |
| 15 #include "ppapi/thunk/ppb_transport_api.h" | 16 #include "ppapi/thunk/ppb_transport_api.h" |
| 16 #include "webkit/glue/p2p_transport.h" | 17 #include "webkit/glue/p2p_transport.h" |
| 17 #include "webkit/plugins/ppapi/callbacks.h" | |
| 18 | 18 |
| 19 namespace webkit { | 19 namespace webkit { |
| 20 namespace ppapi { | 20 namespace ppapi { |
| 21 | 21 |
| 22 class PPB_Transport_Impl : public ::ppapi::Resource, | 22 class PPB_Transport_Impl : public ::ppapi::Resource, |
| 23 public ::ppapi::thunk::PPB_Transport_API, | 23 public ::ppapi::thunk::PPB_Transport_API, |
| 24 public webkit_glue::P2PTransport::EventHandler { | 24 public webkit_glue::P2PTransport::EventHandler { |
| 25 public: | 25 public: |
| 26 virtual ~PPB_Transport_Impl(); | 26 virtual ~PPB_Transport_Impl(); |
| 27 | 27 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 void OnWritten(int result); | 60 void OnWritten(int result); |
| 61 | 61 |
| 62 std::string name_; | 62 std::string name_; |
| 63 PP_TransportType type_; | 63 PP_TransportType type_; |
| 64 webkit_glue::P2PTransport::Config config_; | 64 webkit_glue::P2PTransport::Config config_; |
| 65 bool started_; | 65 bool started_; |
| 66 scoped_ptr<webkit_glue::P2PTransport> p2p_transport_; | 66 scoped_ptr<webkit_glue::P2PTransport> p2p_transport_; |
| 67 bool writable_; | 67 bool writable_; |
| 68 std::list<std::string> local_candidates_; | 68 std::list<std::string> local_candidates_; |
| 69 | 69 |
| 70 scoped_refptr<TrackedCompletionCallback> connect_callback_; | 70 scoped_refptr< ::ppapi::TrackedCallback> connect_callback_; |
| 71 scoped_refptr<TrackedCompletionCallback> next_address_callback_; | 71 scoped_refptr< ::ppapi::TrackedCallback> next_address_callback_; |
| 72 | 72 |
| 73 scoped_refptr<TrackedCompletionCallback> recv_callback_; | 73 scoped_refptr< ::ppapi::TrackedCallback> recv_callback_; |
| 74 scoped_refptr<TrackedCompletionCallback> send_callback_; | 74 scoped_refptr< ::ppapi::TrackedCallback> send_callback_; |
| 75 | 75 |
| 76 DISALLOW_COPY_AND_ASSIGN(PPB_Transport_Impl); | 76 DISALLOW_COPY_AND_ASSIGN(PPB_Transport_Impl); |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 } // namespace ppapi | 79 } // namespace ppapi |
| 80 } // namespace webkit | 80 } // namespace webkit |
| 81 | 81 |
| 82 #endif // WEBKIT_PLUGINS_PPAPI_PPB_TRANSPORT_IMPL_H_ | 82 #endif // WEBKIT_PLUGINS_PPAPI_PPB_TRANSPORT_IMPL_H_ |
| OLD | NEW |