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 DesktopEnvironment; | 36 class DesktopEnvironmentFactory; |
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 FinishConnectMainThread(const std::string& uid, | 201 void FinishConnect(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 void FinishConnectNetworkThread(const std::string& uid, | 204 |
205 const std::string& auth_token, | |
206 const std::string& auth_service); | |
207 void DisconnectInternal(); | 205 void DisconnectInternal(); |
208 | 206 |
209 // Callback for ChromotingHost::Shutdown(). | 207 // Callback for ChromotingHost::Shutdown(). |
210 void OnShutdownFinished(); | 208 void OnShutdownFinished(); |
211 | 209 |
212 // Called when a policy is updated. | 210 // Called when a policy is updated. |
213 void OnPolicyUpdate(scoped_ptr<base::DictionaryValue> policies); | 211 void OnPolicyUpdate(scoped_ptr<base::DictionaryValue> policies); |
214 | 212 |
215 // Called when the nat traversal policy is updated. | 213 // Called when the nat traversal policy is updated. |
216 void UpdateNatPolicy(bool nat_traversal_enabled); | 214 void UpdateNatPolicy(bool nat_traversal_enabled); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 ScopedRefNPObject on_nat_traversal_policy_changed_func_; | 304 ScopedRefNPObject on_nat_traversal_policy_changed_func_; |
307 ScopedRefNPObject on_state_changed_func_; | 305 ScopedRefNPObject on_state_changed_func_; |
308 base::PlatformThreadId np_thread_id_; | 306 base::PlatformThreadId np_thread_id_; |
309 scoped_refptr<PluginThreadTaskRunner> plugin_task_runner_; | 307 scoped_refptr<PluginThreadTaskRunner> plugin_task_runner_; |
310 | 308 |
311 scoped_ptr<ChromotingHostContext> host_context_; | 309 scoped_ptr<ChromotingHostContext> host_context_; |
312 HostKeyPair host_key_pair_; | 310 HostKeyPair host_key_pair_; |
313 scoped_ptr<SignalStrategy> signal_strategy_; | 311 scoped_ptr<SignalStrategy> signal_strategy_; |
314 scoped_ptr<RegisterSupportHostRequest> register_request_; | 312 scoped_ptr<RegisterSupportHostRequest> register_request_; |
315 scoped_ptr<LogToServer> log_to_server_; | 313 scoped_ptr<LogToServer> log_to_server_; |
316 scoped_ptr<DesktopEnvironment> desktop_environment_; | 314 scoped_ptr<DesktopEnvironmentFactory> desktop_environment_factory_; |
317 scoped_ptr<It2MeHostUserInterface> it2me_host_user_interface_; | 315 scoped_ptr<It2MeHostUserInterface> it2me_host_user_interface_; |
318 scoped_ptr<HostEventLogger> host_event_logger_; | 316 scoped_ptr<HostEventLogger> host_event_logger_; |
319 | 317 |
320 scoped_refptr<ChromotingHost> host_; | 318 scoped_refptr<ChromotingHost> host_; |
321 int failed_login_attempts_; | 319 int failed_login_attempts_; |
322 | 320 |
323 UiStrings ui_strings_; | 321 UiStrings ui_strings_; |
324 base::Lock ui_strings_lock_; | 322 base::Lock ui_strings_lock_; |
325 | 323 |
326 base::WaitableEvent disconnected_event_; | 324 base::WaitableEvent disconnected_event_; |
(...skipping 27 matching lines...) Expand all Loading... |
354 // SequencedWorkerPool. Problem is that SequencedWorkerPool relies | 352 // SequencedWorkerPool. Problem is that SequencedWorkerPool relies |
355 // on MessageLoopProxy::current(). | 353 // on MessageLoopProxy::current(). |
356 base::Thread worker_thread_; | 354 base::Thread worker_thread_; |
357 | 355 |
358 DISALLOW_COPY_AND_ASSIGN(HostNPScriptObject); | 356 DISALLOW_COPY_AND_ASSIGN(HostNPScriptObject); |
359 }; | 357 }; |
360 | 358 |
361 } // namespace remoting | 359 } // namespace remoting |
362 | 360 |
363 #endif // REMOTING_HOST_PLUGIN_HOST_SCRIPT_OBJECT_H_ | 361 #endif // REMOTING_HOST_PLUGIN_HOST_SCRIPT_OBJECT_H_ |
OLD | NEW |