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

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: Created 6 years, 12 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..eaff4ad7e585a284dcd71db0c8723681598f024e
--- /dev/null
+++ b/chrome/common/extensions/docs/templates/articles/manifest/sockets.html
@@ -0,0 +1,39 @@
+<h1>sockets</h1>
+
+<p>
+The <code>sockets</code> manifest property declares which permissions are
+available for the <a href="../sockets_udp.html">chrome.sockets.udp</a>, <a href="../sockets_tcp.html">chrome.sockets.tcp</a> and <a href="../sockets_tcp_server.html">chrome.sockets.tcpServer</a> APIs.
not at google - send to devlin 2014/01/03 03:02:14 ben wells did some work to make $ref's work from d
rpaquay 2014/01/06 22:28:29 Done.
+</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>
+
not at google - send to devlin 2014/01/03 03:02:14 this should probably go in its own <section>, see
rpaquay 2014/01/06 22:28:29 This article follows the same pattern as "external
+<h2 id="reference">Reference</h2>
+<p class="api_reference">
+{{+partials.type type:apis.manifestTypes.byName.sockets/}}
+</p>

Powered by Google App Engine
This is Rietveld 408576698