Index: chrome/common/extensions/api/appview_tag.idl |
diff --git a/chrome/common/extensions/api/appview_tag.idl b/chrome/common/extensions/api/appview_tag.idl |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2d8119c8b50bd9c06f27c483b7a99ca4c64be60b |
--- /dev/null |
+++ b/chrome/common/extensions/api/appview_tag.idl |
@@ -0,0 +1,46 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+// Use the <code>appview</code> tag to embed other Chrome Apps within your |
+// Chrome App. (see <a href=#usage>Usage</a>). |
+[documentation_title="<appview> Tag", |
+ documentation_namespace="<appview>", |
+ documented_in="tags/appview"] |
+namespace appviewTag { |
+ // 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 { |
+ // Optional developer specified data that the app to be embedded can use |
+ // when making an embedding decision. |
+ object data; |
+ |
+ // Allows the embedding request. |
+ // |
+ // |url| : Specifies the content to be embedded. |
+ static void allow(DOMString url); |
+ |
+ // Prevents the embedding request. |
+ static void deny(); |
+ }; |
+ |
+ // An optional function that's called after the embedding request is |
+ // completed. |
+ // |
+ // |success| : True if the embedding request succeded. |
+ callback EmbeddingCallback = void (boolean success); |
+ |
+ interface Functions { |
+ // Requests another app to be embedded. |
+ // |
+ // |app| : The extension id of the app to be embedded. |
+ // |data| : Optional developer specified data that the app to be embedded |
+ // can use when making an embedding decision. |
+ // |callback| : An optional function that's called after the embedding |
+ // request is completed. |
+ static void connect(DOMString app, optional any data, |
+ optional EmbeddingCallback callback); |
+ }; |
+}; |