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

Unified Diff: ppapi/proxy/dispatcher.cc

Issue 5978003: Make IPC::Channel::Listener:OnMessageReceived have a return value indicating ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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/dispatcher.h ('k') | ppapi/proxy/interface_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/dispatcher.cc
===================================================================
--- ppapi/proxy/dispatcher.cc (revision 70108)
+++ ppapi/proxy/dispatcher.cc (working copy)
@@ -87,28 +87,32 @@
return true;
}
-void Dispatcher::OnMessageReceived(const IPC::Message& msg) {
+bool Dispatcher::OnMessageReceived(const IPC::Message& msg) {
// Control messages.
if (msg.routing_id() == MSG_ROUTING_CONTROL) {
+ bool handled = true;
IPC_BEGIN_MESSAGE_MAP(Dispatcher, msg)
IPC_MESSAGE_HANDLER(PpapiMsg_DeclareInterfaces,
OnMsgDeclareInterfaces)
IPC_MESSAGE_HANDLER(PpapiMsg_SupportsInterface, OnMsgSupportsInterface)
IPC_MESSAGE_FORWARD(PpapiMsg_ExecuteCallback, &callback_tracker_,
CallbackTracker::ReceiveExecuteSerializedCallback)
+ IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
- return;
+ return handled;
}
// Interface-specific messages.
if (msg.routing_id() > 0 && msg.routing_id() < INTERFACE_ID_COUNT) {
InterfaceProxy* proxy = id_to_proxy_[msg.routing_id()];
if (proxy)
- proxy->OnMessageReceived(msg);
- else
- NOTREACHED();
+ return proxy->OnMessageReceived(msg);
+
+ NOTREACHED();
// TODO(brettw): kill the plugin if it starts sending invalid messages?
}
+
+ return false;
}
void Dispatcher::SetSerializationRules(
« no previous file with comments | « ppapi/proxy/dispatcher.h ('k') | ppapi/proxy/interface_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698