ExtensionInstallDialogView: fix scrolling behavior on Views (Win,Linux)
[chromium-blink-merge.git] / remoting / client / client_context.h
blob56ae02ebc1d16f639fc97cf09887e211b8821435
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 #ifndef REMOTING_CLIENT_CLIENT_CONTEXT_H_
6 #define REMOTING_CLIENT_CLIENT_CONTEXT_H_
8 #include <string>
10 #include "base/threading/thread.h"
12 namespace base {
13 class SingleThreadTaskRunner;
14 } // namespace base
16 namespace remoting {
18 // A class that manages threads and running context for the chromoting client
19 // process.
20 class ClientContext {
21 public:
22 // |main_task_runner| is the task runner for the main plugin thread
23 // that is used for all PPAPI calls, e.g. network and graphics.
24 ClientContext(
25 const scoped_refptr<base::SingleThreadTaskRunner>& main_task_runner);
26 virtual ~ClientContext();
28 void Start();
29 void Stop();
31 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner() const;
32 scoped_refptr<base::SingleThreadTaskRunner> decode_task_runner() const;
33 scoped_refptr<base::SingleThreadTaskRunner> audio_decode_task_runner() const;
35 private:
36 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
38 // A thread that handles all video decode operations.
39 base::Thread decode_thread_;
41 // A thread that handles all audio decode operations.
42 base::Thread audio_decode_thread_;
44 DISALLOW_COPY_AND_ASSIGN(ClientContext);
47 } // namespace remoting
49 #endif // REMOTING_CLIENT_CLIENT_CONTEXT_H_