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

Side by Side Diff: remoting/client/client_context.h

Issue 7633009: Use MessageLoopProxy for network message loop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 4 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
« no previous file with comments | « remoting/client/chromoting_client.cc ('k') | remoting/client/client_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
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_CLIENT_CLIENT_CONTEXT_H_ 5 #ifndef REMOTING_CLIENT_CLIENT_CONTEXT_H_
6 #define REMOTING_CLIENT_CLIENT_CONTEXT_H_ 6 #define REMOTING_CLIENT_CLIENT_CONTEXT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/message_loop_proxy.h"
10 #include "base/threading/thread.h" 11 #include "base/threading/thread.h"
11 12
12 namespace remoting { 13 namespace remoting {
13 14
14 // A class that manages threads and running context for the chromoting client 15 // A class that manages threads and running context for the chromoting client
15 // process. 16 // process.
16 class ClientContext { 17 class ClientContext {
17 public: 18 public:
18 ClientContext(); 19 ClientContext();
19 virtual ~ClientContext(); 20 virtual ~ClientContext();
20 21
21 void Start(); 22 void Start();
22 void Stop(); 23 void Stop();
23 24
24 MessageLoop* main_message_loop(); 25 MessageLoop* main_message_loop();
25 MessageLoop* decode_message_loop(); 26 MessageLoop* decode_message_loop();
26 MessageLoop* network_message_loop(); 27 base::MessageLoopProxy* network_message_loop();
27 28
28 private: 29 private:
29 // A thread that handles capture rate control and sending data to the 30 // A thread that handles capture rate control and sending data to the
30 // HostConnection. 31 // HostConnection.
31 base::Thread main_thread_; 32 base::Thread main_thread_;
32 33
33 // A thread that handles all decode operations. 34 // A thread that handles all decode operations.
34 base::Thread decode_thread_; 35 base::Thread decode_thread_;
35 36
36 // A thread that handles all network IO. 37 // A thread that handles all network IO.
38 //
39 // TODO(sergeyu): Remove |network_thread_| and use main plugin
40 // message loop for network IO.
37 base::Thread network_thread_; 41 base::Thread network_thread_;
38 42
39 DISALLOW_COPY_AND_ASSIGN(ClientContext); 43 DISALLOW_COPY_AND_ASSIGN(ClientContext);
40 }; 44 };
41 45
42 } // namespace remoting 46 } // namespace remoting
43 47
44 #endif // REMOTING_CLIENT_CLIENT_CONTEXT_H_ 48 #endif // REMOTING_CLIENT_CLIENT_CONTEXT_H_
OLDNEW
« no previous file with comments | « remoting/client/chromoting_client.cc ('k') | remoting/client/client_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698