Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(244)

Unified Diff: webrtc/p2p/base/dtlstransportchannel.h

Issue 1358413003: Revert of TransportController refactoring. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/p2p/base/dtlstransport.h ('k') | webrtc/p2p/base/dtlstransportchannel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/dtlstransportchannel.h
diff --git a/webrtc/p2p/base/dtlstransportchannel.h b/webrtc/p2p/base/dtlstransportchannel.h
index ea6a579dfbc186e47c9e21859315e1c2553bf0e0..ddedcbcaa8bd81784f979b68d41b25a42bbbbff8 100644
--- a/webrtc/p2p/base/dtlstransportchannel.h
+++ b/webrtc/p2p/base/dtlstransportchannel.h
@@ -27,7 +27,7 @@
// the bottom and a StreamInterface on the top.
class StreamInterfaceChannel : public rtc::StreamInterface {
public:
- explicit StreamInterfaceChannel(TransportChannel* channel);
+ StreamInterfaceChannel(TransportChannel* channel);
// Push in a packet; this gets pulled out from Read().
bool OnPacketReceived(const char* data, size_t size);
@@ -35,14 +35,10 @@
// Implementations of StreamInterface
rtc::StreamState GetState() const override { return state_; }
void Close() override { state_ = rtc::SS_CLOSED; }
- rtc::StreamResult Read(void* buffer,
- size_t buffer_len,
- size_t* read,
- int* error) override;
- rtc::StreamResult Write(const void* data,
- size_t data_len,
- size_t* written,
- int* error) override;
+ rtc::StreamResult Read(void* buffer, size_t buffer_len,
+ size_t* read, int* error) override;
+ rtc::StreamResult Write(const void* data, size_t data_len,
+ size_t* written, int* error) override;
private:
TransportChannel* channel_; // owned by DtlsTransportChannelWrapper
@@ -97,8 +93,12 @@
TransportChannelImpl* channel);
~DtlsTransportChannelWrapper() override;
- void SetIceRole(IceRole role) override { channel_->SetIceRole(role); }
- IceRole GetIceRole() const override { return channel_->GetIceRole(); }
+ void SetIceRole(IceRole role) override {
+ channel_->SetIceRole(role);
+ }
+ IceRole GetIceRole() const override {
+ return channel_->GetIceRole();
+ }
bool SetLocalCertificate(
const rtc::scoped_refptr<rtc::RTCCertificate>& certificate) override;
rtc::scoped_refptr<rtc::RTCCertificate> GetLocalCertificate() const override;
@@ -109,8 +109,7 @@
bool IsDtlsActive() const override { return dtls_state_ != STATE_NONE; }
// Called to send a packet (via DTLS, if turned on).
- int SendPacket(const char* data,
- size_t size,
+ int SendPacket(const char* data, size_t size,
const rtc::PacketOptions& options,
int flags) override;
@@ -121,11 +120,15 @@
bool GetOption(rtc::Socket::Option opt, int* value) override {
return channel_->GetOption(opt, value);
}
- int GetError() override { return channel_->GetError(); }
+ int GetError() override {
+ return channel_->GetError();
+ }
bool GetStats(ConnectionInfos* infos) override {
return channel_->GetStats(infos);
}
- const std::string SessionId() const override { return channel_->SessionId(); }
+ const std::string SessionId() const override {
+ return channel_->SessionId();
+ }
virtual bool SetSslMaxProtocolVersion(rtc::SSLProtocolVersion version);
@@ -165,7 +168,9 @@
}
// TransportChannelImpl calls.
- Transport* GetTransport() override { return transport_; }
+ Transport* GetTransport() override {
+ return transport_;
+ }
TransportChannelState GetState() const override {
return channel_->GetState();
@@ -187,14 +192,11 @@
void Connect() override;
- void MaybeStartGathering() override { channel_->MaybeStartGathering(); }
-
- IceGatheringState gathering_state() const override {
- return channel_->gathering_state();
- }
-
- void AddRemoteCandidate(const Candidate& candidate) override {
- channel_->AddRemoteCandidate(candidate);
+ void OnSignalingReady() override {
+ channel_->OnSignalingReady();
+ }
+ void OnCandidate(const Candidate& candidate) override {
+ channel_->OnCandidate(candidate);
}
void SetReceivingTimeout(int receiving_timeout_ms) override {
@@ -215,8 +217,9 @@
bool SetupDtls();
bool MaybeStartDtls();
bool HandleDtlsPacket(const char* data, size_t size);
- void OnGatheringState(TransportChannelImpl* channel);
- void OnCandidateGathered(TransportChannelImpl* channel, const Candidate& c);
+ void OnRequestSignaling(TransportChannelImpl* channel);
+ void OnCandidateReady(TransportChannelImpl* channel, const Candidate& c);
+ void OnCandidatesAllocationDone(TransportChannelImpl* channel);
void OnRoleConflict(TransportChannelImpl* channel);
void OnRouteChange(TransportChannel* channel, const Candidate& candidate);
void OnConnectionRemoved(TransportChannelImpl* channel);
« no previous file with comments | « webrtc/p2p/base/dtlstransport.h ('k') | webrtc/p2p/base/dtlstransportchannel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698