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

Unified Diff: content/public/browser/message_port_provider.h

Issue 944443003: Step two of optionally sending messages to/from message ports as base::Value. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@n-c-message-as-values-take2
Patch Set: use auto where it makes sense 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/public/browser/message_port_delegate.h ('k') | content/public/common/message_port_types.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/message_port_provider.h
diff --git a/content/public/browser/message_port_provider.h b/content/public/browser/message_port_provider.h
index c9b657456753e8cfd63159a440b1eafa41858f8a..4fdeb8468cdcbeaea22ef53856945bf6712e92b0 100644
--- a/content/public/browser/message_port_provider.h
+++ b/content/public/browser/message_port_provider.h
@@ -15,8 +15,9 @@
namespace content {
class MessagePortDelegate;
-struct MessagePortMessage;
class WebContents;
+struct MessagePortMessage;
+struct TransferredMessagePort;
// An interface consisting of methods that can be called to use Message ports.
class CONTENT_EXPORT MessagePortProvider {
@@ -27,11 +28,12 @@ class CONTENT_EXPORT MessagePortProvider {
// See https://html.spec.whatwg.org/multipage/comms.html#messageevent for
// further information on message events.
// Should be called on UI thread.
- static void PostMessageToFrame(WebContents* web_contents,
- const base::string16& source_origin,
- const base::string16& target_origin,
- const base::string16& data,
- const std::vector<int>& ports);
+ static void PostMessageToFrame(
+ WebContents* web_contents,
+ const base::string16& source_origin,
+ const base::string16& target_origin,
+ const base::string16& data,
+ const std::vector<TransferredMessagePort>& ports);
// Creates a message channel and provide the ids of the message ports that are
// associated with this message channel.
@@ -44,9 +46,10 @@ class CONTENT_EXPORT MessagePortProvider {
int* port2);
// Posts a MessageEvent to a message port associated with a message channel.
- static void PostMessageToPort(int sender_port_id,
- const MessagePortMessage& message,
- const std::vector<int>& sent_ports);
+ static void PostMessageToPort(
+ int sender_port_id,
+ const MessagePortMessage& message,
+ const std::vector<TransferredMessagePort>& sent_ports);
// Close the message port. Should be called on IO thread.
static void ClosePort(int message_port_id);
« no previous file with comments | « content/public/browser/message_port_delegate.h ('k') | content/public/common/message_port_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698