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

Unified Diff: remoting/protocol/transport.h

Issue 9366001: Implement support for route change notifications in the Transport interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 months 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/transport.h
diff --git a/remoting/protocol/transport.h b/remoting/protocol/transport.h
index f6f4381a6feb11f8e48f856f8e4d2c8d7da1a7fb..15b785438ee9be58e65560836dd2ed448739e4e4 100644
--- a/remoting/protocol/transport.h
+++ b/remoting/protocol/transport.h
@@ -28,6 +28,7 @@
#include "base/callback_forward.h"
#include "base/memory/scoped_ptr.h"
#include "base/threading/non_thread_safe.h"
+#include "net/base/ip_endpoint.h"
namespace cricket {
class Candidate;
@@ -44,6 +45,18 @@ namespace protocol {
class ChannelAuthenticator;
struct TransportConfig;
+struct TransportRoute {
+ enum RouteType {
+ DIRECT,
+ STUN,
+ RELAY,
+ };
+
+ RouteType type;
+ net::IPEndPoint remote_address;
+ net::IPEndPoint local_address;
+};
+
class Transport : public base::NonThreadSafe {
public:
class EventHandler {
@@ -57,6 +70,11 @@ class Transport : public base::NonThreadSafe {
virtual void OnTransportCandidate(Transport* transport,
const cricket::Candidate& candidate) = 0;
+ // Called when transport route changes. Can be called even before
+ // the transport is connected.
+ virtual void OnTransportRouteChange(Transport* transport,
+ const TransportRoute& route) = 0;
+
// Called when the transport is about to be deleted.
virtual void OnTransportDeleted(Transport* transport) = 0;
};
« remoting/protocol/libjingle_transport_factory.cc ('K') | « remoting/protocol/pepper_session.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698