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

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
« no previous file with comments | « remoting/protocol/webrtc_connection_to_client.cc ('k') | remoting/protocol/webrtc_connection_to_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3e3e4bc237880114867005312ffe48eb4123f054..79b97e0602d7fbd12837cebd4987b5d5ff0f3d47 100644
--- a/remoting/protocol/webrtc_connection_to_host.h
+++ b/remoting/protocol/webrtc_connection_to_host.h
@@ -15,6 +15,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 {
@@ -25,6 +26,7 @@ class SessionConfig;
class WebrtcConnectionToHost : public ConnectionToHost,
public Session::EventHandler,
+ public WebrtcTransport::EventHandler,
public ChannelDispatcherBase::EventHandler {
public:
WebrtcConnectionToHost();
@@ -36,6 +38,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;
@@ -46,8 +49,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;
@@ -67,6 +72,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_;
« no previous file with comments | « remoting/protocol/webrtc_connection_to_client.cc ('k') | remoting/protocol/webrtc_connection_to_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698