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

Side by Side Diff: remoting/host/chromoting_host_context.cc

Issue 6489031: Run event executor on the ui thread to remove the need to explicitly XFlush() the XTest calls. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fixed glint warnings. Created 9 years, 10 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/threading/thread.h" 9 #include "base/threading/thread.h"
10 #include "remoting/jingle_glue/jingle_thread.h" 10 #include "remoting/jingle_glue/jingle_thread.h"
11 11
12 namespace remoting { 12 namespace remoting {
13 13
14 ChromotingHostContext::ChromotingHostContext() 14 ChromotingHostContext::ChromotingHostContext(MessageLoop* ui_message_loop)
15 : main_thread_("ChromotingMainThread"), 15 : main_thread_("ChromotingMainThread"),
16 encode_thread_("ChromotingEncodeThread") { 16 encode_thread_("ChromotingEncodeThread"),
17 ui_message_loop_(ui_message_loop) {
17 } 18 }
18 19
19 ChromotingHostContext::~ChromotingHostContext() { 20 ChromotingHostContext::~ChromotingHostContext() {
20 } 21 }
21 22
22 void ChromotingHostContext::Start() { 23 void ChromotingHostContext::Start() {
23 // Start all the threads. 24 // Start all the threads.
24 main_thread_.Start(); 25 main_thread_.Start();
25 encode_thread_.Start(); 26 encode_thread_.Start();
26 jingle_thread_.Start(); 27 jingle_thread_.Start();
(...skipping 15 matching lines...) Expand all
42 } 43 }
43 44
44 MessageLoop* ChromotingHostContext::encode_message_loop() { 45 MessageLoop* ChromotingHostContext::encode_message_loop() {
45 return encode_thread_.message_loop(); 46 return encode_thread_.message_loop();
46 } 47 }
47 48
48 MessageLoop* ChromotingHostContext::network_message_loop() { 49 MessageLoop* ChromotingHostContext::network_message_loop() {
49 return jingle_thread_.message_loop(); 50 return jingle_thread_.message_loop();
50 } 51 }
51 52
53 MessageLoop* ChromotingHostContext::ui_message_loop() {
54 return ui_message_loop_;
55 }
56
52 } // namespace remoting 57 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698