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 #include "remoting/host/plugin/host_script_object.h" | 5 #include "remoting/host/plugin/host_script_object.h" |
6 #include "remoting/host/plugin/daemon_controller.h" | 6 #include "remoting/host/plugin/daemon_controller.h" |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/message_loop_proxy.h" | 10 #include "base/message_loop_proxy.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 HostNPScriptObject::HostNPScriptObject( | 60 HostNPScriptObject::HostNPScriptObject( |
61 NPP plugin, | 61 NPP plugin, |
62 NPObject* parent, | 62 NPObject* parent, |
63 PluginMessageLoopProxy::Delegate* plugin_thread_delegate) | 63 PluginMessageLoopProxy::Delegate* plugin_thread_delegate) |
64 : plugin_(plugin), | 64 : plugin_(plugin), |
65 parent_(parent), | 65 parent_(parent), |
66 state_(kDisconnected), | 66 state_(kDisconnected), |
67 np_thread_id_(base::PlatformThread::CurrentId()), | 67 np_thread_id_(base::PlatformThread::CurrentId()), |
68 plugin_message_loop_proxy_( | 68 plugin_message_loop_proxy_( |
69 new PluginMessageLoopProxy(plugin_thread_delegate)), | 69 new PluginMessageLoopProxy(plugin_thread_delegate)), |
70 host_context_(plugin_message_loop_proxy_), | 70 host_context_(NULL, plugin_message_loop_proxy_), |
71 failed_login_attempts_(0), | 71 failed_login_attempts_(0), |
72 daemon_controller_(DaemonController::Create()), | 72 daemon_controller_(DaemonController::Create()), |
73 disconnected_event_(true, false), | 73 disconnected_event_(true, false), |
74 am_currently_logging_(false), | 74 am_currently_logging_(false), |
75 nat_traversal_enabled_(false), | 75 nat_traversal_enabled_(false), |
76 policy_received_(false) { | 76 policy_received_(false) { |
77 } | 77 } |
78 | 78 |
79 HostNPScriptObject::~HostNPScriptObject() { | 79 HostNPScriptObject::~HostNPScriptObject() { |
80 CHECK_EQ(base::PlatformThread::CurrentId(), np_thread_id_); | 80 CHECK_EQ(base::PlatformThread::CurrentId(), np_thread_id_); |
(...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
874 uint32_t argCount) { | 874 uint32_t argCount) { |
875 NPVariant np_result; | 875 NPVariant np_result; |
876 bool is_good = g_npnetscape_funcs->invokeDefault(plugin_, func, args, | 876 bool is_good = g_npnetscape_funcs->invokeDefault(plugin_, func, args, |
877 argCount, &np_result); | 877 argCount, &np_result); |
878 if (is_good) | 878 if (is_good) |
879 g_npnetscape_funcs->releasevariantvalue(&np_result); | 879 g_npnetscape_funcs->releasevariantvalue(&np_result); |
880 return is_good; | 880 return is_good; |
881 } | 881 } |
882 | 882 |
883 } // namespace remoting | 883 } // namespace remoting |
OLD | NEW |