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

Unified Diff: ppapi/proxy/plugin_main_nacl.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 | « ppapi/proxy/plugin_globals.cc ('k') | ppapi/proxy/plugin_message_filter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/plugin_main_nacl.cc
diff --git a/ppapi/proxy/plugin_main_nacl.cc b/ppapi/proxy/plugin_main_nacl.cc
index f050778227cad4eef35c4f1c26f59fe1a6ccbcbe..bced1083f0d53bcc310c187c24f5ed6d00702640 100644
--- a/ppapi/proxy/plugin_main_nacl.cc
+++ b/ppapi/proxy/plugin_main_nacl.cc
@@ -26,7 +26,9 @@
#include "ppapi/native_client/src/shared/ppapi_proxy/ppruntime.h"
#include "ppapi/proxy/plugin_dispatcher.h"
#include "ppapi/proxy/plugin_globals.h"
+#include "ppapi/proxy/plugin_message_filter.h"
#include "ppapi/proxy/plugin_proxy_delegate.h"
+#include "ppapi/proxy/resource_reply_thread_registrar.h"
#include "ppapi/shared_impl/ppb_audio_shared.h"
#if defined(IPC_MESSAGE_LOG_ENABLED)
@@ -91,9 +93,6 @@ class PpapiDispatcher : public ProxyChannel,
void OnMsgCreateNaClChannel(int renderer_id,
const ppapi::PpapiNaClChannelArgs& args,
SerializedHandle handle);
- void OnMsgResourceReply(
- const ppapi::proxy::ResourceMessageReplyParams& reply_params,
- const IPC::Message& nested_msg);
void OnPluginDispatcherMessageReceived(const IPC::Message& msg);
std::set<PP_Instance> instances_;
@@ -113,6 +112,8 @@ PpapiDispatcher::PpapiDispatcher(scoped_refptr<base::MessageLoopProxy> io_loop)
// NaCl sandbox.
InitWithChannel(this, base::kNullProcessId, channel_handle,
false); // Channel is server.
+ channel()->AddFilter(new ppapi::proxy::PluginMessageFilter(
+ NULL, PluginGlobals::Get()->resource_reply_thread_registrar()));
channel()->AddFilter(
new tracing::ChildTraceMessageFilter(message_loop_.get()));
}
@@ -186,7 +187,6 @@ PP_Resource PpapiDispatcher::CreateBrowserFont(
bool PpapiDispatcher::OnMessageReceived(const IPC::Message& msg) {
IPC_BEGIN_MESSAGE_MAP(PpapiDispatcher, msg)
IPC_MESSAGE_HANDLER(PpapiMsg_CreateNaClChannel, OnMsgCreateNaClChannel)
- IPC_MESSAGE_HANDLER(PpapiPluginMsg_ResourceReply, OnMsgResourceReply)
// All other messages are simply forwarded to a PluginDispatcher.
IPC_MESSAGE_UNHANDLED(OnPluginDispatcherMessageReceived(msg))
IPC_END_MESSAGE_MAP()
@@ -235,13 +235,6 @@ void PpapiDispatcher::OnMsgCreateNaClChannel(
// lifetime of the attached channel.
}
-void PpapiDispatcher::OnMsgResourceReply(
- const ppapi::proxy::ResourceMessageReplyParams& reply_params,
- const IPC::Message& nested_msg) {
- ppapi::proxy::PluginDispatcher::DispatchResourceReply(reply_params,
- nested_msg);
-}
-
void PpapiDispatcher::OnPluginDispatcherMessageReceived(
const IPC::Message& msg) {
// The first parameter should be a plugin dispatcher ID.
« no previous file with comments | « ppapi/proxy/plugin_globals.cc ('k') | ppapi/proxy/plugin_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698