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

Unified Diff: ppapi/proxy/message_handler.cc

Issue 1174543002: ppapi: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix V8VarConverterTest. Created 5 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 | « ppapi/nacl_irt/ppapi_dispatcher.cc ('k') | ppapi/proxy/network_monitor_resource.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/message_handler.cc
diff --git a/ppapi/proxy/message_handler.cc b/ppapi/proxy/message_handler.cc
index af9a45f8380eea2def1013c930d6453c628b8534..9fe95b2154e14df3810c6ff0545386de1e830aaa 100644
--- a/ppapi/proxy/message_handler.cc
+++ b/ppapi/proxy/message_handler.cc
@@ -4,6 +4,8 @@
#include "ppapi/proxy/message_handler.h"
+#include "base/location.h"
+#include "base/single_thread_task_runner.h"
#include "ipc/ipc_message.h"
#include "ppapi/proxy/plugin_dispatcher.h"
#include "ppapi/proxy/ppapi_messages.h"
@@ -90,38 +92,32 @@ scoped_ptr<MessageHandler> MessageHandler::Create(
MessageHandler::~MessageHandler() {
// It's possible the message_loop_proxy is NULL if that loop has been quit.
// In that case, we unfortunately just can't call Destroy.
- if (message_loop_->message_loop_proxy().get()) {
+ if (message_loop_->task_runner().get()) {
// The posted task won't have the proxy lock, but that's OK, it doesn't
// touch any internal state; it's a direct call on the plugin's function.
- message_loop_->message_loop_proxy()->PostTask(FROM_HERE,
- base::Bind(handler_if_->Destroy,
- instance_,
- user_data_));
+ message_loop_->task_runner()->PostTask(
+ FROM_HERE, base::Bind(handler_if_->Destroy, instance_, user_data_));
}
}
bool MessageHandler::LoopIsValid() const {
- return !!message_loop_->message_loop_proxy().get();
+ return !!message_loop_->task_runner().get();
}
void MessageHandler::HandleMessage(ScopedPPVar var) {
- message_loop_->message_loop_proxy()->PostTask(FROM_HERE,
- RunWhileLocked(base::Bind(&HandleMessageWrapper,
- handler_if_->HandleMessage,
- instance_,
- user_data_,
- var)));
+ message_loop_->task_runner()->PostTask(
+ FROM_HERE, RunWhileLocked(base::Bind(&HandleMessageWrapper,
+ handler_if_->HandleMessage,
+ instance_, user_data_, var)));
}
void MessageHandler::HandleBlockingMessage(ScopedPPVar var,
scoped_ptr<IPC::Message> reply_msg) {
- message_loop_->message_loop_proxy()->PostTask(FROM_HERE,
- RunWhileLocked(base::Bind(&HandleBlockingMessageWrapper,
- handler_if_->HandleBlockingMessage,
- instance_,
- user_data_,
- var,
- base::Passed(reply_msg.Pass()))));
+ message_loop_->task_runner()->PostTask(
+ FROM_HERE,
+ RunWhileLocked(base::Bind(
+ &HandleBlockingMessageWrapper, handler_if_->HandleBlockingMessage,
+ instance_, user_data_, var, base::Passed(reply_msg.Pass()))));
}
MessageHandler::MessageHandler(
« no previous file with comments | « ppapi/nacl_irt/ppapi_dispatcher.cc ('k') | ppapi/proxy/network_monitor_resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698