7f8f3af6f704014acf24ceacc02063a915a32f80
[platform/framework/web/crosswalk.git] / src / chrome / common / extensions / api / manifest_types.json
1 // Copyright 2013 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": "manifestTypes",
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 (effective) top level domains; <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": "ChromeSettingsOverrides",
43         "type": "object",
44         "description": "Chrome settings which can be overriden by an extension.",
45         "properties": {
46           "bookmarks_ui": {
47             "type": "object",
48             "description": "Settings to permit bookmarks user interface customization by extensions.",
49             "optional": true,
50             "properties": {
51               "remove_button": {
52                 "type": "boolean",
53                 "description": "If <code>true</code>, the built-in bookmark button will be removed from the user interface.",
54                 "optional": true
55               },
56               // TODO(wittman): Remove for M36.
57               "hide_bookmark_button": {
58                 "type": "boolean",
59                 "description": "Deprecated. Use remove_button instead.",
60                 "optional": true
61               }
62             }
63           },
64           "homepage": {
65             "description": "New value for the homepage.",
66             "optional": true,
67             "type": "string"
68           },
69           "search_provider": {
70             "type": "object",
71             "description": "A search engine",
72             "optional": true,
73             "properties": {
74               "name": {
75                 "type": "string",
76                 "description": "Name of the search engine displayed to user."
77               },
78               "keyword": {
79                 "type": "string",
80                 "description": "Omnibox keyword for the search engine."
81               },
82               "favicon_url": {
83                 "type": "string",
84                 "description": "An icon URL for the search engine."
85               },
86               "search_url": {
87                 "type": "string",
88                 "description": "An search URL used by the search engine."
89               },
90               "encoding": {
91                 "type": "string",
92                 "description": "Encoding of the search term."
93               },
94               "suggest_url": {
95                 "type": "string",
96                 "optional": true,
97                 "description": "If omitted, this engine does not support suggestions."
98               },
99               "instant_url": {
100                 "type": "string",
101                 "optional": true,
102                 "description": "If omitted, this engine does not support instant."
103               },
104               "image_url": {
105                 "type": "string",
106                 "optional": true,
107                 "description": "If omitted, this engine does not support image search."
108               },
109               "search_url_post_params": {
110                 "type": "string",
111                 "optional": true,
112                 "description": "The string of post parameters to search_url"
113               },
114               "suggest_url_post_params": {
115                 "type": "string",
116                 "optional": true,
117                 "description": "The string of post parameters to suggest_url"
118               },
119               "instant_url_post_params": {
120                 "type": "string",
121                 "optional": true,
122                 "description": "The string of post parameters to instant_url"
123               },
124               "image_url_post_params": {
125                 "type": "string",
126                 "optional": true,
127                 "description": "The string of post parameters to image_url"
128               },
129               "alternate_urls": {
130                 "type": "array",
131                 "items": { "type": "string" },
132                 "optional": true,
133                 "description": "A list of URL patterns that can be used, in addition to |search_url|."
134               },
135               "is_default": {
136                 "type": "boolean",
137                 "description": "Specifies if the search provider should be default."
138               }
139             }
140           },
141           "startup_pages": {
142             "description": "A new startup page to be added to the list.",
143             "optional": true,
144             "type": "array",
145             "items": {"type": "string"}
146           }
147         }
148       },
149       {
150         "id": "SocketHostPatterns",
151         "description": "<p>A single string or a list of strings representing host:port patterns.</p>",
152         "choices": [
153           { "type": "string" },
154           { "type": "array", "items": { "type": "string" } }
155         ]
156       },
157       {
158         "id": "sockets",
159         "type": "object",
160         "description": "The <code>sockets</code> manifest property declares which sockets operations an app can issue.",
161         "properties": {
162           "udp": {
163             "description": "The <code>udp</code> manifest property declares which sockets.udp operations an app can issue.",
164             "optional": true,
165             "type": "object",
166             "properties": {
167               "bind": {
168                 "description": "<p>The host:port pattern for <code>bind</code> operations.</p>",
169                 "optional": true,
170                 "$ref": "SocketHostPatterns"
171               },
172               "send": {
173                 "description": "<p>The host:port pattern for <code>send</code> operations.</p>",
174                 "optional": true,
175                 "$ref": "SocketHostPatterns"
176               },
177               "multicastMembership": {
178                 "description": "<p>The host:port pattern for <code>joinGroup</code> operations.</p>",
179                 "optional": true,
180                 "$ref": "SocketHostPatterns"
181               }
182             }
183           },
184           "tcp": {
185             "description": "The <code>tcp</code> manifest property declares which sockets.tcp operations an app can issue.",
186             "optional": true,
187             "type": "object",
188             "properties": {
189               "connect": {
190                 "description": "<p>The host:port pattern for <code>connect</code> operations.</p>",
191                 "optional": true,
192                 "$ref": "SocketHostPatterns"
193               }
194             }
195           },
196           "tcpServer": {
197             "description": "The <code>tcpServer</code> manifest property declares which sockets.tcpServer operations an app can issue.",
198             "optional": true,
199             "type": "object",
200             "properties": {
201               "listen": {
202                 "description": "<p>The host:port pattern for <code>listen</code> operations.</p>",
203                 "optional": true,
204                 "$ref": "SocketHostPatterns"
205               }
206             }
207           }
208         }
209       }
210     ]
211   }
212 ]