OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "remoting/client/client_context.h" |
| 6 |
| 7 #include <string> |
| 8 |
| 9 #include "base/thread.h" |
| 10 #include "remoting/jingle_glue/jingle_thread.h" |
| 11 |
| 12 namespace remoting { |
| 13 |
| 14 ClientContext::ClientContext() |
| 15 : main_thread_("ChromotingClientMainThread"), |
| 16 decode_thread_("ChromotingClientDecodeThread") { |
| 17 } |
| 18 |
| 19 ClientContext::~ClientContext() { |
| 20 } |
| 21 |
| 22 void ClientContext::Start() { |
| 23 // Start all the threads. |
| 24 main_thread_.Start(); |
| 25 decode_thread_.Start(); |
| 26 jingle_thread_.Start(); |
| 27 } |
| 28 |
| 29 void ClientContext::Stop() { |
| 30 // Stop all the threads. |
| 31 jingle_thread_.Stop(); |
| 32 decode_thread_.Stop(); |
| 33 main_thread_.Stop(); |
| 34 } |
| 35 |
| 36 JingleThread* ClientContext::jingle_thread() { |
| 37 return &jingle_thread_; |
| 38 } |
| 39 |
| 40 MessageLoop* ClientContext::jingle_message_loop() { |
| 41 return jingle_thread_.message_loop(); |
| 42 } |
| 43 |
| 44 MessageLoop* ClientContext::main_message_loop() { |
| 45 return main_thread_.message_loop(); |
| 46 } |
| 47 |
| 48 MessageLoop* ClientContext::decode_message_loop() { |
| 49 return decode_thread_.message_loop(); |
| 50 } |
| 51 |
| 52 } // namespace remoting |
OLD | NEW |