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

Unified Diff: remoting/protocol/ice_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/fake_session.cc ('k') | remoting/protocol/ice_connection_to_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/ice_connection_to_client.h
diff --git a/remoting/protocol/ice_connection_to_client.h b/remoting/protocol/ice_connection_to_client.h
index cf0349618fb1a8eb0d5fa7f24406fc2f216a3e39..1ea86774e032d01619f4909e6a9ebb94a7e5b759 100644
--- a/remoting/protocol/ice_connection_to_client.h
+++ b/remoting/protocol/ice_connection_to_client.h
@@ -14,6 +14,7 @@
#include "base/threading/thread_checker.h"
#include "remoting/protocol/channel_dispatcher_base.h"
#include "remoting/protocol/connection_to_client.h"
+#include "remoting/protocol/ice_transport.h"
#include "remoting/protocol/session.h"
namespace remoting {
@@ -31,10 +32,12 @@ class VideoFramePump;
// stubs.
class IceConnectionToClient : public ConnectionToClient,
public Session::EventHandler,
+ public IceTransport::EventHandler,
public ChannelDispatcherBase::EventHandler {
public:
IceConnectionToClient(
scoped_ptr<Session> session,
+ scoped_refptr<TransportContext> transport_context,
scoped_refptr<base::SingleThreadTaskRunner> video_encode_task_runner);
~IceConnectionToClient() override;
@@ -54,8 +57,11 @@ class IceConnectionToClient : public ConnectionToClient,
// 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;
@@ -65,9 +71,6 @@ class IceConnectionToClient : public ConnectionToClient,
private:
void NotifyIfChannelsReady();
- void Close(ErrorCode error);
-
- // Stops writing in the channels.
void CloseChannels();
base::ThreadChecker thread_checker_;
@@ -79,6 +82,8 @@ class IceConnectionToClient : public ConnectionToClient,
scoped_refptr<base::SingleThreadTaskRunner> video_encode_task_runner_;
+ IceTransport transport_;
+
scoped_ptr<HostControlDispatcher> control_dispatcher_;
scoped_ptr<HostEventDispatcher> event_dispatcher_;
scoped_ptr<HostVideoDispatcher> video_dispatcher_;
« no previous file with comments | « remoting/protocol/fake_session.cc ('k') | remoting/protocol/ice_connection_to_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698