blob: 38c60880c49f5d6d64a5684813dd01fa7203d3b3 [file] [log] [blame]
[email protected]1e7bea32011-08-04 14:53:421// Copyright (c) 2010 The Chromium Authors. All rights reserved.
[email protected]4d37c8742010-07-20 00:34:572// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef REMOTING_CLIENT_CLIENT_CONTEXT_H_
6#define REMOTING_CLIENT_CLIENT_CONTEXT_H_
7
8#include <string>
9
[email protected]34b99632011-01-01 01:01:0610#include "base/threading/thread.h"
[email protected]4d37c8742010-07-20 00:34:5711#include "remoting/jingle_glue/jingle_thread.h"
12
13namespace remoting {
14
15// A class that manages threads and running context for the chromoting client
[email protected]1e7bea32011-08-04 14:53:4216// process.
[email protected]4d37c8742010-07-20 00:34:5717class ClientContext {
18 public:
19 ClientContext();
[email protected]1e7bea32011-08-04 14:53:4220 virtual ~ClientContext();
[email protected]4d37c8742010-07-20 00:34:5721
22 void Start();
23 void Stop();
24
25 JingleThread* jingle_thread();
[email protected]4d37c8742010-07-20 00:34:5726
27 MessageLoop* main_message_loop();
28 MessageLoop* decode_message_loop();
[email protected]bfea073c2011-06-24 20:11:3829 MessageLoop* network_message_loop();
[email protected]4d37c8742010-07-20 00:34:5730
31 private:
32 // A thread that handles Jingle network operations (used in
33 // JingleHostConnection).
34 JingleThread jingle_thread_;
35
36 // A thread that handles capture rate control and sending data to the
37 // HostConnection.
38 base::Thread main_thread_;
39
40 // A thread that handles all decode operations.
41 base::Thread decode_thread_;
42
[email protected]4d37c8742010-07-20 00:34:5743 DISALLOW_COPY_AND_ASSIGN(ClientContext);
44};
45
46} // namespace remoting
47
48#endif // REMOTING_CLIENT_CLIENT_CONTEXT_H_