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

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

Issue 6711033: A new authenticated connection evicts an old one. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync. Created 9 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_unittest.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
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef REMOTING_HOST_CLIENT_SESSION_H_
6 #define REMOTING_HOST_CLIENT_SESSION_H_
7
8 #include "remoting/protocol/connection_to_client.h"
9 #include "remoting/protocol/host_stub.h"
10
11 namespace remoting {
12
13 // A ClientSession keeps a reference to a connection to a client, and maintains
14 // per-client state.
15 class ClientSession : public protocol::HostStub,
16 public base::RefCountedThreadSafe<ClientSession> {
17 public:
18 // Callback interface for passing events to the ChromotingHost.
19 class EventHandler {
20 public:
21 virtual ~EventHandler() {}
22
23 // Called to signal that local login has succeeded and ChromotingHost can
24 // proceed with the next step.
25 virtual void LocalLoginSucceeded(
26 scoped_refptr<protocol::ConnectionToClient> client) = 0;
27
28 // Called to signal that local login has failed.
29 virtual void LocalLoginFailed(
30 scoped_refptr<protocol::ConnectionToClient> client) = 0;
31 };
32
33 ClientSession(EventHandler* event_handler,
34 scoped_refptr<protocol::ConnectionToClient> connection);
35
36 // protocol::HostStub interface.
37 virtual void SuggestResolution(
38 const protocol::SuggestResolutionRequest* msg, Task* done);
39 virtual void BeginSessionRequest(
40 const protocol::LocalLoginCredentials* credentials, Task* done);
41
42 // Disconnect this client session.
43 void Disconnect();
44
45 protocol::ConnectionToClient* connection() const;
46
47 protected:
48 friend class base::RefCountedThreadSafe<ClientSession>;
49 ~ClientSession();
50
51 private:
52 EventHandler* event_handler_;
53 scoped_refptr<protocol::ConnectionToClient> connection_;
54
55 DISALLOW_COPY_AND_ASSIGN(ClientSession);
56 };
57
58 } // namespace remoting
59
60 #endif // REMOTING_HOST_CLIENT_SESSION_H_
OLDNEW
« no previous file with comments | « remoting/host/chromoting_host_unittest.cc ('k') | remoting/host/client_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698