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 // The <code>chrome.pushMessaging</code> API is deprecated since Chrome 38,
6 // and will no longer be supported in Chrome 41.
7 // Switch to <code>$(ref:gcm chrome.gcm)</code> to take advantage of
8 // <a href="cloudMessaging.html">Google Cloud Messaging</a>.
9 [deprecated
="Use $(ref:gcm chrome.gcm) API"]
10 namespace pushMessaging
{
13 // The subchannel the message was sent on;
14 // only values 0-3 are valid.
17 // The payload associated with the message, if any. This should not contain
18 // any personally identifiable information.
22 dictionary ChannelIdResult
{
23 // The channel ID for this app to use for push messaging.
27 callback ChannelIdCallback
= void (ChannelIdResult channelId
);
30 // Retrieves the channel ID associated with this app or extension.
31 // Typically an app or extension will want to send this value
32 // to its application server so the server can use it
33 // to trigger push messages back to the app or extension.
34 // If the interactive flag is set, we will ask the user to log in
35 // when they are not already logged in.
36 [deprecated
="Use $(ref:gcm chrome.gcm) API"]
37 static
void getChannelId
(optional boolean interactive
,
38 ChannelIdCallback
callback);
42 // Fired when a push message has been received.
43 // |message| : The details associated with the message.
44 [deprecated
="Use $(ref:gcm chrome.gcm) API"]
45 static
void onMessage
(Message message);