Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: remoting/host/chromoting_host_context.h

Issue 2829018: Fix thread usage in chromoting host (Closed)
Patch Set: removed useless test Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « remoting/host/chromoting_host.cc ('k') | remoting/host/chromoting_host_context.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2010 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.
4
5 #ifndef REMOTING_CHROMOTING_HOST_CONTEXT_H_
6 #define REMOTING_CHROMOTING_HOST_CONTEXT_H_
7
8 #include <string>
9
10 #include "base/thread.h"
11 #include "remoting/jingle_glue/jingle_thread.h"
12 #include "testing/gtest/include/gtest/gtest_prod.h"
13
14 namespace remoting {
15
16 // A class that manages threads and running context for the chromoting host
17 // process.
18 class ChromotingHostContext {
19 public:
20 ChromotingHostContext();
21 virtual ~ChromotingHostContext();
22
23 virtual void Start();
24 virtual void Stop();
25
26 virtual JingleThread* jingle_thread();
27 virtual MessageLoop* main_message_loop();
28 virtual MessageLoop* capture_message_loop();
29 virtual MessageLoop* encode_message_loop();
30
31 private:
32 FRIEND_TEST(ChromotingHostContextTest, StartAndStop);
33
34 // A thread that host network operations.
35 JingleThread jingle_thread_;
36
37 // A thread that host ChromotingHost.
38 base::Thread main_thread_;
39
40 // A thread that host all capture operations.
41 base::Thread capture_thread_;
42
43 // A thread that host all encode operations.
44 base::Thread encode_thread_;
45
46 DISALLOW_COPY_AND_ASSIGN(ChromotingHostContext);
47 };
48
49 } // namespace remoting
50
51 #endif // REMOTING_HOST_CHROMOTING_HOST_CONTEXT_H_
OLDNEW
« no previous file with comments | « remoting/host/chromoting_host.cc ('k') | remoting/host/chromoting_host_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698