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

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

Issue 2861047: Refactor the client code. Move all x11-related code into X11View and create... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' 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 | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef REMOTING_CHROMOTING_HOST_CONTEXT_H_ 5 #ifndef REMOTING_HOST_CHROMOTING_HOST_CONTEXT_H_
6 #define REMOTING_CHROMOTING_HOST_CONTEXT_H_ 6 #define REMOTING_HOST_CHROMOTING_HOST_CONTEXT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/thread.h" 10 #include "base/thread.h"
11 #include "remoting/jingle_glue/jingle_thread.h" 11 #include "remoting/jingle_glue/jingle_thread.h"
12 #include "testing/gtest/include/gtest/gtest_prod.h" 12 #include "testing/gtest/include/gtest/gtest_prod.h"
13 13
14 namespace remoting { 14 namespace remoting {
15 15
16 // A class that manages threads and running context for the chromoting host 16 // A class that manages threads and running context for the chromoting host
17 // process. 17 // process.
18 class ChromotingHostContext { 18 class ChromotingHostContext {
19 public: 19 public:
20 ChromotingHostContext(); 20 ChromotingHostContext();
21 virtual ~ChromotingHostContext(); 21 virtual ~ChromotingHostContext();
22 22
23 virtual void Start(); 23 virtual void Start();
24 virtual void Stop(); 24 virtual void Stop();
25 25
26 virtual JingleThread* jingle_thread(); 26 virtual JingleThread* jingle_thread();
27 virtual MessageLoop* main_message_loop(); 27 virtual MessageLoop* main_message_loop();
28 virtual MessageLoop* capture_message_loop(); 28 virtual MessageLoop* capture_message_loop();
29 virtual MessageLoop* encode_message_loop(); 29 virtual MessageLoop* encode_message_loop();
30 30
31 private: 31 private:
32 FRIEND_TEST(ChromotingHostContextTest, StartAndStop); 32 FRIEND_TEST(ChromotingHostContextTest, StartAndStop);
33 33
34 // A thread that host network operations. 34 // A thread that hosts all network operations.
35 JingleThread jingle_thread_; 35 JingleThread jingle_thread_;
36 36
37 // A thread that host ChromotingHost. 37 // A thread that hosts ChromotingHost and performs rate control.
38 base::Thread main_thread_; 38 base::Thread main_thread_;
39 39
40 // A thread that host all capture operations. 40 // A thread that hosts all capture operations.
41 base::Thread capture_thread_; 41 base::Thread capture_thread_;
42 42
43 // A thread that host all encode operations. 43 // A thread that hosts all encode operations.
44 base::Thread encode_thread_; 44 base::Thread encode_thread_;
45 45
46 DISALLOW_COPY_AND_ASSIGN(ChromotingHostContext); 46 DISALLOW_COPY_AND_ASSIGN(ChromotingHostContext);
47 }; 47 };
48 48
49 } // namespace remoting 49 } // namespace remoting
50 50
51 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::ChromotingHostContext); 51 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::ChromotingHostContext);
52 52
53 #endif // REMOTING_HOST_CHROMOTING_HOST_CONTEXT_H_ 53 #endif // REMOTING_HOST_CHROMOTING_HOST_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698