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

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
« no previous file with comments | « remoting/protocol/pepper_session.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/transport.h
diff --git a/remoting/protocol/transport.h b/remoting/protocol/transport.h
index 3b4bc2a984daca15b30c21404a4611fc21a395aa..e892404e5d0f71f5522a8d3a6b16429bcebf1226 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;
};
« no previous file with comments | « remoting/protocol/pepper_session.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698