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

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

Issue 94093013: Add documentation for the chrome.sockets API and manifest key. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address code review feedback. Created 6 years, 11 months 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
(Empty)
1 <h1>sockets</h1>
2
3 <p>
4 The <code>sockets</code> manifest property declares which permissions are
5 available for the $ref:sockets.udp, $ref:sockets.tcp and
6 $ref:sockets.tcpServer APIs.
7 </p>
8
9 <h2 id="manifest">Sample manifest.json</h2>
10 <pre data-filename="manifest.json">
11 {
12 "name": "My Sockets {{platform}}",
13 "sockets": {
14 "udp": {
15 // Permission for chrome.sockets.udp.send:
16 // The application is allowed to send udp packets
17 // to any host:port combination.
18 "send": "*"
19 },
20 "tcp": {
21 // Permission for chrome.sockets.tcp.connect:
22 // The application is allowed to connect only to the
23 // tcp server on 127.0.0.1 port 80.
24 "connect": "127.0.0.1:80"
25 },
26 "tcpServer": {
27 // Permission for chrome.sockets.tcpServer.listen:
28 // The application is allowed to accept new client
29 // connections on the local address at port 80.
30 "listen": "127.0.0.1:80"
31 }
32 },
33 ...
34 }
35 </pre>
36
37 <section>
38 <h2 id="reference">Reference</h2>
39 <p class="api_reference">
40 {{+partials.type type:apis.manifestTypes.byName.sockets/}}
41 </p>
42 </section>
OLDNEW
« no previous file with comments | « chrome/common/extensions/api/sockets_udp.idl ('k') | chrome/common/extensions/docs/templates/json/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698