Ensure low-memory renderers retry failed loads correctly.
[chromium-blink-merge.git] / remoting / client / client_context.cc
blob163bd0bffc1aedaa492c9ce0e383f97cabffe3c1
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 scoped_refptr<base::SingleThreadTaskRunner> ClientContext::main_task_runner()
32 const {
33 return main_task_runner_;
36 scoped_refptr<base::SingleThreadTaskRunner> ClientContext::decode_task_runner()
37 const {
38 return decode_thread_.task_runner();
41 scoped_refptr<base::SingleThreadTaskRunner>
42 ClientContext::audio_decode_task_runner() const {
43 return audio_decode_thread_.task_runner();
46 } // namespace remoting