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

Unified Diff: remoting/protocol/webrtc_connection_to_client.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/transport_context.cc ('k') | remoting/protocol/webrtc_connection_to_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/webrtc_connection_to_client.h
diff --git a/remoting/protocol/webrtc_connection_to_client.h b/remoting/protocol/webrtc_connection_to_client.h
index 2902db93d033ac4b411ca5d8718ccf6a8fcd942e..39e2433dd1185e4ae920c9034b935fc9cce6cab6 100644
--- a/remoting/protocol/webrtc_connection_to_client.h
+++ b/remoting/protocol/webrtc_connection_to_client.h
@@ -15,6 +15,7 @@
#include "remoting/protocol/channel_dispatcher_base.h"
#include "remoting/protocol/connection_to_client.h"
#include "remoting/protocol/session.h"
+#include "remoting/protocol/webrtc_transport.h"
namespace remoting {
namespace protocol {
@@ -24,9 +25,12 @@ class HostEventDispatcher;
class WebrtcConnectionToClient : public ConnectionToClient,
public Session::EventHandler,
+ public WebrtcTransport::EventHandler,
public ChannelDispatcherBase::EventHandler {
public:
- explicit WebrtcConnectionToClient(scoped_ptr<Session> session);
+ WebrtcConnectionToClient(
+ scoped_ptr<Session> session,
+ scoped_refptr<protocol::TransportContext> transport_context);
~WebrtcConnectionToClient() override;
// ConnectionToClient interface.
@@ -45,8 +49,10 @@ class WebrtcConnectionToClient : public ConnectionToClient,
// 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;
@@ -59,6 +65,8 @@ class WebrtcConnectionToClient : public ConnectionToClient,
// Event handler for handling events sent from this object.
ConnectionToClient::EventHandler* event_handler_ = nullptr;
+ WebrtcTransport transport_;
+
scoped_ptr<Session> session_;
scoped_ptr<HostControlDispatcher> control_dispatcher_;
« no previous file with comments | « remoting/protocol/transport_context.cc ('k') | remoting/protocol/webrtc_connection_to_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698