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

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

Issue 10454018: MessageLoopProxy cleanups in remoting client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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"
11 #include "base/threading/thread.h" 10 #include "base/threading/thread.h"
12 11
12 namespace base {
13 class SingleThreadTaskRunner;
14 } // namespace base
15
13 namespace remoting { 16 namespace remoting {
14 17
15 // A class that manages threads and running context for the chromoting client 18 // A class that manages threads and running context for the chromoting client
16 // process. 19 // process.
17 class ClientContext { 20 class ClientContext {
18 public: 21 public:
19 ClientContext(base::MessageLoopProxy* main_message_loop_proxy); 22 ClientContext(base::SingleThreadTaskRunner* main_task_runner);
Wez 2012/06/11 22:32:44 nit: Clarify what this thread is used for, e.g. is
Sergey Ulanov 2012/06/11 23:35:56 Done.
20 virtual ~ClientContext(); 23 virtual ~ClientContext();
21 24
22 void Start(); 25 void Start();
23 void Stop(); 26 void Stop();
24 27
25 base::MessageLoopProxy* main_message_loop(); 28 base::SingleThreadTaskRunner* main_task_runner();
26 base::MessageLoopProxy* decode_message_loop(); 29 base::SingleThreadTaskRunner* decode_task_runner();
27 base::MessageLoopProxy* network_message_loop();
28 30
29 private: 31 private:
30 scoped_refptr<base::MessageLoopProxy> main_message_loop_proxy_; 32 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
31 33
32 // A thread that handles all decode operations. 34 // A thread that handles all decode operations.
33 base::Thread decode_thread_; 35 base::Thread decode_thread_;
34 36
35 DISALLOW_COPY_AND_ASSIGN(ClientContext); 37 DISALLOW_COPY_AND_ASSIGN(ClientContext);
36 }; 38 };
37 39
38 } // namespace remoting 40 } // namespace remoting
39 41
40 #endif // REMOTING_CLIENT_CLIENT_CONTEXT_H_ 42 #endif // REMOTING_CLIENT_CLIENT_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698