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

Unified Diff: remoting/protocol/webrtc_data_stream_adapter.h

Issue 1510333002: Cleanups in WebrtcTransport. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
Index: remoting/protocol/webrtc_data_stream_adapter.h
diff --git a/remoting/protocol/webrtc_data_stream_adapter.h b/remoting/protocol/webrtc_data_stream_adapter.h
index 1200db6cc92dd00b8e772a41ee03a37aca67553f..fc7e42faffbc3f66d37541f6aa46798d51fdd5f1 100644
--- a/remoting/protocol/webrtc_data_stream_adapter.h
+++ b/remoting/protocol/webrtc_data_stream_adapter.h
@@ -20,15 +20,21 @@ class PeerConnectionInterface;
namespace remoting {
namespace protocol {
+// WebrtcDataStreamAdapter is a StreamChannelFactory that creates channels that
+// send and receive data over PeerConnection data channels.
class WebrtcDataStreamAdapter : public StreamChannelFactory {
public:
WebrtcDataStreamAdapter();
~WebrtcDataStreamAdapter() override;
+ // Initializes the adapter for |peer_connection|. If |outgoing| is set to true
+ // all channels will be created as outgoing. Otherwise CreateChannel() will
+ // wait for the other end to create connection.
void Initialize(
rtc::scoped_refptr<webrtc::PeerConnectionInterface> peer_connection,
- bool is_server);
+ bool outgoing);
+ // Called by WebrtcTransport.
void OnIncomingDataChannel(webrtc::DataChannelInterface* data_channel);
// StreamChannelFactory interface.
@@ -44,7 +50,7 @@ class WebrtcDataStreamAdapter : public StreamChannelFactory {
bool connected);
rtc::scoped_refptr<webrtc::PeerConnectionInterface> peer_connection_;
- bool is_server_ = false;
+ bool outgoing_ = false;
std::map<std::string, Channel*> pending_channels_;
« no previous file with comments | « no previous file | remoting/protocol/webrtc_data_stream_adapter.cc » ('j') | remoting/protocol/webrtc_transport.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698