Chromium Code Reviews| Index: chrome/common/extensions/docs/templates/intros/appview_tag.html |
| diff --git a/chrome/common/extensions/docs/templates/intros/appview_tag.html b/chrome/common/extensions/docs/templates/intros/appview_tag.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..6b86d08fc20cc4b1eed457e9b91316bf4a0feeeb |
| --- /dev/null |
| +++ b/chrome/common/extensions/docs/templates/intros/appview_tag.html |
| @@ -0,0 +1,32 @@ |
| +<h2 id="usage">Usage</h2> |
| + |
| +<p> |
| +Use the <code>appview</code> tag to embed other Chrome Apps within your Chrome |
| +App. |
| +</p> |
| + |
| +<p> |
| +The <code>appview</code> runs in a separate process from your app, it doesn't |
| +inherit the same permissions and is only allowed to interact with your app |
| +through asynchronous APIs. |
| +Not all apps can be embedded; apps have to explicitly allow themselves to be |
| +embedded. |
|
not at google - send to devlin
2015/03/02 23:08:10
I'm confused whether this documentation is for app
lfg
2015/03/03 20:48:47
Done.
|
| +</p> |
| + |
| +<h2 id="example">Example</h2> |
| + |
| +<p> |
| +To allow your app to be embedded into another app, you need to add a listener |
| +to your app's background page: |
| +</p> |
| + |
| +<pre>chrome.app.runtime.onEmbedRequested.addListener(function(request) {<br> request.allow("foo.html");<br>});</pre> |
|
not at google - send to devlin
2015/03/02 23:08:10
<pre data-filename="background.js">
lfg
2015/03/03 20:48:47
Done.
|
| + |
| +<p> |
| +To embed another Chrome App in your app, add the <code>appview</code> tag to |
| +your app's embedder packaged (this is the app page that will display the |
| +embedded app) and use the connect API to request the embedding of the other |
| +app. |
| +</p> |
| + |
| +<pre>var appview = document.createElement("appview");<br>document.body.appendChild(appview);<br>appview.connect(appToEmbed, {}, function(success) {});</pre> |
|
not at google - send to devlin
2015/03/02 23:08:10
Ditto.
lfg
2015/03/03 20:48:47
Done.
|