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

Unified Diff: remoting/protocol/session.h

Issue 9271026: Add JingleSession::OnRouteChange(), and pass IP endpoint information to a (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and fix nits. Created 8 years, 11 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/protocol_mock_objects.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/session.h
diff --git a/remoting/protocol/session.h b/remoting/protocol/session.h
index 7003a1384b93e8aed5470c52393b5603d0b2d418..bef4a84a9a986cc9de77310f3d8eaa83fb5b73c1 100644
--- a/remoting/protocol/session.h
+++ b/remoting/protocol/session.h
@@ -13,6 +13,7 @@
#include "remoting/protocol/session_config.h"
namespace net {
+class IPEndPoint;
class Socket;
class StreamSocket;
} // namespace net
@@ -68,6 +69,12 @@ class Session : public base::NonThreadSafe {
// handler unless |state| is CLOSED or FAILED.
typedef base::Callback<void(State state)> StateChangeCallback;
+ // TODO(lambroslambrou): Merge this together with StateChangeCallback into a
+ // single interface.
+ typedef base::Callback<void(
+ const std::string& channel_name,
+ const net::IPEndPoint& end_point)> RouteChangeCallback;
+
// TODO(sergeyu): Specify connection error code when channel
// connection fails.
typedef base::Callback<void(net::StreamSocket*)> StreamChannelCallback;
@@ -77,9 +84,13 @@ class Session : public base::NonThreadSafe {
virtual ~Session() { }
// Set callback that is called when state of the connection is changed.
- // Must be called on the jingle thread only.
virtual void SetStateChangeCallback(const StateChangeCallback& callback) = 0;
+ // Set callback that is called when the route for a channel is changed.
+ // The callback must be registered immediately after
+ // JingleSessionManager::Connect() or from OnIncomingSession() callback.
+ virtual void SetRouteChangeCallback(const RouteChangeCallback& callback) = 0;
+
// Returns error code for a failed session.
virtual Error error() = 0;
« no previous file with comments | « remoting/protocol/protocol_mock_objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698