Cast: Stop logging kVideoFrameSentToEncoder and rename a couple events.
[chromium-blink-merge.git] / chrome / common / extensions / api / push_messaging.idl
blob0f6917542248db1a813fd7b91b7a668a333b924d
1 // Copyright (c) 2012 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.
5 // Use <code>chrome.pushMessaging</code> to enable apps and extensions to
6 // receive message data sent through
7 // <a href="cloudMessaging.html">Google Cloud Messaging</a>.
8 namespace pushMessaging {
10 dictionary Message {
11 // The subchannel the message was sent on;
12 // only values 0-3 are valid.
13 long subchannelId;
15 // The payload associated with the message, if any. This should not contain
16 // any personally identifiable information.
17 DOMString payload;
20 dictionary ChannelIdResult {
21 // The channel ID for this app to use for push messaging.
22 DOMString channelId;
25 callback ChannelIdCallback = void (ChannelIdResult channelId);
27 interface Functions {
28 // Retrieves the channel ID associated with this app or extension.
29 // Typically an app or extension will want to send this value
30 // to its application server so the server can use it
31 // to trigger push messages back to the app or extension.
32 // If the interactive flag is set, we will ask the user to log in
33 // when they are not already logged in.
34 static void getChannelId(optional boolean interactive,
35 ChannelIdCallback callback);
38 interface Events {
39 // Fired when a push message has been received.
40 // |message| : The details associated with the message.
41 static void onMessage(Message message);