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

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

Issue 7633009: Use MessageLoopProxy for network message loop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 4 months 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 | Annotate | Revision Log
« no previous file with comments | « remoting/host/host_mock_objects.h ('k') | remoting/host/screen_recorder.h » ('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/threading/platform_thread.h" 10 #include "base/threading/platform_thread.h"
10 #include "remoting/base/auth_token_util.h" 11 #include "remoting/base/auth_token_util.h"
11 #include "remoting/base/util.h" 12 #include "remoting/base/util.h"
12 #include "remoting/host/chromoting_host.h" 13 #include "remoting/host/chromoting_host.h"
13 #include "remoting/host/chromoting_host_context.h" 14 #include "remoting/host/chromoting_host_context.h"
14 #include "remoting/host/desktop_environment.h" 15 #include "remoting/host/desktop_environment.h"
15 #include "remoting/host/host_config.h" 16 #include "remoting/host/host_config.h"
16 #include "remoting/host/host_key_pair.h" 17 #include "remoting/host/host_key_pair.h"
17 #include "remoting/host/in_memory_host_config.h" 18 #include "remoting/host/in_memory_host_config.h"
18 #include "remoting/host/plugin/host_plugin_utils.h" 19 #include "remoting/host/plugin/host_plugin_utils.h"
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 } 312 }
312 313
313 void HostNPScriptObject::OnSignallingConnected(SignalStrategy* signal_strategy, 314 void HostNPScriptObject::OnSignallingConnected(SignalStrategy* signal_strategy,
314 const std::string& full_jid) { 315 const std::string& full_jid) {
315 } 316 }
316 317
317 void HostNPScriptObject::OnSignallingDisconnected() { 318 void HostNPScriptObject::OnSignallingDisconnected() {
318 } 319 }
319 320
320 void HostNPScriptObject::OnAccessDenied() { 321 void HostNPScriptObject::OnAccessDenied() {
321 DCHECK_EQ(MessageLoop::current(), host_context_.network_message_loop()); 322 DCHECK(host_context_.network_message_loop()->BelongsToCurrentThread());
322 323
323 ++failed_login_attempts_; 324 ++failed_login_attempts_;
324 if (failed_login_attempts_ == kMaxLoginAttempts) 325 if (failed_login_attempts_ == kMaxLoginAttempts)
325 DisconnectInternal(); 326 DisconnectInternal();
326 } 327 }
327 328
328 void HostNPScriptObject::OnClientAuthenticated( 329 void HostNPScriptObject::OnClientAuthenticated(
329 remoting::protocol::ConnectionToClient* client) { 330 remoting::protocol::ConnectionToClient* client) {
330 DCHECK_NE(base::PlatformThread::CurrentId(), np_thread_id_); 331 DCHECK_NE(base::PlatformThread::CurrentId(), np_thread_id_);
331 client_username_ = client->session()->jid(); 332 client_username_ = client->session()->jid();
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 } 603 }
603 604
604 // static 605 // static
605 void HostNPScriptObject::NPTaskSpringboard(void* task) { 606 void HostNPScriptObject::NPTaskSpringboard(void* task) {
606 base::Closure* real_task = reinterpret_cast<base::Closure*>(task); 607 base::Closure* real_task = reinterpret_cast<base::Closure*>(task);
607 real_task->Run(); 608 real_task->Run();
608 delete real_task; 609 delete real_task;
609 } 610 }
610 611
611 } // namespace remoting 612 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/host_mock_objects.h ('k') | remoting/host/screen_recorder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698