| 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 |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 15 #include "base/strings/string16.h" | 15 #include "base/strings/string16.h" |
| 16 #include "base/synchronization/cancellation_flag.h" | 16 #include "base/synchronization/cancellation_flag.h" |
| 17 #include "base/synchronization/lock.h" | 17 #include "base/synchronization/lock.h" |
| 18 #include "base/synchronization/waitable_event.h" | 18 #include "base/synchronization/waitable_event.h" |
| 19 #include "base/thread_task_runner_handle.h" | 19 #include "base/thread_task_runner_handle.h" |
| 20 #include "base/threading/platform_thread.h" | 20 #include "base/threading/platform_thread.h" |
| 21 #include "base/threading/thread.h" | 21 #include "base/threading/thread.h" |
| 22 #include "base/time/time.h" | 22 #include "base/time/time.h" |
| 23 #include "remoting/base/auto_thread_task_runner.h" | 23 #include "remoting/base/auto_thread_task_runner.h" |
| 24 #include "remoting/host/chromoting_host_context.h" | 24 #include "remoting/host/chromoting_host_context.h" |
| 25 #include "remoting/host/log_to_server.h" | 25 #include "remoting/host/log_to_server.h" |
| 26 #include "remoting/host/plugin/host_plugin_utils.h" | 26 #include "remoting/host/plugin/host_plugin_utils.h" |
| 27 #include "remoting/host/setup/daemon_controller.h" | 27 #include "remoting/host/setup/daemon_controller.h" |
| 28 #include "remoting/host/ui_strings.h" | |
| 29 #include "remoting/jingle_glue/xmpp_signal_strategy.h" | 28 #include "remoting/jingle_glue/xmpp_signal_strategy.h" |
| 30 #include "remoting/protocol/pairing_registry.h" | 29 #include "remoting/protocol/pairing_registry.h" |
| 31 #include "third_party/npapi/bindings/npapi.h" | 30 #include "third_party/npapi/bindings/npapi.h" |
| 32 #include "third_party/npapi/bindings/npfunctions.h" | 31 #include "third_party/npapi/bindings/npfunctions.h" |
| 33 #include "third_party/npapi/bindings/npruntime.h" | 32 #include "third_party/npapi/bindings/npruntime.h" |
| 34 | 33 |
| 35 namespace remoting { | 34 namespace remoting { |
| 36 | 35 |
| 37 // NPAPI plugin implementation for remoting host script object. | 36 // NPAPI plugin implementation for remoting host script object. |
| 38 // HostNPScriptObject creates threads that are required to run | 37 // HostNPScriptObject creates threads that are required to run |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 | 294 |
| 296 // Internal implementation of the It2Me host function. | 295 // Internal implementation of the It2Me host function. |
| 297 scoped_refptr<It2MeImpl> it2me_impl_; | 296 scoped_refptr<It2MeImpl> it2me_impl_; |
| 298 | 297 |
| 299 // Cached, read-only copies of |it2me_impl_| session state. | 298 // Cached, read-only copies of |it2me_impl_| session state. |
| 300 State state_; | 299 State state_; |
| 301 std::string access_code_; | 300 std::string access_code_; |
| 302 base::TimeDelta access_code_lifetime_; | 301 base::TimeDelta access_code_lifetime_; |
| 303 std::string client_username_; | 302 std::string client_username_; |
| 304 | 303 |
| 305 // Localized strings for use by the |it2me_impl_| UI. | |
| 306 UiStrings ui_strings_; | |
| 307 | |
| 308 // IT2Me Talk server configuration used by |it2me_impl_| to connect. | 304 // IT2Me Talk server configuration used by |it2me_impl_| to connect. |
| 309 XmppSignalStrategy::XmppServerConfig xmpp_server_config_; | 305 XmppSignalStrategy::XmppServerConfig xmpp_server_config_; |
| 310 | 306 |
| 311 // Chromoting Bot JID used by |it2me_impl_| to register the host. | 307 // Chromoting Bot JID used by |it2me_impl_| to register the host. |
| 312 std::string directory_bot_jid_; | 308 std::string directory_bot_jid_; |
| 313 | 309 |
| 314 // Callbacks to notify in response to |it2me_impl_| events. | 310 // Callbacks to notify in response to |it2me_impl_| events. |
| 315 ScopedRefNPObject on_nat_traversal_policy_changed_func_; | 311 ScopedRefNPObject on_nat_traversal_policy_changed_func_; |
| 316 ScopedRefNPObject on_state_changed_func_; | 312 ScopedRefNPObject on_state_changed_func_; |
| 317 | 313 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 335 // Used to cancel pending tasks for this object when it is destroyed. | 331 // Used to cancel pending tasks for this object when it is destroyed. |
| 336 base::WeakPtrFactory<HostNPScriptObject> weak_factory_; | 332 base::WeakPtrFactory<HostNPScriptObject> weak_factory_; |
| 337 base::WeakPtr<HostNPScriptObject> weak_ptr_; | 333 base::WeakPtr<HostNPScriptObject> weak_ptr_; |
| 338 | 334 |
| 339 DISALLOW_COPY_AND_ASSIGN(HostNPScriptObject); | 335 DISALLOW_COPY_AND_ASSIGN(HostNPScriptObject); |
| 340 }; | 336 }; |
| 341 | 337 |
| 342 } // namespace remoting | 338 } // namespace remoting |
| 343 | 339 |
| 344 #endif // REMOTING_HOST_PLUGIN_HOST_SCRIPT_OBJECT_H_ | 340 #endif // REMOTING_HOST_PLUGIN_HOST_SCRIPT_OBJECT_H_ |
| OLD | NEW |