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

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
« 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) 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 // |main_task_runner| is the task runner for the main plugin thread
23 // that is used for all PPAPI calls, e.g. network and graphics.
24 ClientContext(base::SingleThreadTaskRunner* main_task_runner);
20 virtual ~ClientContext(); 25 virtual ~ClientContext();
21 26
22 void Start(); 27 void Start();
23 void Stop(); 28 void Stop();
24 29
25 base::MessageLoopProxy* main_message_loop(); 30 base::SingleThreadTaskRunner* main_task_runner();
26 base::MessageLoopProxy* decode_message_loop(); 31 base::SingleThreadTaskRunner* decode_task_runner();
27 base::MessageLoopProxy* network_message_loop();
28 32
29 private: 33 private:
30 scoped_refptr<base::MessageLoopProxy> main_message_loop_proxy_; 34 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
31 35
32 // A thread that handles all decode operations. 36 // A thread that handles all decode operations.
33 base::Thread decode_thread_; 37 base::Thread decode_thread_;
34 38
35 DISALLOW_COPY_AND_ASSIGN(ClientContext); 39 DISALLOW_COPY_AND_ASSIGN(ClientContext);
36 }; 40 };
37 41
38 } // namespace remoting 42 } // namespace remoting
39 43
40 #endif // REMOTING_CLIENT_CLIENT_CONTEXT_H_ 44 #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