Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / chrome / common / extensions / docs / templates / articles / settings_override.html
index 9cbe5e8..c9b723b 100644 (file)
 <h1>Settings Overrides</h1>
 
 <p>
-Settings overrides are a way for extensions to override selected Chrome settings
-and user interface properties.
+Settings overrides are a way for extensions to override selected Chrome settings.
 </p>
 
+<h2 id="others">Homepage, Search Provider, and Startup Pages</h2>
 <p>
-An extension can override one or more of the following properties:
-</p>
+Here is an example how <a href="#homepage">homepage</a>, <a
+href="#search_provider">search provider</a> and <a href="#startup_pages">startup
+pages</a> can be modified in the <a href="manifest">extension
+manifest</a>. Web sites used in the settings API must be
+<a href="https://support.google.com/webmasters/answer/35179">verified</a> (via
+Webmaster Tools) as being associated with that item in the Chrome Web Store.
+Note that if you verify ownership for a domain (for example, http://example.com)
+you can use any subdomain or page (for example, http://app.example.com or
+http://example.com/page.html) within your extension.</p>
 
-<p>
-<b>Bookmarks User Interface:</b>
+<pre>{
+  "name": "My extension",
+  ...
+  "chrome_settings_overrides": {
+    "homepage": "http://www.homepage.com",
+    "search_provider": {
+        "name": "name.__MSG_url_domain__",
+        "keyword": "keyword.__MSG_url_domain__",
+        "search_url": "http://www.foo.__MSG_url_domain__/s?q={searchTerms}",
+        "favicon_url": "http://www.foo.__MSG_url_domain__/favicon.ico",
+        "suggest_url": "http://www.foo.__MSG_url_domain__/suggest?q={searchTerms}",
+        "instant_url": "http://www.foo.__MSG_url_domain__/instant?q={searchTerms}",
+        "image_url": "http://www.foo.__MSG_url_domain__/image?q={searchTerms}",
+        "search_url_post_params": "search_lang=__MSG_url_domain__",
+        "suggest_url_post_params": "suggest_lang=__MSG_url_domain__",
+        "instant_url_post_params": "instant_lang=__MSG_url_domain__",
+        "image_url_post_params": "image_lang=__MSG_url_domain__",
+        "alternate_urls": [
+          "http://www.moo.__MSG_url_domain__/s?q={searchTerms}",
+          "http://www.noo.__MSG_url_domain__/s?q={searchTerms}"
+        ],
+        "encoding": "UTF-8",
+        "is_default": true
+    },
+    "startup_pages": ["http://www.startup.com"]
+   },
+   "default_locale": "de",
+   ...
+}</pre>
+
+<p class="note">
+<b>Note:</b> Settings overrides for <code>homepage</code>,
+<code>search_provider</code>, and <code>startup_pages</code> are only enabled
+in the Chrome Dev release.</p>
+
+<h2 id="customizing">Customizing values</h2>
+<p>Values in the manifest can be customized in the following ways:</p>
 <ul>
   <li>
-    Bookmark button: the "star" button that is used to bookmark
-    pages. Extensions may remove this button using the settings overrides, and
-    optionally replace it with a browser action or page action.
+  All values of the <code>search_provider</code>, <code>homepage</code> and
+  <code>startup_pages</code> properties can be localized using the
+  $(ref:i18n chrome.i18n API).
   </li>
-
   <li>
-    Bookmark shortcut: the shortcut key that is used to bookmark a page (Ctrl-D
-    on Windows). Extensions may remove this shortcut via the settings overrides,
-    and optionally bind their own command to it using the <code>commands</code>
-    section of the manifest.
+  For <a href="http://developer.chrome.com/extensions/external_extensions">external extensions</a>,
+  the <code>search_provider</code>, <code>homepage</code> and
+  <code>startup_pages</code> URL values can be parametrized using a registry key.
+  A new registry entry should be created next to the "update_url" key (see
+  instructions <a href="http://developer.chrome.com/extensions/external_extensions#registry">here</a>).
+  The value name is "install_parameter", the value data is an arbitrary string:
+  <pre>{
+    "update_url": "https://clients2.google.com/service/update2/crx",
+    "install_parameter": "Value"
+  }</pre>
+  All occurrences of the substring "__PARAM__" in the manifest URLs will be
+  substituted with the "install_parameter" value. If “install_parameter” is
+  absent, occurrences of "__PARAM__" are removed. Note that "__PARAM__" cannot
+  be part of the hostname. It needs to occur after the first '/' in the URL.
   </li>
 </ul>
-</p>
-
-<p class="note">
-<b>Note:</b> Settings overrides are only enabled in the Chrome Dev release, and
-Chrome must be started with the <code>--enable-override-bookmarks-ui=1</code>
-command line flag to enable bookmarks user interface overrides.</p>
-
-<h2 id="manifest">Manifest</h2>
 
+<h2 id="reference">Reference</h2>
 <p>
-Register settings overrides in the
-<a href="manifest.html">extension manifest</a> like this:
+An extension can override one or more of the following properties in the
+manifest:
 </p>
 
-<pre>{
-  "name": "My extension",
-  ...
-<b>
-  "chrome_settings_overrides" : {
-    "bookmarks_ui": {
-      "remove_button": "true",
-      "remove_bookmark_shortcut": "true"
-    }
-  }</b>,
-  ...
-}</pre>
+<ul>
+{{#f:apis.extensions.manifestTypes.byName.ChromeSettingsOverrides.properties}}
+  <li>
+  <p id="{{f.name}}"><b><code>{{f.name}}</code> ({{+partials.variable_type type:f/}})</b></p>
+  <p>{{f.description}}</p>
+  {{?f.properties}}
+    <table>
+    <tr><th>Type</th><th>Attribute</th><th>Description</th></tr>
+    {{+partials.type_item
+       title:f.strings.properties
+       display_name:display_name
+       items:f.properties
+       item_partial:(partials.parameter_full hideParamTOC:true)/}}
+    </table>
+  {{/}}
+{{/}}
+</ul>
+