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

Unified Diff: remoting/protocol/webrtc_connection_to_host.h

Issue 1545743002: Move ownership of Transport out of Session. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_not_pass_client
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_connection_to_host.h
diff --git a/remoting/protocol/webrtc_connection_to_host.h b/remoting/protocol/webrtc_connection_to_host.h
index 046aeae5760282876b219b2f7720bc245f86cae7..4a223b77ed0efbbbc03485f4cc163d255270b09c 100644
--- a/remoting/protocol/webrtc_connection_to_host.h
+++ b/remoting/protocol/webrtc_connection_to_host.h
@@ -14,6 +14,7 @@
#include "remoting/protocol/errors.h"
#include "remoting/protocol/input_filter.h"
#include "remoting/protocol/session.h"
+#include "remoting/protocol/webrtc_transport.h"
namespace remoting {
namespace protocol {
@@ -24,6 +25,7 @@ class SessionConfig;
class WebrtcConnectionToHost : public ConnectionToHost,
public Session::EventHandler,
+ public WebrtcTransport::EventHandler,
public ChannelDispatcherBase::EventHandler {
public:
WebrtcConnectionToHost();
@@ -35,6 +37,7 @@ class WebrtcConnectionToHost : public ConnectionToHost,
void set_video_stub(VideoStub* video_stub) override;
void set_audio_stub(AudioStub* audio_stub) override;
void Connect(scoped_ptr<Session> session,
+ scoped_refptr<TransportContext> transport_context,
HostEventCallback* event_callback) override;
const SessionConfig& config() override;
ClipboardStub* clipboard_forwarder() override;
@@ -45,8 +48,10 @@ class WebrtcConnectionToHost : public ConnectionToHost,
private:
// Session::EventHandler interface.
void OnSessionStateChange(Session::State state) override;
- void OnSessionRouteChange(const std::string& channel_name,
- const TransportRoute& route) override;
+
+ // WebrtcTransport::EventHandler interface.
+ void OnWebrtcTransportConnected() override;
+ void OnWebrtcTransportError(ErrorCode error) override;
// ChannelDispatcherBase::EventHandler interface.
void OnChannelInitialized(ChannelDispatcherBase* channel_dispatcher) override;
@@ -66,6 +71,7 @@ class WebrtcConnectionToHost : public ConnectionToHost,
ClipboardStub* clipboard_stub_ = nullptr;
scoped_ptr<Session> session_;
+ scoped_ptr<WebrtcTransport> transport_;
scoped_ptr<ClientControlDispatcher> control_dispatcher_;
scoped_ptr<ClientEventDispatcher> event_dispatcher_;

Powered by Google App Engine
This is Rietveld 408576698