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

Unified Diff: remoting/protocol/connection_to_client.h

Issue 9288010: More plumbing for logging connection IP addresses (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix license headers 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/host/host_mock_objects.cc ('k') | remoting/protocol/connection_to_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/connection_to_client.h
diff --git a/remoting/protocol/connection_to_client.h b/remoting/protocol/connection_to_client.h
index 1b3490f716fd17640a91f2b8af25ea2540145643..9a927246dfca3373c634b5d8684bca76091242b3 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);
« no previous file with comments | « remoting/host/host_mock_objects.cc ('k') | remoting/protocol/connection_to_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698