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

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

Issue 9617027: Chromoting: Implemented security attention sequence (SAS) emulation on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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) 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"
11 #include "remoting/jingle_glue/jingle_thread.h" 11 #include "remoting/jingle_glue/jingle_thread.h"
12 12
13 namespace remoting { 13 namespace remoting {
14 14
15 ChromotingHostContext::ChromotingHostContext( 15 ChromotingHostContext::ChromotingHostContext(
16 base::MessageLoopProxy* io_message_loop,
16 base::MessageLoopProxy* ui_message_loop) 17 base::MessageLoopProxy* ui_message_loop)
17 : main_thread_("ChromotingMainThread"), 18 : main_thread_("ChromotingMainThread"),
18 encode_thread_("ChromotingEncodeThread"), 19 encode_thread_("ChromotingEncodeThread"),
19 desktop_thread_("ChromotingDesktopThread"), 20 desktop_thread_("ChromotingDesktopThread"),
21 io_message_loop_(io_message_loop),
20 ui_message_loop_(ui_message_loop) { 22 ui_message_loop_(ui_message_loop) {
21 } 23 }
22 24
23 ChromotingHostContext::~ChromotingHostContext() { 25 ChromotingHostContext::~ChromotingHostContext() {
24 } 26 }
25 27
26 void ChromotingHostContext::Start() { 28 void ChromotingHostContext::Start() {
27 // Start all the threads. 29 // Start all the threads.
28 main_thread_.Start(); 30 main_thread_.Start();
29 encode_thread_.Start(); 31 encode_thread_.Start();
30 jingle_thread_.Start(); 32 jingle_thread_.Start();
31 desktop_thread_.Start(); 33 desktop_thread_.Start();
32 } 34 }
33 35
34 void ChromotingHostContext::Stop() { 36 void ChromotingHostContext::Stop() {
35 // Stop all the threads. 37 // Stop all the threads.
36 jingle_thread_.Stop(); 38 jingle_thread_.Stop();
37 encode_thread_.Stop(); 39 encode_thread_.Stop();
38 main_thread_.Stop(); 40 main_thread_.Stop();
39 desktop_thread_.Stop(); 41 desktop_thread_.Stop();
40 } 42 }
41 43
42 JingleThread* ChromotingHostContext::jingle_thread() { 44 JingleThread* ChromotingHostContext::jingle_thread() {
43 return &jingle_thread_; 45 return &jingle_thread_;
44 } 46 }
45 47
48 base::MessageLoopProxy* ChromotingHostContext::io_message_loop() {
49 return io_message_loop_;
50 }
51
46 base::MessageLoopProxy* ChromotingHostContext::ui_message_loop() { 52 base::MessageLoopProxy* ChromotingHostContext::ui_message_loop() {
47 return ui_message_loop_; 53 return ui_message_loop_;
48 } 54 }
49 55
50 MessageLoop* ChromotingHostContext::main_message_loop() { 56 MessageLoop* ChromotingHostContext::main_message_loop() {
51 return main_thread_.message_loop(); 57 return main_thread_.message_loop();
52 } 58 }
53 59
54 MessageLoop* ChromotingHostContext::encode_message_loop() { 60 MessageLoop* ChromotingHostContext::encode_message_loop() {
55 return encode_thread_.message_loop(); 61 return encode_thread_.message_loop();
56 } 62 }
57 63
58 base::MessageLoopProxy* ChromotingHostContext::network_message_loop() { 64 base::MessageLoopProxy* ChromotingHostContext::network_message_loop() {
59 return jingle_thread_.message_loop_proxy(); 65 return jingle_thread_.message_loop_proxy();
60 } 66 }
61 67
62 MessageLoop* ChromotingHostContext::desktop_message_loop() { 68 MessageLoop* ChromotingHostContext::desktop_message_loop() {
63 return desktop_thread_.message_loop(); 69 return desktop_thread_.message_loop();
64 } 70 }
65 71
66 } // namespace remoting 72 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698