Extract SIGPIPE ignoring code to a common place.
[chromium-blink-merge.git] / chrome / common / extensions / api / app_runtime.idl
blob6e2c71ac4b09083d7b2a59572ad46054ff4459c5
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 app.runtime {
7 callback NullCallback = void ();
9 // A WebIntents intent object.
10 [inline_doc] dictionary Intent {
11 // The WebIntent being invoked.
12 DOMString action;
14 // The MIME type of the data.
15 DOMString type;
17 // Data associated with the intent.
18 any data;
20 // Callback to be compatible with WebIntents.
21 NullCallback postResult;
23 // Callback to be compatible with WebIntents.
24 NullCallback postFailure;
27 // Optional data for the launch.
28 [inline_doc] dictionary LaunchData {
29 Intent intent;
32 interface Events {
33 // Fired when an app is launched from the launcher or in response to a web
34 // intent.
35 static void onLaunched(optional LaunchData launchData);
37 // Fired at Chrome startup to apps that were running when Chrome last shut
38 // down.
39 static void onRestarted();
42 dictionary IntentResponse {
43 // Identifies the intent.
44 long intentId;
46 // Was this intent successful? (i.e., postSuccess vs postFailure).
47 boolean success;
49 // Data associated with the intent response.
50 any data;
53 interface Functions {
54 // postIntentResponse is an internal method to responds to an intent
55 // previously sent to a packaged app. This is identified by intentId, and
56 // should only be invoked at most once per intentId.
57 [nodoc] static void postIntentResponse(IntentResponse intentResponse);