Explicitly add python-numpy dependency to install-build-deps.
[chromium-blink-merge.git] / remoting / client / client_context.cc
blob7dc8f672ff1164c094e6da3a945de2e788d67be7
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"
7 namespace remoting {
9 ClientContext::ClientContext(
10 const scoped_refptr<base::SingleThreadTaskRunner>& main_task_runner)
11 : main_task_runner_(main_task_runner),
12 decode_thread_("ChromotingClientDecodeThread"),
13 audio_decode_thread_("ChromotingClientAudioDecodeThread") {
16 ClientContext::~ClientContext() {
19 void ClientContext::Start() {
20 // Start all the threads.
21 decode_thread_.Start();
22 audio_decode_thread_.Start();
25 void ClientContext::Stop() {
26 // Stop all the threads.
27 decode_thread_.Stop();
28 audio_decode_thread_.Stop();
31 base::SingleThreadTaskRunner* ClientContext::main_task_runner() {
32 return main_task_runner_.get();
35 base::SingleThreadTaskRunner* ClientContext::decode_task_runner() {
36 return decode_thread_.message_loop_proxy().get();
39 base::SingleThreadTaskRunner* ClientContext::audio_decode_task_runner() {
40 return audio_decode_thread_.message_loop_proxy().get();
43 } // namespace remoting