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

Unified Diff: ipc/ipc_message_utils_impl.h

Issue 7768001: Add support for exporting IPC messages from component DLLs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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
« no previous file with comments | « ipc/ipc_message_utils.h ('k') | ipc/sync_socket_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_message_utils_impl.h
===================================================================
--- ipc/ipc_message_utils_impl.h (revision 98434)
+++ ipc/ipc_message_utils_impl.h (working copy)
@@ -12,14 +12,12 @@
namespace IPC {
template <class ParamType>
-MessageWithTuple<ParamType>::MessageWithTuple(
- int32 routing_id, uint32 type, const RefParam& p)
- : Message(routing_id, type, PRIORITY_NORMAL) {
- WriteParam(this, p);
+void MessageSchema<ParamType>::Write(Message* msg, const RefParam& p) {
+ WriteParam(msg, p);
}
template <class ParamType>
-bool MessageWithTuple<ParamType>::Read(const Message* msg, Param* p) {
+bool MessageSchema<ParamType>::Read(const Message* msg, Param* p) {
void* iter = NULL;
if (ReadParam(msg, &iter, p))
return true;
@@ -27,29 +25,22 @@
return false;
}
-// We can't migrate the template for Log() to MessageWithTuple, because each
-// subclass needs to have Log() to call Read(), which instantiates the above
-// template.
-
template <class SendParamType, class ReplyParamType>
-MessageWithReply<SendParamType, ReplyParamType>::MessageWithReply(
- int32 routing_id, uint32 type,
- const RefSendParam& send,
- const ReplyParam& reply)
- : SyncMessage(routing_id, type, PRIORITY_NORMAL,
- new ParamDeserializer<ReplyParam>(reply)) {
- WriteParam(this, send);
+void SyncMessageSchema<SendParamType, ReplyParamType>::Write(
+ Message* msg,
+ const RefSendParam& send) {
+ WriteParam(msg, send);
}
template <class SendParamType, class ReplyParamType>
-bool MessageWithReply<SendParamType, ReplyParamType>::ReadSendParam(
+bool SyncMessageSchema<SendParamType, ReplyParamType>::ReadSendParam(
const Message* msg, SendParam* p) {
void* iter = SyncMessage::GetDataIterator(msg);
return ReadParam(msg, &iter, p);
}
template <class SendParamType, class ReplyParamType>
-bool MessageWithReply<SendParamType, ReplyParamType>::ReadReplyParam(
+bool SyncMessageSchema<SendParamType, ReplyParamType>::ReadReplyParam(
const Message* msg, typename TupleTypes<ReplyParam>::ValueTuple* p) {
void* iter = SyncMessage::GetDataIterator(msg);
return ReadParam(msg, &iter, p);
« no previous file with comments | « ipc/ipc_message_utils.h ('k') | ipc/sync_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698