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

Unified Diff: content/ppapi_plugin/ppapi_thread.cc

Issue 46433002: Support using TrackedCallbacks as hints to determine the handling thread of resource reply messages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | « content/ppapi_plugin/ppapi_thread.h ('k') | ppapi/ppapi_proxy.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/ppapi_plugin/ppapi_thread.cc
diff --git a/content/ppapi_plugin/ppapi_thread.cc b/content/ppapi_plugin/ppapi_thread.cc
index f0db1561447c5cb8025c39dbfd2c4f69923ae304..5ed1873cce87364ef7a0aeb231b58a3bebd2cf44 100644
--- a/content/ppapi_plugin/ppapi_thread.cc
+++ b/content/ppapi_plugin/ppapi_thread.cc
@@ -36,7 +36,9 @@
#include "ppapi/c/ppp.h"
#include "ppapi/proxy/interface_list.h"
#include "ppapi/proxy/plugin_globals.h"
+#include "ppapi/proxy/plugin_message_filter.h"
#include "ppapi/proxy/ppapi_messages.h"
+#include "ppapi/proxy/resource_reply_thread_registrar.h"
#include "third_party/WebKit/public/web/WebKit.h"
#include "ui/base/ui_base_switches.h"
@@ -72,6 +74,12 @@ PpapiThread::PpapiThread(const CommandLine& command_line, bool is_broker)
webkit_platform_support_.reset(new PpapiWebKitPlatformSupportImpl);
blink::initialize(webkit_platform_support_.get());
+
+ if (!is_broker_) {
+ channel()->AddFilter(
+ new ppapi::proxy::PluginMessageFilter(
+ NULL, globals->resource_reply_thread_registrar()));
+ }
}
PpapiThread::~PpapiThread() {
@@ -104,7 +112,6 @@ bool PpapiThread::OnControlMessageReceived(const IPC::Message& msg) {
IPC_MESSAGE_HANDLER(PpapiMsg_SetNetworkState, OnSetNetworkState)
IPC_MESSAGE_HANDLER(PpapiMsg_Crash, OnCrash)
IPC_MESSAGE_HANDLER(PpapiMsg_Hang, OnHang)
- IPC_MESSAGE_HANDLER(PpapiPluginMsg_ResourceReply, OnResourceReply)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
return handled;
@@ -355,13 +362,6 @@ void PpapiThread::OnCreateChannel(base::ProcessId renderer_pid,
Send(new PpapiHostMsg_ChannelCreated(channel_handle));
}
-void PpapiThread::OnResourceReply(
- const ppapi::proxy::ResourceMessageReplyParams& reply_params,
- const IPC::Message& nested_msg) {
- ppapi::proxy::PluginDispatcher::DispatchResourceReply(reply_params,
- nested_msg);
-}
-
void PpapiThread::OnSetNetworkState(bool online) {
// Note the browser-process side shouldn't send us these messages in the
// first unless the plugin has dev permissions, so we don't need to check
« no previous file with comments | « content/ppapi_plugin/ppapi_thread.h ('k') | ppapi/ppapi_proxy.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698