| 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_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/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 #include "base/synchronization/cancellation_flag.h" | 14 #include "base/synchronization/cancellation_flag.h" |
| 15 #include "base/synchronization/lock.h" |
| 15 #include "base/synchronization/waitable_event.h" | 16 #include "base/synchronization/waitable_event.h" |
| 16 #include "base/string16.h" | 17 #include "base/string16.h" |
| 17 #include "base/threading/platform_thread.h" | 18 #include "base/threading/platform_thread.h" |
| 18 #include "base/time.h" | 19 #include "base/time.h" |
| 19 #include "remoting/base/plugin_message_loop_proxy.h" | 20 #include "remoting/base/plugin_message_loop_proxy.h" |
| 20 #include "remoting/host/chromoting_host_context.h" | 21 #include "remoting/host/chromoting_host_context.h" |
| 21 #include "remoting/host/host_status_observer.h" | 22 #include "remoting/host/host_status_observer.h" |
| 22 #include "remoting/host/plugin/host_plugin_utils.h" | 23 #include "remoting/host/plugin/host_plugin_utils.h" |
| 24 #include "remoting/host/ui_strings.h" |
| 23 #include "third_party/npapi/bindings/npapi.h" | 25 #include "third_party/npapi/bindings/npapi.h" |
| 24 #include "third_party/npapi/bindings/npfunctions.h" | 26 #include "third_party/npapi/bindings/npfunctions.h" |
| 25 #include "third_party/npapi/bindings/npruntime.h" | 27 #include "third_party/npapi/bindings/npruntime.h" |
| 26 | 28 |
| 27 namespace tracked_objects { | 29 namespace tracked_objects { |
| 28 class Location; | 30 class Location; |
| 29 } // namespace tracked_objects | 31 } // namespace tracked_objects |
| 30 | 32 |
| 31 namespace remoting { | 33 namespace remoting { |
| 32 | 34 |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 scoped_refptr<PluginMessageLoopProxy> plugin_message_loop_proxy_; | 162 scoped_refptr<PluginMessageLoopProxy> plugin_message_loop_proxy_; |
| 161 | 163 |
| 162 scoped_ptr<RegisterSupportHostRequest> register_request_; | 164 scoped_ptr<RegisterSupportHostRequest> register_request_; |
| 163 scoped_refptr<MutableHostConfig> host_config_; | 165 scoped_refptr<MutableHostConfig> host_config_; |
| 164 ChromotingHostContext host_context_; | 166 ChromotingHostContext host_context_; |
| 165 scoped_ptr<DesktopEnvironment> desktop_environment_; | 167 scoped_ptr<DesktopEnvironment> desktop_environment_; |
| 166 | 168 |
| 167 scoped_refptr<ChromotingHost> host_; | 169 scoped_refptr<ChromotingHost> host_; |
| 168 int failed_login_attempts_; | 170 int failed_login_attempts_; |
| 169 | 171 |
| 172 UiStrings ui_strings_; |
| 173 base::Lock ui_strings_lock_; |
| 174 |
| 170 base::WaitableEvent disconnected_event_; | 175 base::WaitableEvent disconnected_event_; |
| 171 | 176 |
| 172 scoped_ptr<policy_hack::NatPolicy> nat_policy_; | 177 scoped_ptr<policy_hack::NatPolicy> nat_policy_; |
| 173 | 178 |
| 174 // Host the current nat traversal policy setting. | 179 // Host the current nat traversal policy setting. |
| 175 bool nat_traversal_enabled_; | 180 bool nat_traversal_enabled_; |
| 176 | 181 |
| 177 // Indiciates whether or not a policy has ever been read. This is to ensure | 182 // Indiciates whether or not a policy has ever been read. This is to ensure |
| 178 // that on startup, we do not accidentally start a connection before we have | 183 // that on startup, we do not accidentally start a connection before we have |
| 179 // queried our policy restrictions. | 184 // queried our policy restrictions. |
| 180 bool policy_received_; | 185 bool policy_received_; |
| 181 | 186 |
| 182 // On startup, it is possible to have Connect() called before the policy read | 187 // On startup, it is possible to have Connect() called before the policy read |
| 183 // is completed. Rather than just failing, we thunk the connection call so | 188 // is completed. Rather than just failing, we thunk the connection call so |
| 184 // it can be executed after at least one successful policy read. This | 189 // it can be executed after at least one successful policy read. This |
| 185 // variable contains the thunk if it is necessary. | 190 // variable contains the thunk if it is necessary. |
| 186 base::Closure pending_connect_; | 191 base::Closure pending_connect_; |
| 187 }; | 192 }; |
| 188 | 193 |
| 189 } // namespace remoting | 194 } // namespace remoting |
| 190 | 195 |
| 191 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::HostNPScriptObject); | 196 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::HostNPScriptObject); |
| 192 | 197 |
| 193 #endif // REMOTING_HOST_HOST_SCRIPT_OBJECT_H_ | 198 #endif // REMOTING_HOST_HOST_SCRIPT_OBJECT_H_ |
| OLD | NEW |