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

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: 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
Index: ppapi/proxy/message_handler.cc
diff --git a/ppapi/proxy/message_handler.cc b/ppapi/proxy/message_handler.cc
index af9a45f8380eea2def1013c930d6453c628b8534..9ac57e017bd704f54bcf01bf2aa72003250b3256 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"
@@ -93,10 +95,8 @@ MessageHandler::~MessageHandler() {
if (message_loop_->message_loop_proxy().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_->message_loop_proxy()->PostTask(
+ FROM_HERE, base::Bind(handler_if_->Destroy, instance_, user_data_));
}
}
@@ -105,23 +105,19 @@ bool MessageHandler::LoopIsValid() const {
}
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_->message_loop_proxy()->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_->message_loop_proxy()->PostTask(
bbudge 2015/06/10 20:57:46 Looks like this was missed.
Sami 2015/06/11 18:03:46 message_loop_ is a MessageLoopResource, not a base
+ FROM_HERE,
+ RunWhileLocked(base::Bind(
+ &HandleBlockingMessageWrapper, handler_if_->HandleBlockingMessage,
+ instance_, user_data_, var, base::Passed(reply_msg.Pass()))));
}
MessageHandler::MessageHandler(

Powered by Google App Engine
This is Rietveld 408576698