Chromium Code Reviews| 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 // File-level comment to appease parser. Eventually this will not be necessary. | 5 // File-level comment to appease parser. Eventually this will not be necessary. |
| 6 | 6 |
| 7 [nodoc] namespace experimental.pushMessaging{ | 7 [nodoc] namespace experimental.pushMessaging{ |
| 8 dictionary Message { | 8 dictionary Message { |
| 9 // The subchannel the message was sent on. | 9 // The subchannel the message was sent on. |
| 10 long subchannelId; | 10 long subchannelId; |
| 11 | 11 |
| 12 // The payload associated with the message, if any. | 12 // The payload associated with the message, if any. |
| 13 DOMString payload; | 13 DOMString payload; |
| 14 }; | 14 }; |
| 15 | 15 |
| 16 dictionary ChannelIdResult { | |
| 17 // The subchannel the message was sent on. | |
| 18 long status; | |
| 19 | |
| 20 // The payload associated with the message, if any. | |
| 21 DOMString channelId; | |
| 22 }; | |
| 23 | |
| 24 callback ChannelIdCallback = void (ChannelIdResult channelId); | |
| 25 | |
| 26 interface Functions { | |
| 27 // Async calculate the channel ID for the app to give to its push server | |
|
dcheng
2012/08/20 19:10:01
These comments will end up in the generated docume
Pete Williamson
2012/08/20 20:53:05
Done.
| |
| 28 // the callback function recieves the channel ID as a string | |
| 29 static void getChannelId(ChannelIdCallback callback); | |
| 30 }; | |
| 31 | |
| 16 interface Events { | 32 interface Events { |
| 17 // Fired when a push message has been received. | 33 // Fired when a push message has been received. |
| 18 // |message| : The details associated with the message. | 34 // |message| : The details associated with the message. |
| 19 static void onMessage(Message message); | 35 static void onMessage(Message message); |
| 20 }; | 36 }; |
| 21 }; | 37 }; |
| OLD | NEW |