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.
14 // The MIME type of the data.
17 // Data associated with the intent.
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
{
33 // Fired when an app is launched from the launcher or in response to a web
35 static
void onLaunched
(optional LaunchData launchData
);
37 // Fired at Chrome startup to apps that were running when Chrome last shut
39 static
void onRestarted
();
42 dictionary IntentResponse
{
43 // Identifies the intent.
46 // Was this intent successful? (i.e., postSuccess vs postFailure).
49 // Data associated with the intent response.
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
);