1 // Copyright (c) 2012 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.
5 #include "remoting/client/client_context.h"
9 ClientContext::ClientContext(base::SingleThreadTaskRunner
* main_task_runner
)
10 : main_task_runner_(main_task_runner
),
11 decode_thread_("ChromotingClientDecodeThread"),
12 audio_decode_thread_("ChromotingClientAudioDecodeThread") {
15 ClientContext::~ClientContext() {
18 void ClientContext::Start() {
19 // Start all the threads.
20 decode_thread_
.Start();
21 audio_decode_thread_
.Start();
24 void ClientContext::Stop() {
25 // Stop all the threads.
26 decode_thread_
.Stop();
27 audio_decode_thread_
.Stop();
30 base::SingleThreadTaskRunner
* ClientContext::main_task_runner() {
31 return main_task_runner_
;
34 base::SingleThreadTaskRunner
* ClientContext::decode_task_runner() {
35 return decode_thread_
.message_loop_proxy();
38 base::SingleThreadTaskRunner
* ClientContext::audio_decode_task_runner() {
39 return audio_decode_thread_
.message_loop_proxy();
42 } // namespace remoting