Chromium Code Reviews| 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..b003f12d7b3ae9c905f158491d83c59764f2c93c |
| --- /dev/null |
| +++ b/components/webmessaging/public/interfaces/broadcast_channel.mojom |
| @@ -0,0 +1,23 @@ |
| +// 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 { |
| + // 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. |
| + Subscribe(url.mojom.Origin origin, string name, associated BroadcastChannelClient client); |
|
Ken Rockot(use gerrit already)
2016/06/01 16:07:50
Sorry, I think I may have lost track of exactly wh
Marijn Kruisselbrink
2016/06/01 21:37:12
No, that's not the case I'm concerned about. What
Ken Rockot(use gerrit already)
2016/06/01 21:47:08
Oh, right. I guess it's really the same thing, but
Marijn Kruisselbrink
2016/06/01 22:07:58
Since (with the implementation that only one Broad
|
| + Broadcast(url.mojom.Origin origin, string name, string message); |
| +}; |