OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Use <code>chrome.pushMessaging</code> to enable apps and extensions to | 5 // Use <code>chrome.pushMessaging</code> to enable apps and extensions to |
6 // receive message data sent through | 6 // receive message data sent through |
7 // <a href="cloudMessaging">Google Cloud Messaging</a>. | 7 // <a href="cloudMessaging.html">Google Cloud Messaging</a>. |
8 namespace pushMessaging { | 8 namespace pushMessaging { |
9 | 9 |
10 dictionary Message { | 10 dictionary Message { |
11 // The subchannel the message was sent on; | 11 // The subchannel the message was sent on; |
12 // only values 0-3 are valid. | 12 // only values 0-3 are valid. |
13 long subchannelId; | 13 long subchannelId; |
14 | 14 |
15 // The payload associated with the message, if any. This should not contain | 15 // The payload associated with the message, if any. This should not contain |
16 // any personally identifiable information. | 16 // any personally identifiable information. |
17 DOMString payload; | 17 DOMString payload; |
(...skipping 16 matching lines...) Expand all Loading... |
34 static void getChannelId(optional boolean interactive, | 34 static void getChannelId(optional boolean interactive, |
35 ChannelIdCallback callback); | 35 ChannelIdCallback callback); |
36 }; | 36 }; |
37 | 37 |
38 interface Events { | 38 interface Events { |
39 // Fired when a push message has been received. | 39 // Fired when a push message has been received. |
40 // |message| : The details associated with the message. | 40 // |message| : The details associated with the message. |
41 static void onMessage(Message message); | 41 static void onMessage(Message message); |
42 }; | 42 }; |
43 }; | 43 }; |
OLD | NEW |