Index: extensions/common/api/app_runtime.idl |
diff --git a/extensions/common/api/app_runtime.idl b/extensions/common/api/app_runtime.idl |
index b094c98dade73479514b0204537deb187f90b21f..73200e3cc71869d3e75e921ec501f45290c78e12 100644 |
--- a/extensions/common/api/app_runtime.idl |
+++ b/extensions/common/api/app_runtime.idl |
@@ -42,7 +42,27 @@ namespace app.runtime { |
boolean? isKioskSession; |
}; |
+ // This object specifies details and operations to perform on the embedding |
+ // request. The app to be embedded can make a decision on whether or not to |
+ // allow the embedding and what to embed based on the embedder making the |
+ // request. |
+ dictionary EmbedRequest { |
+ DOMString embedderId; |
+ |
+ // Allows <code>embedderId</code> to embed this app in an <appview> |
+ // element. The <code>url</code> specifies the content to embed. |
+ [nocompile] static void allow(DOMString url); |
+ |
+ // Prevents <code> embedderId</code> from embedding this app in an |
+ // <appview> element. |
+ [nocompile] static void deny(); |
+ }; |
+ |
interface Events { |
+ // Fired when an embedding app requests to embed this app. This event is |
+ // only available on dev channel with the flag --enable-app-view. |
+ static void onEmbedRequested(EmbedRequest request); |
+ |
// Fired when an app is launched from the launcher. |
static void onLaunched(optional LaunchData launchData); |