Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(627)

Side by Side Diff: remoting/host/plugin/host_script_object.cc

Issue 8493020: Move code in src/remoting to the new callbacks. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: - Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « remoting/host/local_input_monitor_thread_linux.cc ('k') | remoting/host/screen_recorder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « remoting/host/local_input_monitor_thread_linux.cc ('k') | remoting/host/screen_recorder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698