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

Unified Diff: ppapi/proxy/dispatch_reply_message.h

Issue 281803003: Add PPAPI_BEGIN_MESSAGE_MAP and PPAPI_END_MESSAGE_MAP to be used when dispatching IPCs using PPAPI_… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 7 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/dispatch_reply_message.h
===================================================================
--- ppapi/proxy/dispatch_reply_message.h (revision 270145)
+++ ppapi/proxy/dispatch_reply_message.h (working copy)
@@ -129,6 +129,12 @@
(obj->*method)(reply_params);
}
+#define PPAPI_BEGIN_MESSAGE_MAP(class_name, msg) \
brettw 2014/05/13 21:55:33 Can you add a comment about why we need a differen
jam 2014/05/13 21:59:56 Done.
+ { \
+ typedef class_name _IpcMessageHandlerClass; \
+ const IPC::Message& ipc_message__ = msg; \
+ switch (ipc_message__.type()) { \
+
// Note that this only works for message with 1 or more parameters. For
// 0-parameter messages you need to use the _0 version below (since there are
// no params in the message).
@@ -158,6 +164,10 @@
} \
break;
+#define PPAPI_END_MESSAGE_MAP() \
+ } \
+}
+
} // namespace proxy
} // namespace ppapi

Powered by Google App Engine
This is Rietveld 408576698