Extract SIGPIPE ignoring code to a common place.
[chromium-blink-merge.git] / chrome / common / extensions / api / push_messaging.idl
blobe8a284054f4a9737835cd83fed773a3610f8455b
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 namespace pushMessaging{
7 dictionary Message {
8 // The subchannel the message was sent on.
9 long subchannelId;
11 // The payload associated with the message, if any.
12 DOMString payload;
15 dictionary ChannelIdResult {
16 // The channel ID for this app to use for push messaging.
17 DOMString channelId;
20 callback ChannelIdCallback = void (ChannelIdResult channelId);
22 interface Functions {
23 // Retrieves the channel ID associated with this app or extension.
24 // Typically an app or extension will want to send this value
25 // to its application server so the server can use it
26 // to trigger push messages back to the app or extension.
27 // If the interactive flag is set, we will ask the user to log in
28 // when they are not already logged in.
29 static void getChannelId(optional boolean interactive,
30 ChannelIdCallback callback);
33 interface Events {
34 // Fired when a push message has been received.
35 // |message| : The details associated with the message.
36 static void onMessage(Message message);