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

Unified Diff: remoting/protocol/webrtc_transport.cc

Issue 1662673002: Add MessageChanneFactory interface and use it in ChannelDispatcherBase. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@framing
Patch Set: Created 4 years, 11 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_transport.h ('k') | remoting/protocol/webrtc_transport_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/webrtc_transport.cc
diff --git a/remoting/protocol/webrtc_transport.cc b/remoting/protocol/webrtc_transport.cc
index 76336cc7e4c5f2bd170d3b3792d4237b9485a38d..cba8ef175509b480542d364640f72263ac66cfc9 100644
--- a/remoting/protocol/webrtc_transport.cc
+++ b/remoting/protocol/webrtc_transport.cc
@@ -13,6 +13,7 @@
#include "base/task_runner_util.h"
#include "base/thread_task_runner_handle.h"
#include "jingle/glue/thread_wrapper.h"
+#include "remoting/protocol/stream_message_pipe_adapter.h"
#include "remoting/protocol/transport_context.h"
#include "third_party/libjingle/source/talk/app/webrtc/test/fakeconstraints.h"
#include "third_party/webrtc/libjingle/xmllite/xmlelement.h"
@@ -101,6 +102,11 @@ class SetSessionDescriptionObserver
DISALLOW_COPY_AND_ASSIGN(SetSessionDescriptionObserver);
};
+void OnChannelErrorHandler(int error) {
+ // WebrtcDataStreamAdapter never returns an error.
+ NOTREACHED();
+}
+
} // namespace
WebrtcTransport::WebrtcTransport(
@@ -155,7 +161,12 @@ void WebrtcTransport::Start(
nullptr, this);
outgoing_data_stream_adapter_.Initialize(peer_connection_);
+ outgoing_channel_factory_.reset(new StreamMessageChannelFactoryAdapter(
+ &outgoing_data_stream_adapter_, base::Bind(&OnChannelErrorHandler)));
+
incoming_data_stream_adapter_.Initialize(peer_connection_);
+ incoming_channel_factory_.reset(new StreamMessageChannelFactoryAdapter(
+ &incoming_data_stream_adapter_, base::Bind(&OnChannelErrorHandler)));
event_handler_->OnWebrtcTransportConnecting();
« no previous file with comments | « remoting/protocol/webrtc_transport.h ('k') | remoting/protocol/webrtc_transport_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698