Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // Use the <code>chrome.app.runtime</code> API to manage the app lifecycle. | 5 // Use the <code>chrome.app.runtime</code> API to manage the app lifecycle. |
| 6 // The app runtime manages app installation, controls the event page, and can | 6 // The app runtime manages app installation, controls the event page, and can |
| 7 // shut down the app at anytime. | 7 // shut down the app at anytime. |
| 8 namespace app.runtime { | 8 namespace app.runtime { |
| 9 | 9 |
| 10 [inline_doc] dictionary LaunchItem { | 10 [inline_doc] dictionary LaunchItem { |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 35 // The referrer URL for the <code>onLaunched</code> event triggered by a | 35 // The referrer URL for the <code>onLaunched</code> event triggered by a |
| 36 // matching URL handler in the <code>url_handlers</code> manifest key. | 36 // matching URL handler in the <code>url_handlers</code> manifest key. |
| 37 DOMString? referrerUrl; | 37 DOMString? referrerUrl; |
| 38 | 38 |
| 39 // Whether the app is being launched in a <a | 39 // Whether the app is being launched in a <a |
| 40 // href="https://support.google.com/chromebook/answer/3134673">Chrome OS | 40 // href="https://support.google.com/chromebook/answer/3134673">Chrome OS |
| 41 // kiosk session</a>. | 41 // kiosk session</a>. |
| 42 boolean? isKioskSession; | 42 boolean? isKioskSession; |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 // This object specifies details and operations to perform on the embedding | |
| 46 // request. The app to be embedded can make a decision on whether or not to | |
| 47 // allow the embedding and what to embed based on the embedder making the | |
| 48 // request. | |
| 49 dictionary AppEmbeddingRequest { | |
| 50 DOMString embedderExtensionId; | |
|
not at google - send to devlin
2014/07/08 22:10:46
"embedderId"? since this is chrome.app.runtime it
Fady Samuel
2014/07/09 15:15:48
Done.
| |
| 51 | |
| 52 // This indicates that the guest app has allowed the embedding request and | |
| 53 // has specified a |url| within the app package to embed. | |
|
not at google - send to devlin
2014/07/08 22:10:46
phrase these comments from the perspective of the
Fady Samuel
2014/07/09 15:15:48
This app decides what to embed in the embedder :-)
not at google - send to devlin
2014/07/09 15:18:11
ah right. I got my direction mixed up :)
| |
| 54 [nocompile] static void allow(DOMString url); | |
| 55 | |
| 56 // This indicates that the guest app has denied the embedding request. | |
|
not at google - send to devlin
2014/07/08 22:10:46
likewise
Fady Samuel
2014/07/09 15:15:48
Done.
| |
| 57 [nocompile] static void deny(); | |
| 58 }; | |
| 59 | |
| 45 interface Events { | 60 interface Events { |
| 61 // Fired when an embedding app requests to embed this app. | |
| 62 static void onAppEmbeddingRequest(AppEmbeddingRequest request); | |
|
not at google - send to devlin
2014/07/08 22:10:46
I think "onEmbedRequested" would be better:
- the
Fady Samuel
2014/07/09 15:15:48
Done.
| |
| 63 | |
| 46 // Fired when an app is launched from the launcher. | 64 // Fired when an app is launched from the launcher. |
| 47 static void onLaunched(optional LaunchData launchData); | 65 static void onLaunched(optional LaunchData launchData); |
| 48 | 66 |
| 49 // Fired at Chrome startup to apps that were running when Chrome last shut | 67 // Fired at Chrome startup to apps that were running when Chrome last shut |
| 50 // down. | 68 // down. |
| 51 static void onRestarted(); | 69 static void onRestarted(); |
| 52 }; | 70 }; |
| 53 }; | 71 }; |
| OLD | NEW |