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

Unified Diff: content/common/message_port_messages.h

Issue 921013002: Optionally have MessagePort pass data as base::Value, part 1. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@n-c-move-v8-value-converter
Patch Set: Update singly-included comment Created 5 years, 10 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 | « content/child/webmessageportchannel_impl.cc ('k') | content/content_common.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/message_port_messages.h
diff --git a/content/common/message_port_messages.h b/content/common/message_port_messages.h
index be435be33482b9ad6861e28475f6a4b4759ece25..be748a87ab014747282dc86ba1acae607a11843a 100644
--- a/content/common/message_port_messages.h
+++ b/content/common/message_port_messages.h
@@ -14,6 +14,7 @@
#include "base/basictypes.h"
#include "base/strings/string16.h"
#include "content/common/content_export.h"
+#include "content/public/common/message_port_types.h"
#include "ipc/ipc_message_macros.h"
#include "ipc/ipc_message_utils.h"
@@ -21,21 +22,26 @@
#define IPC_MESSAGE_EXPORT CONTENT_EXPORT
#define IPC_MESSAGE_START MessagePortMsgStart
-// Singly-included section, not converted.
+// Singly-included section for typedefs.
#ifndef CONTENT_COMMON_MESSAGE_PORT_MESSAGES_H_
#define CONTENT_COMMON_MESSAGE_PORT_MESSAGES_H_
-typedef std::pair<base::string16, std::vector<int> > QueuedMessage;
+typedef std::pair<content::MessagePortMessage, std::vector<int>> QueuedMessage;
#endif // CONTENT_COMMON_MESSAGE_PORT_MESSAGES_H_
+IPC_STRUCT_TRAITS_BEGIN(content::MessagePortMessage)
+ IPC_STRUCT_TRAITS_MEMBER(message_as_string)
+ IPC_STRUCT_TRAITS_MEMBER(message_as_value)
+IPC_STRUCT_TRAITS_END()
+
//-----------------------------------------------------------------------------
// MessagePort messages
// These are messages sent from the browser to child processes.
// Sends a message to a message port.
IPC_MESSAGE_ROUTED3(MessagePortMsg_Message,
- base::string16 /* message */,
+ content::MessagePortMessage /* message */,
std::vector<int> /* sent_message_port_ids */,
std::vector<int> /* new_routing_ids */)
@@ -62,7 +68,7 @@ IPC_MESSAGE_CONTROL1(MessagePortHostMsg_DestroyMessagePort,
// as well if sent_message_port_id != MSG_ROUTING_NONE.
IPC_MESSAGE_CONTROL3(MessagePortHostMsg_PostMessage,
int /* sender_message_port_id */,
- base::string16 /* message */,
+ content::MessagePortMessage /* message */,
std::vector<int> /* sent_message_port_ids */)
// Causes messages sent to the remote port to be delivered to this local port.
« no previous file with comments | « content/child/webmessageportchannel_impl.cc ('k') | content/content_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698