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

Unified Diff: components/webmessaging/public/interfaces/broadcast_channel.mojom

Issue 2004643002: Implement BroadcastChannel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: try to fix ios gyp build Created 4 years, 6 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
Index: components/webmessaging/public/interfaces/broadcast_channel.mojom
diff --git a/components/webmessaging/public/interfaces/broadcast_channel.mojom b/components/webmessaging/public/interfaces/broadcast_channel.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..e4e34926f68bf7113a386887b8993b86c2e01b4d
--- /dev/null
+++ b/components/webmessaging/public/interfaces/broadcast_channel.mojom
@@ -0,0 +1,24 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+module webmessaging.mojom;
+
+import "url/mojo/origin.mojom";
+
+interface BroadcastChannelClient {
dcheng 2016/06/30 08:23:11 Nit: can we add some sort of interface-level comme
Marijn Kruisselbrink 2016/06/30 17:21:56 Added some explicit comments to this interface.
+ // Messages are passed as SerializedScriptValue.
+ OnMessage(string message);
+};
+
+interface BroadcastChannelProvider {
dcheng 2016/06/30 08:23:12 Is there expected to be one of these in the browse
Marijn Kruisselbrink 2016/06/30 17:21:56 A content::BrowserContext (chrome::Profile) consis
+ // Connect to the channel identified by the |origin| and |name|. Messages can
+ // be sent to the channel using |sender|, and messages to the channel will be
+ // received by |receiver|.
+ // All connections to channels made from the same event loop should be made
+ // through the same BroadcastChannelProvider to ensure correct ordering of
+ // messages.
+ ConnectToChannel(url.mojom.Origin origin, string name,
+ associated BroadcastChannelClient receiver,
+ associated BroadcastChannelClient& sender);
+};

Powered by Google App Engine
This is Rietveld 408576698