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

Side by Side Diff: remoting/host/client_session.h

Issue 9727005: Log connection type to syslogs and to the server. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/host/chromoting_host.cc ('k') | remoting/host/client_session.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef REMOTING_HOST_CLIENT_SESSION_H_ 5 #ifndef REMOTING_HOST_CLIENT_SESSION_H_
6 #define REMOTING_HOST_CLIENT_SESSION_H_ 6 #define REMOTING_HOST_CLIENT_SESSION_H_
7 7
8 #include <list> 8 #include <list>
9 #include <set> 9 #include <set>
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // Called to notify of each message's sequence number. The 46 // Called to notify of each message's sequence number. The
47 // callback must not tear down this object. 47 // callback must not tear down this object.
48 virtual void OnSessionSequenceNumber(ClientSession* client, 48 virtual void OnSessionSequenceNumber(ClientSession* client,
49 int64 sequence_number) = 0; 49 int64 sequence_number) = 0;
50 50
51 // Called on notification of a route change event, when a channel is 51 // Called on notification of a route change event, when a channel is
52 // connected. 52 // connected.
53 virtual void OnSessionRouteChange( 53 virtual void OnSessionRouteChange(
54 ClientSession* client, 54 ClientSession* client,
55 const std::string& channel_name, 55 const std::string& channel_name,
56 const net::IPEndPoint& remote_end_point, 56 const protocol::TransportRoute& route) = 0;
57 const net::IPEndPoint& local_end_point) = 0;
58 }; 57 };
59 58
60 // Takes ownership of |connection|. Does not take ownership of 59 // Takes ownership of |connection|. Does not take ownership of
61 // |event_handler|, |host_event_stub|, or |capturer|. 60 // |event_handler|, |host_event_stub|, or |capturer|.
62 ClientSession(EventHandler* event_handler, 61 ClientSession(EventHandler* event_handler,
63 protocol::ConnectionToClient* connection, 62 protocol::ConnectionToClient* connection,
64 protocol::HostEventStub* host_event_stub, 63 protocol::HostEventStub* host_event_stub,
65 Capturer* capturer); 64 Capturer* capturer);
66 virtual ~ClientSession(); 65 virtual ~ClientSession();
67 66
(...skipping 10 matching lines...) Expand all
78 protocol::ConnectionToClient* connection) OVERRIDE; 77 protocol::ConnectionToClient* connection) OVERRIDE;
79 virtual void OnConnectionClosed( 78 virtual void OnConnectionClosed(
80 protocol::ConnectionToClient* connection) OVERRIDE; 79 protocol::ConnectionToClient* connection) OVERRIDE;
81 virtual void OnConnectionFailed(protocol::ConnectionToClient* connection, 80 virtual void OnConnectionFailed(protocol::ConnectionToClient* connection,
82 protocol::ErrorCode error) OVERRIDE; 81 protocol::ErrorCode error) OVERRIDE;
83 virtual void OnSequenceNumberUpdated( 82 virtual void OnSequenceNumberUpdated(
84 protocol::ConnectionToClient* connection, int64 sequence_number) OVERRIDE; 83 protocol::ConnectionToClient* connection, int64 sequence_number) OVERRIDE;
85 virtual void OnRouteChange( 84 virtual void OnRouteChange(
86 protocol::ConnectionToClient* connection, 85 protocol::ConnectionToClient* connection,
87 const std::string& channel_name, 86 const std::string& channel_name,
88 const net::IPEndPoint& remote_end_point, 87 const protocol::TransportRoute& route) OVERRIDE;
89 const net::IPEndPoint& local_end_point) OVERRIDE;
90 88
91 // Disconnects the session and destroys the transport. Event handler 89 // Disconnects the session and destroys the transport. Event handler
92 // is guaranteed not to be called after this method is called. Can 90 // is guaranteed not to be called after this method is called. Can
93 // be called multiple times. The object should not be used after 91 // be called multiple times. The object should not be used after
94 // this method returns. 92 // this method returns.
95 void Disconnect(); 93 void Disconnect();
96 94
97 protocol::ConnectionToClient* connection() const { 95 protocol::ConnectionToClient* connection() const {
98 return connection_.get(); 96 return connection_.get();
99 } 97 }
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 // Set of keys that are currently pressed down by the user. This is used so 166 // Set of keys that are currently pressed down by the user. This is used so
169 // we can release them if the user disconnects. 167 // we can release them if the user disconnects.
170 std::set<int> pressed_keys_; 168 std::set<int> pressed_keys_;
171 169
172 DISALLOW_COPY_AND_ASSIGN(ClientSession); 170 DISALLOW_COPY_AND_ASSIGN(ClientSession);
173 }; 171 };
174 172
175 } // namespace remoting 173 } // namespace remoting
176 174
177 #endif // REMOTING_HOST_CLIENT_SESSION_H_ 175 #endif // REMOTING_HOST_CLIENT_SESSION_H_
OLDNEW
« no previous file with comments | « remoting/host/chromoting_host.cc ('k') | remoting/host/client_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698