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

Side by Side 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: address dcheng's comments Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « components/webmessaging/public/interfaces/OWNERS ('k') | content/browser/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 module webmessaging.mojom;
6
7 import "url/mojo/origin.mojom";
8
9 // A pair of BroadcastChannelClient interfaces is used to represent a connection
10 // to a particular channel. One client is implemented in the browser, for
11 // messages sent from the renderer to the browser, and one client is implemented
12 // in the renderer for messages from the browser to the renderer.
13 interface BroadcastChannelClient {
14 // Messages are passed as SerializedScriptValue.
15 OnMessage(string message);
16 };
17
18 // This interface is used to set up connections to broadcast channels. All
19 // connections to channels made from the same event loop should be made
20 // through the same BroadcastChannelProvider connection to ensure correct
21 // ordering of messages.
22 // Typically the browser will have one instance of a BroadcastChannelProvider
23 // per storage partition, to which all connections from renderers in that
24 // partition are bound. This instance will then forward messages received on a
25 // particular connection to all other connections in the same storage partition
26 // with the same origin and name.
27 interface BroadcastChannelProvider {
28 // Connect to the channel identified by the |origin| and |name|. Messages can
29 // be sent to the channel using |sender|, and messages to the channel will be
30 // received by |receiver|.
31 ConnectToChannel(url.mojom.Origin origin, string name,
32 associated BroadcastChannelClient receiver,
33 associated BroadcastChannelClient& sender);
34 };
OLDNEW
« no previous file with comments | « components/webmessaging/public/interfaces/OWNERS ('k') | content/browser/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698