Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: chrome/common/extensions/docs/templates/articles/manifest/externally_connectable.html

Issue 691283003: Write docs for options_ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@inline-type
Patch Set: fixes Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <h1>externally_connectable</h1> 1 <h1>externally_connectable</h1>
2 2
3 <p> 3 <p>
4 The <code>externally_connectable</code> manifest property declares which extensi ons, apps, and web pages can connect to your {{platform}} via <a href="../runtim e#method-connect">runtime.connect</a> and <a href="../runtime#method-sendMessage ">runtime.sendMessage</a>. 4 The <code>externally_connectable</code> manifest property declares which extensi ons, apps, and web pages can connect to your {{platform}} via <a href="../runtim e#method-connect">runtime.connect</a> and <a href="../runtime#method-sendMessage ">runtime.sendMessage</a>.
5 </p> 5 </p>
6 6
7 <p> 7 <p>
8 For a tutorial on message passing see <a href="../messaging#external">cross-exte nsion and app messaging</a> and <a href="../messaging#external-webpage">sending messages from web pages</a>. 8 For a tutorial on message passing see <a href="../messaging#external">cross-exte nsion and app messaging</a> and <a href="../messaging#external-webpage">sending messages from web pages</a>.
9 </p> 9 </p>
10 10
11 <h2 id="without-externally-connectable">Connecting without externally_connectabl e</h2> 11 <h2 id="without-externally-connectable">Connecting without externally_connectabl e</h2>
12 12
13 <p> 13 <p>
14 If <code>externally_connectable</code> is not declared in your {{platform}}'s ma nifest, all extensions and apps can connect, but no webpages can connect. As a c onsequence, when updating your manifest to use <code>externally_connectable</cod e>, if <code>"ids": ["*"]</code> is not specified then other extensions and apps will lose the ability to connect to your {{platform}}. This may be an unintende d consequence, so keep it in mind. 14 If <code>externally_connectable</code> is not declared in your {{platform}}'s ma nifest, all extensions and apps can connect, but no webpages can connect. As a c onsequence, when updating your manifest to use <code>externally_connectable</cod e>, if <code>"ids": ["*"]</code> is not specified then other extensions and apps will lose the ability to connect to your {{platform}}. This may be an unintende d consequence, so keep it in mind.
15 </p> 15 </p>
16 16
17 <h2 id="manifest">Sample manifest.json</h2> 17 <h2 id="manifest">Sample manifest.json</h2>
18 <pre data-filename="manifest.json"> 18 <pre data-filename="manifest.json">
19 { 19 {
20 "name": "My externally connectable {{platform}}", 20 "name": "My externally connectable {{platform}}",
21 "externally_connectable": { 21 "externally_connectable": {
22 // Extension and app IDs. If this field is not specified, no extensions or 22 // Extension and app IDs. If this field is not specified, no
23 // apps can connect. 23 // extensions or apps can connect.
24 "ids": [ 24 "ids": [
25 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", 25 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
26 "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", 26 "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
27 ... 27 ...
28 // Alternatively, to match all extensions and apps, specify only "*". 28 // Alternatively, to match all extensions and apps, specify only
29 // "*".
29 "*" 30 "*"
30 ], 31 ],
31 // Match patterns for web pages. Does not affect content scripts. If this 32 // Match patterns for web pages. Does not affect content scripts.
32 // field is not specified, no webpages can connect. 33 // If this field is not specified, no webpages can connect.
33 "matches": [ 34 "matches": [
34 "https://*.google.com/*", 35 "https://*.google.com/*",
35 "*://*.chromium.org/*", 36 "*://*.chromium.org/*",
36 ... 37 ...
37 ], 38 ],
38 // Indicates that the extension would like to make use of the TLS channel 39 // Indicates that the extension would like to make use of the TLS
39 // ID of the web page connecting to it. The web page must also opt to send 40 // channel ID of the web page connecting to it. The web page must
40 // the TLS channel ID to the extension via setting 41 // also opt to send the TLS channel ID to the extension via setting
41 // <code>includeTlsChannelId</code> to <code>true</code> in 42 // <code>includeTlsChannelId</code> to <code>true</code> in $(ref:runtime.co nnect)'s connectInfo
42 // $(ref:runtime.connect)'s connectInfo or $(ref:runtime.sendMessage)'s opti ons. 43 // or $(ref:runtime.sendMessage)'s options.
43 "accepts_tls_channel_id": false 44 "accepts_tls_channel_id": false
44 }, 45 },
45 ... 46 ...
46 } 47 }
47 </pre> 48 </pre>
48 49
49 <h2 id="reference">Reference</h2> 50 <h2 id="reference">Reference</h2>
50 <p class="api_reference"> 51 <p class="api_reference">
51 {{+partials.type type:data/}} 52 The externally_connectable manifest key can have the following properties:
53 {{+partials.manifest_type type:data/}}
52 </p> 54 </p>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698