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

Unified Diff: remoting/protocol/ice_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/ice_connection_to_client.cc ('k') | remoting/protocol/ice_connection_to_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/ice_connection_to_host.h
diff --git a/remoting/protocol/ice_connection_to_host.h b/remoting/protocol/ice_connection_to_host.h
index 2ebc584158bd2a49f016407518b427b32c224ad1..6cc8e15e1f0790c201e282875304e6d545779b81 100644
--- a/remoting/protocol/ice_connection_to_host.h
+++ b/remoting/protocol/ice_connection_to_host.h
@@ -18,6 +18,7 @@
#include "remoting/protocol/clipboard_filter.h"
#include "remoting/protocol/connection_to_host.h"
#include "remoting/protocol/errors.h"
+#include "remoting/protocol/ice_transport.h"
#include "remoting/protocol/input_filter.h"
#include "remoting/protocol/message_reader.h"
#include "remoting/protocol/monitored_video_stub.h"
@@ -34,6 +35,7 @@ class ClientVideoDispatcher;
class IceConnectionToHost : public ConnectionToHost,
public Session::EventHandler,
+ public IceTransport::EventHandler,
public ChannelDispatcherBase::EventHandler,
public base::NonThreadSafe {
public:
@@ -46,6 +48,7 @@ class IceConnectionToHost : 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;
@@ -56,8 +59,11 @@ class IceConnectionToHost : public ConnectionToHost,
private:
// Session::EventHandler interface.
void OnSessionStateChange(Session::State state) override;
- void OnSessionRouteChange(const std::string& channel_name,
- const TransportRoute& route) override;
+
+ // IceTransport::EventHandler interface.
+ void OnIceTransportRouteChange(const std::string& channel_name,
+ const TransportRoute& route) override;
+ void OnIceTransportError(ErrorCode error) override;
// ChannelDispatcherBase::EventHandler interface.
void OnChannelInitialized(ChannelDispatcherBase* channel_dispatcher) override;
@@ -71,7 +77,7 @@ class IceConnectionToHost : public ConnectionToHost,
void CloseOnError(ErrorCode error);
- // Stops writing in the channels.
+ // Closes the P2P connection.
void CloseChannels();
void SetState(State state, ErrorCode error);
@@ -84,8 +90,9 @@ class IceConnectionToHost : public ConnectionToHost,
AudioStub* audio_stub_ = nullptr;
scoped_ptr<Session> session_;
- scoped_ptr<MonitoredVideoStub> monitored_video_stub_;
+ scoped_ptr<IceTransport> transport_;
+ scoped_ptr<MonitoredVideoStub> monitored_video_stub_;
scoped_ptr<ClientVideoDispatcher> video_dispatcher_;
scoped_ptr<AudioReader> audio_reader_;
scoped_ptr<ClientControlDispatcher> control_dispatcher_;
« no previous file with comments | « remoting/protocol/ice_connection_to_client.cc ('k') | remoting/protocol/ice_connection_to_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698