extensions_manifest_types.json revision 010d83a9304c5a91596085d917d248abff47903a
1// Copyright 2014 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// The type schemas for structured manifest items. Not actually a callable API.
6
7[
8  {
9    "namespace": "extensionsManifestTypes",
10    "description": "Schemas for structured manifest entries",
11    "compiler_options": {
12      "generate_error_messages": true
13    },
14    "types": [
15      {
16        "id": "ExternallyConnectable",
17        "type": "object",
18        // Note: description commented out because externally_connectable.html
19        // already describes it, and the repetition looks odd.
20        // "description": "The <code>externally_connectable</code> manifest property declares which extensions, apps, and web pages can connect to your extension via $(ref:runtime.connect) and $(ref:runtime.sendMessage).",
21        "properties": {
22          "ids": {
23            "description": "<p>The IDs of extensions or apps that are allowed to connect. If left empty or unspecified, no extensions or apps can connect.</p><p>The wildcard <code>\"*\"</code> will allow all extensions and apps to connect.</p>",
24            "optional": true,
25            "type": "array",
26            "items": {"type": "string"}
27          },
28          "matches": {
29            "description": "<p>The URL patterns for <em>web pages</em> that are allowed to connect. <em>This does not affect content scripts.</em> If left empty or unspecified, no web pages can connect.</p><p>Patterns cannot include wildcard domains nor subdomains of <a href=\"http://publicsuffix.org/list/\">(effective) top level domains</a>; <code>*://google.com/*</code> and <code>http://*.chromium.org/*</code> are valid, while <code>&lt;all_urls&gt;</code>, <code>http://*/*</code>, <code>*://*.com/*</code>, and even <code>http://*.appspot.com/*</code> are not.</p>",
30            "optional": true,
31            "type": "array",
32            "items": {"type": "string"}
33          },
34          "accepts_tls_channel_id": {
35            "description": "If <code>true</code>, messages sent via $(ref:runtime.connect) or $(ref:runtime.sendMessage) will set $(ref:runtime.MessageSender.tlsChannelId) if those methods request it to be. If <code>false</code>, $(ref:runtime.MessageSender.tlsChannelId) will never be set under any circumstance.",
36            "optional": true,
37            "type": "boolean"
38          }
39        }
40      },
41      {
42        "id": "SocketHostPatterns",
43        "description": "<p>A single string or a list of strings representing host:port patterns.</p>",
44        "choices": [
45          { "type": "string" },
46          { "type": "array", "items": { "type": "string" } }
47        ]
48      },
49      {
50        "id": "sockets",
51        "type": "object",
52        "description": "The <code>sockets</code> manifest property declares which sockets operations an app can issue.",
53        "properties": {
54          "udp": {
55            "description": "The <code>udp</code> manifest property declares which sockets.udp operations an app can issue.",
56            "optional": true,
57            "type": "object",
58            "properties": {
59              "bind": {
60                "description": "<p>The host:port pattern for <code>bind</code> operations.</p>",
61                "optional": true,
62                "$ref": "SocketHostPatterns"
63              },
64              "send": {
65                "description": "<p>The host:port pattern for <code>send</code> operations.</p>",
66                "optional": true,
67                "$ref": "SocketHostPatterns"
68              },
69              "multicastMembership": {
70                "description": "<p>The host:port pattern for <code>joinGroup</code> operations.</p>",
71                "optional": true,
72                "$ref": "SocketHostPatterns"
73              }
74            }
75          },
76          "tcp": {
77            "description": "The <code>tcp</code> manifest property declares which sockets.tcp operations an app can issue.",
78            "optional": true,
79            "type": "object",
80            "properties": {
81              "connect": {
82                "description": "<p>The host:port pattern for <code>connect</code> operations.</p>",
83                "optional": true,
84                "$ref": "SocketHostPatterns"
85              }
86            }
87          },
88          "tcpServer": {
89            "description": "The <code>tcpServer</code> manifest property declares which sockets.tcpServer operations an app can issue.",
90            "optional": true,
91            "type": "object",
92            "properties": {
93              "listen": {
94                "description": "<p>The host:port pattern for <code>listen</code> operations.</p>",
95                "optional": true,
96                "$ref": "SocketHostPatterns"
97              }
98            }
99          }
100        }
101      }
102    ]
103  }
104]
105