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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/docs/templates/articles/manifest/sockets.html
diff --git a/chrome/common/extensions/docs/templates/articles/manifest/sockets.html b/chrome/common/extensions/docs/templates/articles/manifest/sockets.html
new file mode 100644
index 0000000000000000000000000000000000000000..f4685b61e5f24afc2b578ad61a0cc0383f424b1f
--- /dev/null
+++ b/chrome/common/extensions/docs/templates/articles/manifest/sockets.html
@@ -0,0 +1,42 @@
+<h1>sockets</h1>
+
+<p>
+The <code>sockets</code> manifest property declares which permissions are
+available for the $ref:sockets.udp, $ref:sockets.tcp and
+$ref:sockets.tcpServer APIs.
+</p>
+
+<h2 id="manifest">Sample manifest.json</h2>
+<pre data-filename="manifest.json">
+{
+ "name": "My Sockets {{platform}}",
+ "sockets": {
+ "udp": {
+ // Permission for chrome.sockets.udp.send:
+ // The application is allowed to send udp packets
+ // to any host:port combination.
+ "send": "*"
+ },
+ "tcp": {
+ // Permission for chrome.sockets.tcp.connect:
+ // The application is allowed to connect only to the
+ // tcp server on 127.0.0.1 port 80.
+ "connect": "127.0.0.1:80"
+ },
+ "tcpServer": {
+ // Permission for chrome.sockets.tcpServer.listen:
+ // The application is allowed to accept new client
+ // connections on the local address at port 80.
+ "listen": "127.0.0.1:80"
+ }
+ },
+ ...
+}
+</pre>
+
+<section>
+<h2 id="reference">Reference</h2>
+<p class="api_reference">
+{{+partials.type type:apis.manifestTypes.byName.sockets/}}
+</p>
+</section>
« 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