| Index: remoting/host/chromoting_host_context.h
|
| diff --git a/remoting/host/chromoting_host_context.h b/remoting/host/chromoting_host_context.h
|
| index 38f1cae7d67279d9f1b745ff540cee01ec7aab7b..d893d2011e4548ef304e96521cc92a94587856c9 100644
|
| --- a/remoting/host/chromoting_host_context.h
|
| +++ b/remoting/host/chromoting_host_context.h
|
| @@ -25,12 +25,8 @@ namespace remoting {
|
| // process. This class is virtual only for testing purposes (see below).
|
| class ChromotingHostContext {
|
| public:
|
| - typedef base::Callback<void(
|
| - const tracked_objects::Location& from_here,
|
| - const base::Closure& task)> UIThreadPostTaskFunction;
|
| -
|
| // Create a context.
|
| - ChromotingHostContext();
|
| + ChromotingHostContext(base::MessageLoopProxy* ui_message_loop);
|
| virtual ~ChromotingHostContext();
|
|
|
| // TODO(ajwong): Move the Start/Stop methods out of this class. Then
|
| @@ -42,26 +38,18 @@ class ChromotingHostContext {
|
|
|
| virtual JingleThread* jingle_thread();
|
|
|
| + virtual base::MessageLoopProxy* ui_message_loop();
|
| virtual MessageLoop* main_message_loop();
|
| virtual MessageLoop* encode_message_loop();
|
| virtual base::MessageLoopProxy* network_message_loop();
|
| virtual MessageLoop* desktop_message_loop();
|
|
|
| - // Must be called from the main GUI thread.
|
| - void SetUITaskPostFunction(const UIThreadPostTaskFunction& poster);
|
| -
|
| - void PostTaskToUIThread(const tracked_objects::Location& from_here,
|
| - const base::Closure& task);
|
| - void PostDelayedTaskToUIThread(const tracked_objects::Location& from_here,
|
| - const base::Closure& task,
|
| - int delay_ms);
|
| - bool IsUIThread() const;
|
| -
|
| private:
|
| FRIEND_TEST_ALL_PREFIXES(ChromotingHostContextTest, StartAndStop);
|
|
|
| // A thread that hosts all network operations.
|
| JingleThread jingle_thread_;
|
| + scoped_refptr<base::MessageLoopProxy> network_message_loop_;
|
|
|
| // A thread that hosts ChromotingHost and performs rate control.
|
| base::Thread main_thread_;
|
| @@ -73,10 +61,7 @@ class ChromotingHostContext {
|
| // This is NOT a Chrome-style UI thread.
|
| base::Thread desktop_thread_;
|
|
|
| - UIThreadPostTaskFunction ui_poster_;
|
| - // This IS the main Chrome GUI thread that |ui_poster_| will post to.
|
| - base::PlatformThreadId ui_main_thread_id_;
|
| -
|
| + scoped_refptr<base::MessageLoopProxy> ui_message_loop_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(ChromotingHostContext);
|
| };
|
|
|