| 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 // Asynchronously start the host process. | 83 // Asynchronously start the host process. |
| 84 // | 84 // |
| 85 // After this is invoked, the host process will connect to the talk | 85 // After this is invoked, the host process will connect to the talk |
| 86 // network and start listening for incoming connections. | 86 // network and start listening for incoming connections. |
| 87 // | 87 // |
| 88 // This method can only be called once during the lifetime of this object. | 88 // This method can only be called once during the lifetime of this object. |
| 89 void Start(); | 89 void Start(); |
| 90 | 90 |
| 91 // Asynchronously shutdown the host process. |shutdown_task| is | 91 // Asynchronously shutdown the host process. |shutdown_task| is |
| 92 // called after shutdown is completed. | 92 // called after shutdown is completed. |
| 93 void Shutdown(Task* shutdown_task); | 93 void Shutdown(const base::Closure& shutdown_task); |
| 94 | 94 |
| 95 // Adds |observer| to the list of status observers. Doesn't take | 95 // Adds |observer| to the list of status observers. Doesn't take |
| 96 // ownership of |observer|, so |observer| must outlive this | 96 // ownership of |observer|, so |observer| must outlive this |
| 97 // object. All status observers must be added before the host is | 97 // object. All status observers must be added before the host is |
| 98 // started. | 98 // started. |
| 99 void AddStatusObserver(HostStatusObserver* observer); | 99 void AddStatusObserver(HostStatusObserver* observer); |
| 100 | 100 |
| 101 //////////////////////////////////////////////////////////////////////////// | 101 //////////////////////////////////////////////////////////////////////////// |
| 102 // protocol::ConnectionToClient::EventHandler implementation. | 102 // protocol::ConnectionToClient::EventHandler implementation. |
| 103 // TODO(sergeyu): Move this to ClientSession. | 103 // TODO(sergeyu): Move this to ClientSession. |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 scoped_ptr<protocol::CandidateSessionConfig> protocol_config_; | 238 scoped_ptr<protocol::CandidateSessionConfig> protocol_config_; |
| 239 | 239 |
| 240 bool is_curtained_; | 240 bool is_curtained_; |
| 241 | 241 |
| 242 // Whether or not the host is running in "IT2Me" mode, in which connections | 242 // Whether or not the host is running in "IT2Me" mode, in which connections |
| 243 // are pre-authenticated, and hence the local login challenge can be bypassed. | 243 // are pre-authenticated, and hence the local login challenge can be bypassed. |
| 244 bool is_it2me_; | 244 bool is_it2me_; |
| 245 | 245 |
| 246 std::string access_code_; | 246 std::string access_code_; |
| 247 | 247 |
| 248 // Stores list of tasks that should be executed when we finish | 248 // Stores list of closures that should be executed when we finish |
| 249 // shutdown. Used only while |state_| is set to kStopping. | 249 // shutdown. Used only while |state_| is set to kStopping. |
| 250 std::vector<Task*> shutdown_tasks_; | 250 std::vector<base::Closure> shutdown_tasks_; |
| 251 | 251 |
| 252 UiStrings ui_strings_; | 252 UiStrings ui_strings_; |
| 253 | 253 |
| 254 DISALLOW_COPY_AND_ASSIGN(ChromotingHost); | 254 DISALLOW_COPY_AND_ASSIGN(ChromotingHost); |
| 255 }; | 255 }; |
| 256 | 256 |
| 257 } // namespace remoting | 257 } // namespace remoting |
| 258 | 258 |
| 259 #endif // REMOTING_HOST_CHROMOTING_HOST_H_ | 259 #endif // REMOTING_HOST_CHROMOTING_HOST_H_ |
| OLD | NEW |