Index: webrtc/p2p/base/faketransportcontroller.h |
diff --git a/webrtc/p2p/base/faketransportcontroller.h b/webrtc/p2p/base/faketransportcontroller.h |
index 82f4ebdc7b1d24c31169afb1f5e4364508726f60..65c59be98d0ee93777f6454e8742ded125caf5b1 100644 |
--- a/webrtc/p2p/base/faketransportcontroller.h |
+++ b/webrtc/p2p/base/faketransportcontroller.h |
@@ -45,9 +45,11 @@ |
class FakeTransportChannel : public TransportChannelImpl, |
public rtc::MessageHandler { |
public: |
- explicit FakeTransportChannel(const std::string& name, |
+ explicit FakeTransportChannel(Transport* transport, |
+ const std::string& name, |
int component) |
: TransportChannelImpl(name, component), |
+ transport_(transport), |
dtls_fingerprint_("", nullptr, 0) {} |
~FakeTransportChannel() { Reset(); } |
@@ -64,6 +66,8 @@ |
// If async, will send packets by "Post"-ing to message queue instead of |
// synchronously "Send"-ing. |
void SetAsync(bool async) { async_ = async; } |
+ |
+ Transport* GetTransport() override { return transport_; } |
TransportChannelState GetState() const override { |
if (connection_count_ == 0) { |
@@ -309,6 +313,7 @@ |
private: |
enum State { STATE_INIT, STATE_CONNECTING, STATE_CONNECTED }; |
+ Transport* transport_; |
FakeTransportChannel* dest_ = nullptr; |
State state_ = STATE_INIT; |
bool async_ = false; |
@@ -410,7 +415,7 @@ |
return nullptr; |
} |
FakeTransportChannel* channel = |
- new FakeTransportChannel(name(), component); |
+ new FakeTransportChannel(this, name(), component); |
channel->set_ssl_max_protocol_version(ssl_max_version_); |
channel->SetAsync(async_); |
SetChannelDestination(component, channel); |