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

Side by Side Diff: remoting/host/chromoting_host_context.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/chromoting_host_context.h ('k') | remoting/host/chromoting_host_unittest.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/chromoting_host_context.h" 5 #include "remoting/host/chromoting_host_context.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/threading/thread.h" 10 #include "base/threading/thread.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 } 42 }
43 43
44 MessageLoop* ChromotingHostContext::main_message_loop() { 44 MessageLoop* ChromotingHostContext::main_message_loop() {
45 return main_thread_.message_loop(); 45 return main_thread_.message_loop();
46 } 46 }
47 47
48 MessageLoop* ChromotingHostContext::encode_message_loop() { 48 MessageLoop* ChromotingHostContext::encode_message_loop() {
49 return encode_thread_.message_loop(); 49 return encode_thread_.message_loop();
50 } 50 }
51 51
52 MessageLoop* ChromotingHostContext::network_message_loop() { 52 base::MessageLoopProxy* ChromotingHostContext::network_message_loop() {
53 return jingle_thread_.message_loop(); 53 return jingle_thread_.message_loop_proxy();
54 } 54 }
55 55
56 MessageLoop* ChromotingHostContext::desktop_message_loop() { 56 MessageLoop* ChromotingHostContext::desktop_message_loop() {
57 return desktop_thread_.message_loop(); 57 return desktop_thread_.message_loop();
58 } 58 }
59 59
60 void ChromotingHostContext::SetUITaskPostFunction( 60 void ChromotingHostContext::SetUITaskPostFunction(
61 const UIThreadPostTaskFunction& poster) { 61 const UIThreadPostTaskFunction& poster) {
62 ui_poster_ = poster; 62 ui_poster_ = poster;
63 ui_main_thread_id_ = base::PlatformThread::CurrentId(); 63 ui_main_thread_id_ = base::PlatformThread::CurrentId();
(...skipping 14 matching lines...) Expand all
78 main_message_loop()->PostDelayedTask(from_here, base::Bind( 78 main_message_loop()->PostDelayedTask(from_here, base::Bind(
79 &ChromotingHostContext::PostTaskToUIThread, base::Unretained(this), 79 &ChromotingHostContext::PostTaskToUIThread, base::Unretained(this),
80 from_here, task), delay_ms); 80 from_here, task), delay_ms);
81 } 81 }
82 82
83 bool ChromotingHostContext::IsUIThread() const { 83 bool ChromotingHostContext::IsUIThread() const {
84 return ui_main_thread_id_ == base::PlatformThread::CurrentId(); 84 return ui_main_thread_id_ == base::PlatformThread::CurrentId();
85 } 85 }
86 86
87 } // namespace remoting 87 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/chromoting_host_context.h ('k') | remoting/host/chromoting_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698