summaryrefslogtreecommitdiffstats
path: root/remoting/protocol/connection_to_client.h
diff options
context:
space:
mode:
authorlambroslambrou@google.com <lambroslambrou@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-25 23:23:02 +0000
committerlambroslambrou@google.com <lambroslambrou@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-25 23:23:02 +0000
commit91e4b7f6537fc17f484fa55b6282997fe5179c6c (patch)
tree56bda039c35b0d8410ea8e651c2a4cb0b5372801 /remoting/protocol/connection_to_client.h
parent675e779b5fd78f0c818d0ac5dce073ab6ec8f40a (diff)
downloadchromium_src-91e4b7f6537fc17f484fa55b6282997fe5179c6c.zip
chromium_src-91e4b7f6537fc17f484fa55b6282997fe5179c6c.tar.gz
chromium_src-91e4b7f6537fc17f484fa55b6282997fe5179c6c.tar.bz2
More plumbing for logging connection IP addresses
Followup CL to http://codereview.chromium.org/9271026/ - this passes the RouteChange() notification from ConnectionToClient through the various layers to the ChromotingHost. BUG=109682 TEST=Compiles, unit-tests pass. Review URL: https://chromiumcodereview.appspot.com/9288010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119137 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/protocol/connection_to_client.h')
-rw-r--r--remoting/protocol/connection_to_client.h21
1 files changed, 17 insertions, 4 deletions
diff --git a/remoting/protocol/connection_to_client.h b/remoting/protocol/connection_to_client.h
index 1b3490f..9a92724 100644
--- a/remoting/protocol/connection_to_client.h
+++ b/remoting/protocol/connection_to_client.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -6,6 +6,7 @@
#define REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_
#include <deque>
+#include <string>
#include <vector>
#include "base/memory/scoped_ptr.h"
@@ -14,6 +15,10 @@
#include "remoting/protocol/session.h"
#include "remoting/protocol/video_writer.h"
+namespace net {
+class IPEndPoint;
+} // namespace net
+
namespace remoting {
namespace protocol {
@@ -45,6 +50,12 @@ class ConnectionToClient : public base::NonThreadSafe {
// Called when sequence number is updated.
virtual void OnSequenceNumberUpdated(ConnectionToClient* connection,
int64 sequence_number) = 0;
+
+ // Called on notification of a route change event, which happens when a
+ // channel is connected.
+ virtual void OnClientIpAddress(ConnectionToClient* connection,
+ const std::string& channel_name,
+ const net::IPEndPoint& end_point) = 0;
};
// Constructs a ConnectionToClient object for the |session|. Takes
@@ -52,9 +63,8 @@ class ConnectionToClient : public base::NonThreadSafe {
explicit ConnectionToClient(Session* session);
virtual ~ConnectionToClient();
- // Set |event_handler| for connection events. |event_handler| is
- // guaranteed to be used only on the network thread. Must be called
- // once when this object is created.
+ // Set |event_handler| for connection events. Must be called once when this
+ // object is created.
void SetEventHandler(EventHandler* event_handler);
// Returns the connection in use.
@@ -81,6 +91,9 @@ class ConnectionToClient : public base::NonThreadSafe {
// Callback for protocol Session.
void OnSessionStateChange(Session::State state);
+ void OnSessionRouteChange(const std::string& channel_name,
+ const net::IPEndPoint& end_point);
+
// Callback for channel initialization.
void OnChannelInitialized(bool successful);