Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / chrome / common / extensions / docs / templates / articles / settings_override.html
1 <h1>Settings Overrides</h1>
2
3 <p>
4 Settings overrides are a way for extensions to override selected Chrome settings.
5 </p>
6
7 <h2 id="others">Homepage, Search Provider, and Startup Pages</h2>
8 <p>
9 Here is an example how <a href="#homepage">homepage</a>, <a
10 href="#search_provider">search provider</a> and <a href="#startup_pages">startup
11 pages</a> can be modified in the <a href="manifest.html">extension
12 manifest</a>.</p>
13
14 <pre>{
15   "name": "My extension",
16   ...
17   "chrome_settings_overrides": {
18     "homepage": "http://www.homepage.com",
19     "search_provider": {
20         "name": "name.__MSG_url_domain__",
21         "keyword": "keyword.__MSG_url_domain__",
22         "search_url": "http://www.foo.__MSG_url_domain__/s?q={searchTerms}",
23         "favicon_url": "http://www.foo.__MSG_url_domain__/favicon.ico",
24         "suggest_url": "http://www.foo.__MSG_url_domain__/suggest?q={searchTerms}",
25         "instant_url": "http://www.foo.__MSG_url_domain__/instant?q={searchTerms}",
26         "image_url": "http://www.foo.__MSG_url_domain__/image?q={searchTerms}",
27         "search_url_post_params": "search_lang=__MSG_url_domain__",
28         "suggest_url_post_params": "suggest_lang=__MSG_url_domain__",
29         "instant_url_post_params": "instant_lang=__MSG_url_domain__",
30         "image_url_post_params": "image_lang=__MSG_url_domain__",
31         "alternate_urls": [
32           "http://www.moo.__MSG_url_domain__/s?q={searchTerms}",
33           "http://www.noo.__MSG_url_domain__/s?q={searchTerms}"
34         ],
35         "encoding": "UTF-8",
36         "is_default": true
37     },
38     "startup_pages": ["http://www.startup.com"]
39    },
40    "default_locale": "de",
41    ...
42 }</pre>
43
44 <p class="note">
45 <b>Note:</b> Settings overrides for <code>homepage</code>,
46 <code>search_provider</code>, and <code>startup_pages</code> are only enabled
47 in the Chrome Dev release.</p>
48
49 <h2 id="customizing">Customizing values</h2>
50 <p>Values in the manifest can be customized in the following ways:</p>
51 <ul>
52   <li>
53   All values of the <code>search_provider</code>, <code>homepage</code> and
54   <code>startup_pages</code> properties can be localized using the
55   $(ref:i18n chrome.i18n API).
56   </li>
57   <li>
58   For <a href="http://developer.chrome.com/extensions/external_extensions">external extensions</a>,
59   the <code>search_provider</code>, <code>homepage</code> and
60   <code>startup_pages</code> URL values can be parametrized using a registry key.
61   A new registry entry should be created next to the "update_url" key (see
62   instructions <a href="http://developer.chrome.com/extensions/external_extensions#registry">here</a>).
63   The value name is "install_parameter", the value data is an arbitrary string:
64   <pre>{
65     "update_url": "https://clients2.google.com/service/update2/crx",
66     "install_parameter": "Value"
67   }</pre>
68   All occurrences of the substring "__PARAM__" in the manifest URLs will be
69   substituted with the "install_parameter" value. If “install_parameter” is
70   absent, occurrences of "__PARAM__" are removed. Note that "__PARAM__" cannot
71   be part of the hostname. It needs to occur after the first '/' in the URL.
72   </li>
73 </ul>
74
75 <h2 id="reference">Reference</h2>
76 <p>
77 An extension can override one or more of the following properties in the
78 manifest:
79 </p>
80
81 <ul>
82 {{#f:apis.manifestTypes.byName.ChromeSettingsOverrides.properties}}
83   <li>
84   <p id="{{f.name}}"><b><code>{{f.name}}</code> ({{+partials.variable_type type:f/}})</b></p>
85   <p>{{f.description}}</p>
86   {{?f.properties}}
87     <table>
88     <tr><th>Type</th><th>Attribute</th><th>Description</th></tr>
89     {{+partials.type_item
90        title:f.strings.properties
91        display_name:display_name
92        items:f.properties
93        item_partial:(partials.parameter_full hideParamTOC:true)/}}
94     </table>
95   {{/}}
96 {{/}}
97 </ul>
98