Index: components/webmessaging/broadcast_channel.mojom |
diff --git a/components/webmessaging/broadcast_channel.mojom b/components/webmessaging/broadcast_channel.mojom |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7ce0ddd189b79feec07746a9ecfcb279aa8c1a44 |
--- /dev/null |
+++ b/components/webmessaging/broadcast_channel.mojom |
@@ -0,0 +1,21 @@ |
+// 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; |
+ |
+interface BroadcastChannelClient { |
+ // Messages are passed as SerializedScriptValue. |
+ OnMessage(string message); |
+}; |
+ |
+interface BroadcastChannelService { |
+ // 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 BroadcastChannelService to ensure correct ordering of |
+ // messages. |
+ // TODO(mek): Use correct type to represent origin. |
+ ConnectToChannel(string origin, string name, associated BroadcastChannelClient receiver, associated BroadcastChannelClient& sender); |
Ken Rockot(use gerrit already)
2016/05/21 00:01:18
It seems like we could simplify this by avoiding a
Marijn Kruisselbrink
2016/05/21 00:34:21
It would be possible to have a mojo API that is mo
Marijn Kruisselbrink
2016/05/21 00:36:15
And maybe I should just implement it, to see just
Marijn Kruisselbrink
2016/05/31 23:40:53
Okay, I ended up implementing something with a moj
|
+}; |