OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_IT2ME_IT2ME_HOST_H_ | 5 #ifndef REMOTING_HOST_IT2ME_IT2ME_HOST_H_ |
6 #define REMOTING_HOST_IT2ME_IT2ME_HOST_H_ | 6 #define REMOTING_HOST_IT2ME_IT2ME_HOST_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 virtual void OnClientAuthenticated(const std::string& client_username) = 0; | 59 virtual void OnClientAuthenticated(const std::string& client_username) = 0; |
60 virtual void OnStoreAccessCode(const std::string& access_code, | 60 virtual void OnStoreAccessCode(const std::string& access_code, |
61 base::TimeDelta access_code_lifetime) = 0; | 61 base::TimeDelta access_code_lifetime) = 0; |
62 virtual void OnNatPolicyChanged(bool nat_traversal_enabled) = 0; | 62 virtual void OnNatPolicyChanged(bool nat_traversal_enabled) = 0; |
63 virtual void OnStateChanged(It2MeHostState state, | 63 virtual void OnStateChanged(It2MeHostState state, |
64 const std::string& error_message) = 0; | 64 const std::string& error_message) = 0; |
65 }; | 65 }; |
66 | 66 |
67 It2MeHost(std::unique_ptr<ChromotingHostContext> context, | 67 It2MeHost(std::unique_ptr<ChromotingHostContext> context, |
68 std::unique_ptr<PolicyWatcher> policy_watcher, | 68 std::unique_ptr<PolicyWatcher> policy_watcher, |
69 std::unique_ptr<It2MeConfirmationDialogFactory> | 69 std::unique_ptr<It2MeConfirmationDialog> confirmation_dialog, |
70 confirmation_dialog_factory, | |
71 base::WeakPtr<It2MeHost::Observer> observer, | 70 base::WeakPtr<It2MeHost::Observer> observer, |
72 const XmppSignalStrategy::XmppServerConfig& xmpp_server_config, | 71 const XmppSignalStrategy::XmppServerConfig& xmpp_server_config, |
73 const std::string& directory_bot_jid); | 72 const std::string& directory_bot_jid); |
74 | 73 |
75 // Methods called by the script object, from the plugin thread. | 74 // Methods called by the script object, from the plugin thread. |
76 | 75 |
77 // Creates It2Me host structures and starts the host. | 76 // Creates It2Me host structures and starts the host. |
78 virtual void Connect(); | 77 virtual void Connect(); |
79 | 78 |
80 // Disconnects and shuts down the host. | 79 // Disconnects and shuts down the host. |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 std::unique_ptr<SignalStrategy> signal_strategy_; | 169 std::unique_ptr<SignalStrategy> signal_strategy_; |
171 std::unique_ptr<RegisterSupportHostRequest> register_request_; | 170 std::unique_ptr<RegisterSupportHostRequest> register_request_; |
172 std::unique_ptr<HostStatusLogger> host_status_logger_; | 171 std::unique_ptr<HostStatusLogger> host_status_logger_; |
173 std::unique_ptr<DesktopEnvironmentFactory> desktop_environment_factory_; | 172 std::unique_ptr<DesktopEnvironmentFactory> desktop_environment_factory_; |
174 std::unique_ptr<HostEventLogger> host_event_logger_; | 173 std::unique_ptr<HostEventLogger> host_event_logger_; |
175 | 174 |
176 std::unique_ptr<ChromotingHost> host_; | 175 std::unique_ptr<ChromotingHost> host_; |
177 int failed_login_attempts_ = 0; | 176 int failed_login_attempts_ = 0; |
178 | 177 |
179 std::unique_ptr<PolicyWatcher> policy_watcher_; | 178 std::unique_ptr<PolicyWatcher> policy_watcher_; |
180 std::unique_ptr<It2MeConfirmationDialogFactory> confirmation_dialog_factory_; | 179 std::unique_ptr<It2MeConfirmationDialog> confirmation_dialog_; |
181 std::unique_ptr<It2MeConfirmationDialogProxy> confirmation_dialog_proxy_; | 180 std::unique_ptr<It2MeConfirmationDialogProxy> confirmation_dialog_proxy_; |
182 | 181 |
183 // Host the current nat traversal policy setting. | 182 // Host the current nat traversal policy setting. |
184 bool nat_traversal_enabled_ = false; | 183 bool nat_traversal_enabled_ = false; |
185 | 184 |
186 // The client and host domain policy setting. | 185 // The client and host domain policy setting. |
187 std::string required_client_domain_; | 186 std::string required_client_domain_; |
188 std::string required_host_domain_; | 187 std::string required_host_domain_; |
189 | 188 |
190 // Indicates whether or not a policy has ever been read. This is to ensure | 189 // Indicates whether or not a policy has ever been read. This is to ensure |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 const XmppSignalStrategy::XmppServerConfig& xmpp_server_config, | 223 const XmppSignalStrategy::XmppServerConfig& xmpp_server_config, |
225 const std::string& directory_bot_jid); | 224 const std::string& directory_bot_jid); |
226 | 225 |
227 private: | 226 private: |
228 DISALLOW_COPY_AND_ASSIGN(It2MeHostFactory); | 227 DISALLOW_COPY_AND_ASSIGN(It2MeHostFactory); |
229 }; | 228 }; |
230 | 229 |
231 } // namespace remoting | 230 } // namespace remoting |
232 | 231 |
233 #endif // REMOTING_HOST_IT2ME_IT2ME_HOST_H_ | 232 #endif // REMOTING_HOST_IT2ME_IT2ME_HOST_H_ |
OLD | NEW |