| OLD | NEW |
| (Empty) | |
| 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. |
| 4 |
| 5 namespace app.runtime { |
| 6 |
| 7 callback NullCallback = void (); |
| 8 |
| 9 // A WebIntents intent object. Deprecated. |
| 10 [nodoc] dictionary Intent { |
| 11 // The WebIntent being invoked. |
| 12 DOMString action; |
| 13 |
| 14 // The MIME type of the data. |
| 15 DOMString type; |
| 16 |
| 17 // Data associated with the intent. |
| 18 any data; |
| 19 |
| 20 // Callback to be compatible with WebIntents. |
| 21 NullCallback postResult; |
| 22 |
| 23 // Callback to be compatible with WebIntents. |
| 24 NullCallback postFailure; |
| 25 }; |
| 26 |
| 27 [inline_doc] dictionary LaunchItem { |
| 28 // FileEntry for the file. |
| 29 [instanceOf=FileEntry] object entry; |
| 30 |
| 31 // The MIME type of the file. |
| 32 DOMString type; |
| 33 }; |
| 34 |
| 35 // Optional data for the launch. |
| 36 [inline_doc] dictionary LaunchData { |
| 37 [nodoc] Intent intent; |
| 38 |
| 39 // The id of the file handler that the app is being invoked with. |
| 40 DOMString? id; |
| 41 |
| 42 LaunchItem[]? items; |
| 43 }; |
| 44 |
| 45 interface Events { |
| 46 // Fired when an app is launched from the launcher or in response to a web |
| 47 // intent. |
| 48 static void onLaunched(optional LaunchData launchData); |
| 49 |
| 50 // Fired at Chrome startup to apps that were running when Chrome last shut |
| 51 // down. |
| 52 static void onRestarted(); |
| 53 }; |
| 54 |
| 55 dictionary IntentResponse { |
| 56 // Identifies the intent. |
| 57 long intentId; |
| 58 |
| 59 // Was this intent successful? (i.e., postSuccess vs postFailure). |
| 60 boolean success; |
| 61 |
| 62 // Data associated with the intent response. |
| 63 any data; |
| 64 }; |
| 65 |
| 66 interface Functions { |
| 67 // postIntentResponse is an internal method to responds to an intent |
| 68 // previously sent to a packaged app. This is identified by intentId, and |
| 69 // should only be invoked at most once per intentId. |
| 70 [nodoc] static void postIntentResponse(IntentResponse intentResponse); |
| 71 }; |
| 72 }; |
| OLD | NEW |