OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 #include <map> | 23 #include <map> |
24 #include <memory> | 24 #include <memory> |
25 #include <set> | 25 #include <set> |
26 #include <string> | 26 #include <string> |
27 #include <vector> | 27 #include <vector> |
28 | 28 |
29 #include "webrtc/base/constructormagic.h" | 29 #include "webrtc/base/constructormagic.h" |
30 #include "webrtc/p2p/base/candidate.h" | 30 #include "webrtc/p2p/base/candidate.h" |
31 #include "webrtc/p2p/base/candidatepairinterface.h" | 31 #include "webrtc/p2p/base/candidatepairinterface.h" |
| 32 #include "webrtc/p2p/base/p2ptransport.h" |
32 #include "webrtc/p2p/base/portallocator.h" | 33 #include "webrtc/p2p/base/portallocator.h" |
33 #include "webrtc/p2p/base/portinterface.h" | 34 #include "webrtc/p2p/base/portinterface.h" |
34 #include "webrtc/p2p/base/transportchannelimpl.h" | 35 #include "webrtc/p2p/base/transportchannelimpl.h" |
35 #include "webrtc/base/asyncpacketsocket.h" | 36 #include "webrtc/base/asyncpacketsocket.h" |
36 #include "webrtc/base/sigslot.h" | 37 #include "webrtc/base/sigslot.h" |
37 | 38 |
38 namespace cricket { | 39 namespace cricket { |
39 | 40 |
40 // Enum for UMA metrics, used to record whether the channel is | 41 // Enum for UMA metrics, used to record whether the channel is |
41 // connected/connecting/disconnected when ICE restart happens. | 42 // connected/connecting/disconnected when ICE restart happens. |
(...skipping 17 matching lines...) Expand all Loading... |
59 }; | 60 }; |
60 | 61 |
61 // P2PTransportChannel manages the candidates and connection process to keep | 62 // P2PTransportChannel manages the candidates and connection process to keep |
62 // two P2P clients connected to each other. | 63 // two P2P clients connected to each other. |
63 class P2PTransportChannel : public TransportChannelImpl, | 64 class P2PTransportChannel : public TransportChannelImpl, |
64 public rtc::MessageHandler { | 65 public rtc::MessageHandler { |
65 public: | 66 public: |
66 P2PTransportChannel(const std::string& transport_name, | 67 P2PTransportChannel(const std::string& transport_name, |
67 int component, | 68 int component, |
68 PortAllocator* allocator); | 69 PortAllocator* allocator); |
| 70 // TODO(mikescarlett): Deprecated. Remove when Chromium's |
| 71 // IceTransportChannel does not depend on this. |
| 72 P2PTransportChannel(const std::string& transport_name, |
| 73 int component, |
| 74 P2PTransport* transport, |
| 75 PortAllocator* allocator); |
69 virtual ~P2PTransportChannel(); | 76 virtual ~P2PTransportChannel(); |
70 | 77 |
71 // From TransportChannelImpl: | 78 // From TransportChannelImpl: |
72 TransportChannelState GetState() const override; | 79 TransportChannelState GetState() const override; |
73 void SetIceRole(IceRole role) override; | 80 void SetIceRole(IceRole role) override; |
74 IceRole GetIceRole() const override { return ice_role_; } | 81 IceRole GetIceRole() const override { return ice_role_; } |
75 void SetIceTiebreaker(uint64_t tiebreaker) override; | 82 void SetIceTiebreaker(uint64_t tiebreaker) override; |
76 void SetIceParameters(const IceParameters& ice_params) override; | 83 void SetIceParameters(const IceParameters& ice_params) override; |
77 void SetRemoteIceParameters(const IceParameters& ice_params) override; | 84 void SetRemoteIceParameters(const IceParameters& ice_params) override; |
78 void SetRemoteIceMode(IceMode mode) override; | 85 void SetRemoteIceMode(IceMode mode) override; |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 uint32_t nomination_ = 0; | 403 uint32_t nomination_ = 0; |
397 | 404 |
398 webrtc::MetricsObserverInterface* metrics_observer_ = nullptr; | 405 webrtc::MetricsObserverInterface* metrics_observer_ = nullptr; |
399 | 406 |
400 RTC_DISALLOW_COPY_AND_ASSIGN(P2PTransportChannel); | 407 RTC_DISALLOW_COPY_AND_ASSIGN(P2PTransportChannel); |
401 }; | 408 }; |
402 | 409 |
403 } // namespace cricket | 410 } // namespace cricket |
404 | 411 |
405 #endif // WEBRTC_P2P_BASE_P2PTRANSPORTCHANNEL_H_ | 412 #endif // WEBRTC_P2P_BASE_P2PTRANSPORTCHANNEL_H_ |
OLD | NEW |