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_PLUGIN_HOST_SCRIPT_OBJECT_H_ | 5 #ifndef REMOTING_HOST_PLUGIN_HOST_SCRIPT_OBJECT_H_ |
6 #define REMOTING_HOST_PLUGIN_HOST_SCRIPT_OBJECT_H_ | 6 #define REMOTING_HOST_PLUGIN_HOST_SCRIPT_OBJECT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 15 matching lines...) Expand all Loading... |
26 #include "remoting/host/plugin/daemon_controller.h" | 26 #include "remoting/host/plugin/daemon_controller.h" |
27 #include "remoting/host/plugin/host_plugin_utils.h" | 27 #include "remoting/host/plugin/host_plugin_utils.h" |
28 #include "remoting/host/ui_strings.h" | 28 #include "remoting/host/ui_strings.h" |
29 #include "third_party/npapi/bindings/npapi.h" | 29 #include "third_party/npapi/bindings/npapi.h" |
30 #include "third_party/npapi/bindings/npfunctions.h" | 30 #include "third_party/npapi/bindings/npfunctions.h" |
31 #include "third_party/npapi/bindings/npruntime.h" | 31 #include "third_party/npapi/bindings/npruntime.h" |
32 | 32 |
33 namespace remoting { | 33 namespace remoting { |
34 | 34 |
35 class ChromotingHost; | 35 class ChromotingHost; |
36 class DesktopEnvironmentFactory; | 36 class DesktopEnvironment; |
37 class HostEventLogger; | 37 class HostEventLogger; |
38 class It2MeHostUserInterface; | 38 class It2MeHostUserInterface; |
39 class MutableHostConfig; | 39 class MutableHostConfig; |
40 class RegisterSupportHostRequest; | 40 class RegisterSupportHostRequest; |
41 class SignalStrategy; | 41 class SignalStrategy; |
42 class SupportAccessVerifier; | 42 class SupportAccessVerifier; |
43 | 43 |
44 namespace policy_hack { | 44 namespace policy_hack { |
45 class PolicyWatcher; | 45 class PolicyWatcher; |
46 } // namespace policy_hack | 46 } // namespace policy_hack |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 // Callbacks invoked during session setup. | 191 // Callbacks invoked during session setup. |
192 void OnReceivedSupportID(bool success, | 192 void OnReceivedSupportID(bool success, |
193 const std::string& support_id, | 193 const std::string& support_id, |
194 const base::TimeDelta& lifetime); | 194 const base::TimeDelta& lifetime); |
195 | 195 |
196 // Helper functions that run on main thread. Can be called on any | 196 // Helper functions that run on main thread. Can be called on any |
197 // other thread. | 197 // other thread. |
198 void ReadPolicyAndConnect(const std::string& uid, | 198 void ReadPolicyAndConnect(const std::string& uid, |
199 const std::string& auth_token, | 199 const std::string& auth_token, |
200 const std::string& auth_service); | 200 const std::string& auth_service); |
201 void FinishConnect(const std::string& uid, | 201 void FinishConnectMainThread(const std::string& uid, |
202 const std::string& auth_token, | 202 const std::string& auth_token, |
203 const std::string& auth_service); | 203 const std::string& auth_service); |
204 | 204 void FinishConnectNetworkThread(const std::string& uid, |
| 205 const std::string& auth_token, |
| 206 const std::string& auth_service); |
205 void DisconnectInternal(); | 207 void DisconnectInternal(); |
206 | 208 |
207 // Callback for ChromotingHost::Shutdown(). | 209 // Callback for ChromotingHost::Shutdown(). |
208 void OnShutdownFinished(); | 210 void OnShutdownFinished(); |
209 | 211 |
210 // Called when a policy is updated. | 212 // Called when a policy is updated. |
211 void OnPolicyUpdate(scoped_ptr<base::DictionaryValue> policies); | 213 void OnPolicyUpdate(scoped_ptr<base::DictionaryValue> policies); |
212 | 214 |
213 // Called when the nat traversal policy is updated. | 215 // Called when the nat traversal policy is updated. |
214 void UpdateNatPolicy(bool nat_traversal_enabled); | 216 void UpdateNatPolicy(bool nat_traversal_enabled); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 ScopedRefNPObject on_nat_traversal_policy_changed_func_; | 306 ScopedRefNPObject on_nat_traversal_policy_changed_func_; |
305 ScopedRefNPObject on_state_changed_func_; | 307 ScopedRefNPObject on_state_changed_func_; |
306 base::PlatformThreadId np_thread_id_; | 308 base::PlatformThreadId np_thread_id_; |
307 scoped_refptr<PluginThreadTaskRunner> plugin_task_runner_; | 309 scoped_refptr<PluginThreadTaskRunner> plugin_task_runner_; |
308 | 310 |
309 scoped_ptr<ChromotingHostContext> host_context_; | 311 scoped_ptr<ChromotingHostContext> host_context_; |
310 HostKeyPair host_key_pair_; | 312 HostKeyPair host_key_pair_; |
311 scoped_ptr<SignalStrategy> signal_strategy_; | 313 scoped_ptr<SignalStrategy> signal_strategy_; |
312 scoped_ptr<RegisterSupportHostRequest> register_request_; | 314 scoped_ptr<RegisterSupportHostRequest> register_request_; |
313 scoped_ptr<LogToServer> log_to_server_; | 315 scoped_ptr<LogToServer> log_to_server_; |
314 scoped_ptr<DesktopEnvironmentFactory> desktop_environment_factory_; | 316 scoped_ptr<DesktopEnvironment> desktop_environment_; |
315 scoped_ptr<It2MeHostUserInterface> it2me_host_user_interface_; | 317 scoped_ptr<It2MeHostUserInterface> it2me_host_user_interface_; |
316 scoped_ptr<HostEventLogger> host_event_logger_; | 318 scoped_ptr<HostEventLogger> host_event_logger_; |
317 | 319 |
318 scoped_refptr<ChromotingHost> host_; | 320 scoped_refptr<ChromotingHost> host_; |
319 int failed_login_attempts_; | 321 int failed_login_attempts_; |
320 | 322 |
321 UiStrings ui_strings_; | 323 UiStrings ui_strings_; |
322 base::Lock ui_strings_lock_; | 324 base::Lock ui_strings_lock_; |
323 | 325 |
324 base::WaitableEvent disconnected_event_; | 326 base::WaitableEvent disconnected_event_; |
(...skipping 27 matching lines...) Expand all Loading... |
352 // SequencedWorkerPool. Problem is that SequencedWorkerPool relies | 354 // SequencedWorkerPool. Problem is that SequencedWorkerPool relies |
353 // on MessageLoopProxy::current(). | 355 // on MessageLoopProxy::current(). |
354 base::Thread worker_thread_; | 356 base::Thread worker_thread_; |
355 | 357 |
356 DISALLOW_COPY_AND_ASSIGN(HostNPScriptObject); | 358 DISALLOW_COPY_AND_ASSIGN(HostNPScriptObject); |
357 }; | 359 }; |
358 | 360 |
359 } // namespace remoting | 361 } // namespace remoting |
360 | 362 |
361 #endif // REMOTING_HOST_PLUGIN_HOST_SCRIPT_OBJECT_H_ | 363 #endif // REMOTING_HOST_PLUGIN_HOST_SCRIPT_OBJECT_H_ |
OLD | NEW |