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

Unified Diff: remoting/client/plugin/pepper_xmpp_proxy.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/client/plugin/pepper_view.cc ('k') | remoting/client/plugin/pepper_xmpp_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/plugin/pepper_xmpp_proxy.h
diff --git a/remoting/client/plugin/pepper_xmpp_proxy.h b/remoting/client/plugin/pepper_xmpp_proxy.h
index 40ba4bad762ab582201f3d6eddb6ed95b01afb32..0c1bc79615a3fa6663bb780b70abe60a54a2aef5 100644
--- a/remoting/client/plugin/pepper_xmpp_proxy.h
+++ b/remoting/client/plugin/pepper_xmpp_proxy.h
@@ -11,7 +11,7 @@
#include "remoting/jingle_glue/xmpp_proxy.h"
namespace base {
-class MessageLoopProxy;
+class SingleThreadTaskRunner;
} // namespace base
namespace remoting {
@@ -20,10 +20,15 @@ class PepperXmppProxy : public XmppProxy {
public:
typedef base::Callback<void(const std::string&)> SendIqCallback;
+ // |plugin_task_runner| is the thread on which |send_iq_callback| is
+ // called. Normally the callback will call JavaScript, so this has
+ // to be the task runner that corresponds to the plugin
+ // thread. |callback_task_runner| is used to call the callback
+ // registered with AttachCallback().
PepperXmppProxy(
const SendIqCallback& send_iq_callback,
- base::MessageLoopProxy* plugin_message_loop,
- base::MessageLoopProxy* callback_message_loop);
+ base::SingleThreadTaskRunner* plugin_task_runner,
+ base::SingleThreadTaskRunner* callback_task_runner);
// Registered the callback class with this object.
//
@@ -46,8 +51,8 @@ class PepperXmppProxy : public XmppProxy {
SendIqCallback send_iq_callback_;
- scoped_refptr<base::MessageLoopProxy> plugin_message_loop_;
- scoped_refptr<base::MessageLoopProxy> callback_message_loop_;
+ scoped_refptr<base::SingleThreadTaskRunner> plugin_task_runner_;
+ scoped_refptr<base::SingleThreadTaskRunner> callback_task_runner_;
// Must only be access on callback_message_loop_.
base::WeakPtr<ResponseCallback> callback_;
« no previous file with comments | « remoting/client/plugin/pepper_view.cc ('k') | remoting/client/plugin/pepper_xmpp_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698