Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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_CHROMOTING_HOST_H_ | 5 #ifndef REMOTING_CHROMOTING_HOST_H_ |
| 6 #define REMOTING_CHROMOTING_HOST_H_ | 6 #define REMOTING_CHROMOTING_HOST_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 175 | 175 |
| 176 std::string GenerateHostAuthToken(const std::string& encoded_client_token); | 176 std::string GenerateHostAuthToken(const std::string& encoded_client_token); |
| 177 | 177 |
| 178 int AuthenticatedClientsCount() const; | 178 int AuthenticatedClientsCount() const; |
| 179 | 179 |
| 180 void EnableCurtainMode(bool enable); | 180 void EnableCurtainMode(bool enable); |
| 181 | 181 |
| 182 void ProcessPreAuthentication( | 182 void ProcessPreAuthentication( |
| 183 const scoped_refptr<protocol::ConnectionToClient>& connection); | 183 const scoped_refptr<protocol::ConnectionToClient>& connection); |
| 184 | 184 |
| 185 void StopScreenRecorder(); | |
| 186 void OnScreenRecorderStopped(); | |
| 187 | |
| 185 // The following methods are called during shutdown. | 188 // The following methods are called during shutdown. |
| 186 void ShutdownNetwork(); | 189 void ShutdownNetwork(); |
| 187 void ShutdownRecorder(); | 190 void ShutdownRecorder(); |
| 188 void ShutdownFinish(); | 191 void ShutdownFinish(); |
| 189 | 192 |
| 190 // Parameters specified when the host was created. | 193 // Parameters specified when the host was created. |
| 191 ChromotingHostContext* context_; | 194 ChromotingHostContext* context_; |
| 192 DesktopEnvironment* desktop_environment_; | 195 DesktopEnvironment* desktop_environment_; |
| 193 scoped_refptr<MutableHostConfig> config_; | 196 scoped_refptr<MutableHostConfig> config_; |
| 194 scoped_ptr<AccessVerifier> access_verifier_; | 197 scoped_ptr<AccessVerifier> access_verifier_; |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 205 ClientList clients_; | 208 ClientList clients_; |
| 206 | 209 |
| 207 // Session manager for the host process. | 210 // Session manager for the host process. |
| 208 scoped_refptr<ScreenRecorder> recorder_; | 211 scoped_refptr<ScreenRecorder> recorder_; |
| 209 | 212 |
| 210 // Tracks the internal state of the host. | 213 // Tracks the internal state of the host. |
| 211 // This variable is written on the main thread of ChromotingHostContext | 214 // This variable is written on the main thread of ChromotingHostContext |
| 212 // and read by jingle thread. | 215 // and read by jingle thread. |
| 213 State state_; | 216 State state_; |
| 214 | 217 |
| 218 // Number of screen recorders that are currently being stopped. | |
|
dmac
2011/08/11 23:56:34
Maybe expand this comment to explain the case that
Sergey Ulanov
2011/08/12 00:29:48
Done.
| |
| 219 int stopping_recorders_; | |
| 220 | |
| 215 // Lock is to lock the access to |state_|. | 221 // Lock is to lock the access to |state_|. |
| 216 base::Lock lock_; | 222 base::Lock lock_; |
| 217 | 223 |
| 218 // Configuration of the protocol. | 224 // Configuration of the protocol. |
| 219 scoped_ptr<protocol::CandidateSessionConfig> protocol_config_; | 225 scoped_ptr<protocol::CandidateSessionConfig> protocol_config_; |
| 220 | 226 |
| 221 bool is_curtained_; | 227 bool is_curtained_; |
| 222 | 228 |
| 223 // Whether or not the host is running in "IT2Me" mode, in which connections | 229 // Whether or not the host is running in "IT2Me" mode, in which connections |
| 224 // are pre-authenticated, and hence the local login challenge can be bypassed. | 230 // are pre-authenticated, and hence the local login challenge can be bypassed. |
| 225 bool is_it2me_; | 231 bool is_it2me_; |
| 226 | 232 |
| 227 std::string access_code_; | 233 std::string access_code_; |
| 228 | 234 |
| 229 // Stores list of tasks that should be executed when we finish | 235 // Stores list of tasks that should be executed when we finish |
| 230 // shutdown. Used only while |state_| is set to kStopping. | 236 // shutdown. Used only while |state_| is set to kStopping. |
| 231 std::vector<Task*> shutdown_tasks_; | 237 std::vector<Task*> shutdown_tasks_; |
| 232 | 238 |
| 233 DISALLOW_COPY_AND_ASSIGN(ChromotingHost); | 239 DISALLOW_COPY_AND_ASSIGN(ChromotingHost); |
| 234 }; | 240 }; |
| 235 | 241 |
| 236 } // namespace remoting | 242 } // namespace remoting |
| 237 | 243 |
| 238 #endif // REMOTING_HOST_CHROMOTING_HOST_H_ | 244 #endif // REMOTING_HOST_CHROMOTING_HOST_H_ |
| OLD | NEW |