OLD | NEW |
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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 public protocol::HostStub, | 50 public protocol::HostStub, |
51 public protocol::ConnectionToClient::EventHandler, | 51 public protocol::ConnectionToClient::EventHandler, |
52 public ClientSessionControl { | 52 public ClientSessionControl { |
53 public: | 53 public: |
54 // Callback interface for passing events to the ChromotingHost. | 54 // Callback interface for passing events to the ChromotingHost. |
55 class EventHandler { | 55 class EventHandler { |
56 public: | 56 public: |
57 // Called after authentication has started. | 57 // Called after authentication has started. |
58 virtual void OnSessionAuthenticating(ClientSession* client) = 0; | 58 virtual void OnSessionAuthenticating(ClientSession* client) = 0; |
59 | 59 |
60 // Called after authentication has finished successfully. Returns true if | 60 // Called after authentication has finished successfully. |
61 // the connection is allowed, or false otherwise. | 61 virtual void OnSessionAuthenticated(ClientSession* client) = 0; |
62 virtual bool OnSessionAuthenticated(ClientSession* client) = 0; | |
63 | 62 |
64 // Called after we've finished connecting all channels. | 63 // Called after we've finished connecting all channels. |
65 virtual void OnSessionChannelsConnected(ClientSession* client) = 0; | 64 virtual void OnSessionChannelsConnected(ClientSession* client) = 0; |
66 | 65 |
67 // Called after authentication has failed. Must not tear down this | 66 // Called after authentication has failed. Must not tear down this |
68 // object. OnSessionClosed() is notified after this handler | 67 // object. OnSessionClosed() is notified after this handler |
69 // returns. | 68 // returns. |
70 virtual void OnSessionAuthenticationFailed(ClientSession* client) = 0; | 69 virtual void OnSessionAuthenticationFailed(ClientSession* client) = 0; |
71 | 70 |
72 // Called after connection has failed or after the client closed it. | 71 // Called after connection has failed or after the client closed it. |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 // Used to disable callbacks to |this| once DisconnectSession() has been | 246 // Used to disable callbacks to |this| once DisconnectSession() has been |
248 // called. | 247 // called. |
249 base::WeakPtrFactory<ClientSessionControl> weak_factory_; | 248 base::WeakPtrFactory<ClientSessionControl> weak_factory_; |
250 | 249 |
251 DISALLOW_COPY_AND_ASSIGN(ClientSession); | 250 DISALLOW_COPY_AND_ASSIGN(ClientSession); |
252 }; | 251 }; |
253 | 252 |
254 } // namespace remoting | 253 } // namespace remoting |
255 | 254 |
256 #endif // REMOTING_HOST_CLIENT_SESSION_H_ | 255 #endif // REMOTING_HOST_CLIENT_SESSION_H_ |
OLD | NEW |