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

Unified Diff: remoting/protocol/webrtc_data_stream_adapter.h

Issue 2146213002: Add support for dynamic channels in WebrtcTransport. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 5 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 | « remoting/protocol/webrtc_connection_to_host.cc ('k') | remoting/protocol/webrtc_data_stream_adapter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 90ad8f5627d485f0428057d1c9d23e8995889a0c..48c4c0f45603155b604d8811625acad1d7700525 100644
--- a/remoting/protocol/webrtc_data_stream_adapter.h
+++ b/remoting/protocol/webrtc_data_stream_adapter.h
@@ -9,7 +9,6 @@
#include "base/callback.h"
#include "base/macros.h"
-#include "base/memory/weak_ptr.h"
#include "remoting/protocol/errors.h"
#include "remoting/protocol/message_channel_factory.h"
#include "third_party/webrtc/api/peerconnectioninterface.h"
@@ -28,8 +27,7 @@ class WebrtcDataStreamAdapter : public MessageChannelFactory {
public:
typedef base::Callback<void(ErrorCode)> ErrorCallback;
- explicit WebrtcDataStreamAdapter(bool outgoing,
- const ErrorCallback& error_callback);
+ explicit WebrtcDataStreamAdapter(const ErrorCallback& error_callback);
~WebrtcDataStreamAdapter() override;
// Initializes the adapter for |peer_connection|. If |outgoing| is set to true
@@ -39,7 +37,9 @@ class WebrtcDataStreamAdapter : public MessageChannelFactory {
rtc::scoped_refptr<webrtc::PeerConnectionInterface> peer_connection);
// Called by WebrtcTransport.
- void OnIncomingDataChannel(webrtc::DataChannelInterface* data_channel);
+ void WrapIncomingDataChannel(
+ rtc::scoped_refptr<webrtc::DataChannelInterface> data_channel,
+ const ChannelCreatedCallback& callback);
// MessageChannelFactory interface.
void CreateChannel(const std::string& name,
@@ -52,18 +52,19 @@ class WebrtcDataStreamAdapter : public MessageChannelFactory {
struct PendingChannel;
+ void AddPendingChannel(
+ rtc::scoped_refptr<webrtc::DataChannelInterface> data_channel,
+ const ChannelCreatedCallback& callback);
+
void OnChannelConnected(Channel* channel);
void OnChannelError();
- const bool outgoing_;
ErrorCallback error_callback_;
rtc::scoped_refptr<webrtc::PeerConnectionInterface> peer_connection_;
std::map<std::string, PendingChannel> pending_channels_;
- base::WeakPtrFactory<WebrtcDataStreamAdapter> weak_factory_;
-
DISALLOW_COPY_AND_ASSIGN(WebrtcDataStreamAdapter);
};
« no previous file with comments | « remoting/protocol/webrtc_connection_to_host.cc ('k') | remoting/protocol/webrtc_data_stream_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698