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

Unified Diff: ipc/ipc_message_macros.h

Issue 2426503002: Make printing work better with OOPIF. (Closed)
Patch Set: Check GetFrameToPrint and remove another TODO 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
Index: ipc/ipc_message_macros.h
diff --git a/ipc/ipc_message_macros.h b/ipc/ipc_message_macros.h
index 38f428e90aaa185f59cefe4fee46d9a5ed6546f4..0e5658c494511177caeb5e066fd64b0eef68e55f 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,19 @@
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;
nasko 2016/11/14 20:28:52 nit: break on a new line.
Lei Zhang 2016/11/14 23:52:48 Done.
+
+#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: { \

Powered by Google App Engine
This is Rietveld 408576698