| 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 #include "remoting/host/plugin/host_script_object.h" | 5 #include "remoting/host/plugin/host_script_object.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/message_loop_proxy.h" | 9 #include "base/message_loop_proxy.h" |
| 10 #include "base/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
| (...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 571 disconnected_event_.Signal(); | 571 disconnected_event_.Signal(); |
| 572 return; | 572 return; |
| 573 | 573 |
| 574 case kDisconnecting: | 574 case kDisconnecting: |
| 575 return; | 575 return; |
| 576 | 576 |
| 577 default: | 577 default: |
| 578 DCHECK(host_); | 578 DCHECK(host_); |
| 579 SetState(kDisconnecting); | 579 SetState(kDisconnecting); |
| 580 host_->Shutdown( | 580 host_->Shutdown( |
| 581 NewRunnableMethod(this, &HostNPScriptObject::OnShutdownFinished)); | 581 base::Bind(&HostNPScriptObject::OnShutdownFinished, |
| 582 base::Unretained(this))); |
| 582 } | 583 } |
| 583 } | 584 } |
| 584 | 585 |
| 585 void HostNPScriptObject::OnShutdownFinished() { | 586 void HostNPScriptObject::OnShutdownFinished() { |
| 586 DCHECK_EQ(MessageLoop::current(), host_context_.main_message_loop()); | 587 DCHECK_EQ(MessageLoop::current(), host_context_.main_message_loop()); |
| 587 | 588 |
| 588 disconnected_event_.Signal(); | 589 disconnected_event_.Signal(); |
| 589 } | 590 } |
| 590 | 591 |
| 591 void HostNPScriptObject::OnNatPolicyUpdate(bool nat_traversal_enabled) { | 592 void HostNPScriptObject::OnNatPolicyUpdate(bool nat_traversal_enabled) { |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 819 uint32_t argCount) { | 820 uint32_t argCount) { |
| 820 NPVariant np_result; | 821 NPVariant np_result; |
| 821 bool is_good = g_npnetscape_funcs->invokeDefault(plugin_, func, args, | 822 bool is_good = g_npnetscape_funcs->invokeDefault(plugin_, func, args, |
| 822 argCount, &np_result); | 823 argCount, &np_result); |
| 823 if (is_good) | 824 if (is_good) |
| 824 g_npnetscape_funcs->releasevariantvalue(&np_result); | 825 g_npnetscape_funcs->releasevariantvalue(&np_result); |
| 825 return is_good; | 826 return is_good; |
| 826 } | 827 } |
| 827 | 828 |
| 828 } // namespace remoting | 829 } // namespace remoting |
| OLD | NEW |