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

Unified Diff: ipc/ipc_message_templates.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 | « ipc/ipc_message_macros.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_message_templates.h
diff --git a/ipc/ipc_message_templates.h b/ipc/ipc_message_templates.h
index f5c28cca4a68978b3b5794d12a9d5e7108726eee..57f5cf0b95e1b8b4f3b136e701c16078a7edde2d 100644
--- a/ipc/ipc_message_templates.h
+++ b/ipc/ipc_message_templates.h
@@ -162,7 +162,7 @@ class MessageT<Meta, std::tuple<Ins...>, std::tuple<Outs...>>
static bool Dispatch(const Message* msg,
T* obj,
S* sender,
- P* parameter,
+ P* /* parameter */,
Method func) {
TRACE_EVENT0("ipc", Meta::kName);
SendParam send_params;
@@ -184,7 +184,7 @@ class MessageT<Meta, std::tuple<Ins...>, std::tuple<Outs...>>
template <class T, class P, class Method>
static bool DispatchDelayReply(const Message* msg,
T* obj,
- P* parameter,
+ P* /* parameter */,
Method func) {
TRACE_EVENT0("ipc", Meta::kName);
SendParam send_params;
@@ -202,6 +202,29 @@ class MessageT<Meta, std::tuple<Ins...>, std::tuple<Outs...>>
return ok;
}
+ template <class T, class P, class Method>
+ static bool DispatchWithParamDelayReply(const Message* msg,
+ T* obj,
+ P* parameter,
+ Method func) {
+ TRACE_EVENT0("ipc", Meta::kName);
+ SendParam send_params;
+ bool ok = ReadSendParam(msg, &send_params);
+ Message* reply = SyncMessage::GenerateReply(msg);
+ if (ok) {
+ std::tuple<Message&> t = std::tie(*reply);
+ ConnectMessageAndReply(msg, reply);
+ std::tuple<P*> parameter_tuple(parameter);
+ auto concat_params = std::tuple_cat(parameter_tuple, send_params);
+ base::DispatchToMethod(obj, func, concat_params, &t);
+ } else {
+ NOTREACHED() << "Error deserializing message " << msg->type();
+ reply->set_reply_error();
+ obj->Send(reply);
+ }
+ return ok;
+ }
+
private:
MessageT(Routing routing, const Ins&... ins, Outs*... outs);
};
« no previous file with comments | « ipc/ipc_message_macros.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698