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

Unified Diff: ipc/ipc_message_macros.h

Issue 2508923003: Make printing work better with OOPIF. (try 2) (Closed)
Patch Set: Fix android_webview Created 4 years, 1 month 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/renderer/render_view_impl.cc ('k') | ipc/ipc_message_templates.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_message_macros.h
diff --git a/ipc/ipc_message_macros.h b/ipc/ipc_message_macros.h
index 38f428e90aaa185f59cefe4fee46d9a5ed6546f4..237c4e2c56db0237f775a648bce9070cbe448341 100644
--- a/ipc/ipc_message_macros.h
+++ b/ipc/ipc_message_macros.h
@@ -180,6 +180,9 @@
// Use the IPC_MESSAGE_HANDLER_DELAY_REPLY macro instead of IPC_MESSAGE_HANDLER
// IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_SyncMessageName,
// OnSyncMessageName)
+// Unlike IPC_MESSAGE_HANDLER which works with IPC_BEGIN_MESSAGE_MAP as well as
+// IPC_BEGIN_MESSAGE_MAP_WITH_PARAM, one needs to use
+// IPC_MESSAGE_HANDLER_WITH_PARAM_DELAY_REPLY to properly handle the param.
//
// The handler function will look like:
// void OnSyncMessageName(const type1& in1, IPC::Message* reply_msg);
@@ -371,6 +374,20 @@
IPC_MESSAGE_FORWARD_DELAY_REPLY(msg_class, this, \
_IpcMessageHandlerClass::member_func)
+#define IPC_MESSAGE_FORWARD_WITH_PARAM_DELAY_REPLY(msg_class, obj, \
+ member_func) \
+ case msg_class::ID: { \
+ TRACK_RUN_IN_THIS_SCOPED_REGION(member_func); \
+ if (!msg_class::DispatchWithParamDelayReply(&ipc_message__, obj, param__, \
+ &member_func)) \
+ ipc_message__.set_dispatch_error(); \
+ } \
+ break;
+
+#define IPC_MESSAGE_HANDLER_WITH_PARAM_DELAY_REPLY(msg_class, member_func) \
+ IPC_MESSAGE_FORWARD_WITH_PARAM_DELAY_REPLY( \
+ msg_class, this, _IpcMessageHandlerClass::member_func)
+
// TODO(jar): fix chrome frame to always supply |code| argument.
#define IPC_MESSAGE_HANDLER_GENERIC(msg_class, code) \
case msg_class::ID: { \
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | ipc/ipc_message_templates.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698