c003a426e03c5fd4c40b611e35b63a8d77318ccd
[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               "remove_bookmark_shortcut": {
57                 "type": "boolean",
58                 "description": "If <code>true</code>, the built-in \"Bookmark this page...\" shortcut key is removed and the extension is permitted to override the shortcut by binding it in the commands section of the manifest.",
59                 "optional": true
60               },
61               // TODO(wittman): Remove for M36.
62               "hide_bookmark_button": {
63                 "type": "boolean",
64                 "description": "Deprecated. Use remove_button instead.",
65                 "optional": true
66               }
67             }
68           },
69           "homepage": {
70             "description": "New value for the homepage.",
71             "optional": true,
72             "type": "string"
73           },
74           "search_provider": {
75             "type": "object",
76             "description": "A search engine",
77             "optional": true,
78             "properties": {
79               "name": {
80                 "type": "string",
81                 "description": "Name of the search engine displayed to user."
82               },
83               "keyword": {
84                 "type": "string",
85                 "description": "Omnibox keyword for the search engine."
86               },
87               "favicon_url": {
88                 "type": "string",
89                 "description": "An icon URL for the search engine."
90               },
91               "search_url": {
92                 "type": "string",
93                 "description": "An search URL used by the search engine."
94               },
95               "encoding": {
96                 "type": "string",
97                 "description": "Encoding of the search term."
98               },
99               "suggest_url": {
100                 "type": "string",
101                 "optional": true,
102                 "description": "If omitted, this engine does not support suggestions."
103               },
104               "instant_url": {
105                 "type": "string",
106                 "optional": true,
107                 "description": "If omitted, this engine does not support instant."
108               },
109               "image_url": {
110                 "type": "string",
111                 "optional": true,
112                 "description": "If omitted, this engine does not support image search."
113               },
114               "search_url_post_params": {
115                 "type": "string",
116                 "optional": true,
117                 "description": "The string of post parameters to search_url"
118               },
119               "suggest_url_post_params": {
120                 "type": "string",
121                 "optional": true,
122                 "description": "The string of post parameters to suggest_url"
123               },
124               "instant_url_post_params": {
125                 "type": "string",
126                 "optional": true,
127                 "description": "The string of post parameters to instant_url"
128               },
129               "image_url_post_params": {
130                 "type": "string",
131                 "optional": true,
132                 "description": "The string of post parameters to image_url"
133               },
134               "alternate_urls": {
135                 "type": "array",
136                 "items": { "type": "string" },
137                 "optional": true,
138                 "description": "A list of URL patterns that can be used, in addition to |search_url|."
139               },
140               "is_default": {
141                 "type": "boolean",
142                 "description": "Specifies if the search provider should be default."
143               }
144             }
145           },
146           "startup_pages": {
147             "description": "A new startup page to be added to the list.",
148             "optional": true,
149             "type": "array",
150             "items": {"type": "string"}
151           }
152         }
153       },
154       {
155         "id": "SocketHostPatterns",
156         "description": "<p>A single string or a list of strings representing host:port patterns.</p>",
157         "choices": [
158           { "type": "string" },
159           { "type": "array", "items": { "type": "string" } }
160         ]
161       },
162       {
163         "id": "sockets",
164         "type": "object",
165         "description": "The <code>sockets</code> manifest property declares which sockets operations an app can issue.",
166         "properties": {
167           "udp": {
168             "description": "The <code>udp</code> manifest property declares which sockets.udp operations an app can issue.",
169             "optional": true,
170             "type": "object",
171             "properties": {
172               "bind": {
173                 "description": "<p>The host:port pattern for <code>bind</code> operations.</p>",
174                 "optional": true,
175                 "$ref": "SocketHostPatterns"
176               },
177               "send": {
178                 "description": "<p>The host:port pattern for <code>send</code> operations.</p>",
179                 "optional": true,
180                 "$ref": "SocketHostPatterns"
181               },
182               "multicastMembership": {
183                 "description": "<p>The host:port pattern for <code>joinGroup</code> operations.</p>",
184                 "optional": true,
185                 "$ref": "SocketHostPatterns"
186               }
187             }
188           },
189           "tcp": {
190             "description": "The <code>tcp</code> manifest property declares which sockets.tcp operations an app can issue.",
191             "optional": true,
192             "type": "object",
193             "properties": {
194               "connect": {
195                 "description": "<p>The host:port pattern for <code>connect</code> operations.</p>",
196                 "optional": true,
197                 "$ref": "SocketHostPatterns"
198               }
199             }
200           },
201           "tcpServer": {
202             "description": "The <code>tcpServer</code> manifest property declares which sockets.tcpServer operations an app can issue.",
203             "optional": true,
204             "type": "object",
205             "properties": {
206               "listen": {
207                 "description": "<p>The host:port pattern for <code>listen</code> operations.</p>",
208                 "optional": true,
209                 "$ref": "SocketHostPatterns"
210               }
211             }
212           }
213         }
214       },
215       {
216         "id": "bluetooth",
217         "type": "object",
218         "description": "The <code>bluetooth</code> manifest property give permission to an app to use the $ref:bluetooth API. A list of profile IDs can be optionally specified to enable communication with specific device types",
219         "properties": {
220           "profiles": {
221             "description": "The <code>profiles</code> manifest property declares the list of profiles an app can register.",
222             "optional": true,
223             "type": "array",
224             "items": {
225               "description": "<p>The list of profiles specified as UUID strings.</p>",
226               "type": "string"
227             }
228           }
229         }
230       }
231     ]
232   }
233 ]