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

Unified Diff: remoting/host/chromoting_host_context.h

Issue 6489031: Run event executor on the ui thread to remove the need to explicitly XFlush() the XTest calls. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fixed glint warnings. Created 9 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: remoting/host/chromoting_host_context.h
diff --git a/remoting/host/chromoting_host_context.h b/remoting/host/chromoting_host_context.h
index 17b57ffe2d3edb94e099f50de831ba7e22715076..3b647f5dec0e51face0e94f83a059d91239ab667 100644
--- a/remoting/host/chromoting_host_context.h
+++ b/remoting/host/chromoting_host_context.h
@@ -17,7 +17,10 @@ namespace remoting {
// process.
class ChromotingHostContext {
public:
- ChromotingHostContext();
+ // Create a context attached to the specified ui message loop. Since there
+ // can only be one such loop on UNIX platforms, it has to be passed into
+ // this object rather than being owned by it.
+ explicit ChromotingHostContext(MessageLoop* ui_message_loop);
virtual ~ChromotingHostContext();
// TODO(ajwong): Move the Start/Stop methods out of this class. Then
@@ -32,6 +35,7 @@ class ChromotingHostContext {
virtual MessageLoop* main_message_loop();
virtual MessageLoop* encode_message_loop();
virtual MessageLoop* network_message_loop();
+ MessageLoop* ui_message_loop();
private:
FRIEND_TEST_ALL_PREFIXES(ChromotingHostContextTest, StartAndStop);
@@ -45,6 +49,9 @@ class ChromotingHostContext {
// A thread that hosts all encode operations.
base::Thread encode_thread_;
+ // The main message loop.
+ MessageLoop* ui_message_loop_;
+
DISALLOW_COPY_AND_ASSIGN(ChromotingHostContext);
};

Powered by Google App Engine
This is Rietveld 408576698