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 send message data |
| 6 // to app or extension users. |
| 7 |
| 8 [availability=24] |
5 namespace pushMessaging{ | 9 namespace pushMessaging{ |
6 | 10 |
7 dictionary Message { | 11 dictionary Message { |
8 // The subchannel the message was sent on; | 12 // The subchannel the message was sent on; |
9 // only values 0-3 are valid. | 13 // only values 0-3 are valid. |
10 long subchannelId; | 14 long subchannelId; |
11 | 15 |
12 // The payload associated with the message, if any. | 16 // The payload associated with the message, if any. |
13 DOMString payload; | 17 DOMString payload; |
14 }; | 18 }; |
(...skipping 15 matching lines...) Expand all Loading... |
30 static void getChannelId(optional boolean interactive, | 34 static void getChannelId(optional boolean interactive, |
31 ChannelIdCallback callback); | 35 ChannelIdCallback callback); |
32 }; | 36 }; |
33 | 37 |
34 interface Events { | 38 interface Events { |
35 // Fired when a push message has been received. | 39 // Fired when a push message has been received. |
36 // |message| : The details associated with the message. | 40 // |message| : The details associated with the message. |
37 static void onMessage(Message message); | 41 static void onMessage(Message message); |
38 }; | 42 }; |
39 }; | 43 }; |
OLD | NEW |