Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / chrome / common / extensions / docs / templates / articles / ui_override.html
1 <h1>User Interface Overrides</h1>
2
3 <p>
4 User interface overrides are a way for extensions to override selected Chrome
5 user interface properties.
6 </p>
7
8 <h2 id="bookmarks">Bookmarks User Interface</h2>
9 <p>
10 Register the user interface properties you want to override in the
11 <a href="manifest">extension manifest</a> like this:
12 </p>
13
14 <pre>{
15   "name": "My extension",
16   ...
17 <b>
18   "chrome_ui_overrides" : {
19     "bookmarks_ui": {
20       "remove_button": "true",
21       "remove_bookmark_shortcut": "true"
22     }
23   }</b>,
24   ...
25 }</pre>
26
27 <p>
28 <ul>
29   <li>
30     <a href="#bookmarks_ui">Bookmark button</a>: the "star" button that is used
31     to bookmark pages. Extensions may remove this button using the settings
32     overrides, and optionally replace it with a browser action or page action.
33   </li>
34
35   <li>
36     <a href="#bookmarks_ui">Bookmark shortcut</a>: the shortcut key that is used
37     to bookmark a page (Ctrl-D on Windows). Extensions may remove this shortcut
38     via the settings overrides, and optionally bind their own command to it
39     using the <code>commands</code> section of the manifest. If the shortcut key
40     is removed or rebound, the corresponding menu item as also removed or
41     overridden respectively.
42   </li>
43 </ul>
44 </p>
45
46 <p class="note">
47 <b>Note:</b> Settings overrides for <code>bookmarks_ui</code> are only enabled
48 in the Chrome Dev release, and Chrome must be started with the
49 <code>--enable-override-bookmarks-ui=1</code> command line flag to enable
50 bookmarks user interface overrides.</p>
51
52 <h2 id="reference">Reference</h2>
53 <p>
54 An extension can override one or more of the following properties in the
55 manifest:
56 </p>
57
58 <ul>
59 {{#f:apis.extensions.manifestTypes.byName.ChromeUIOverrides.properties}}
60   <li>
61   <p id="{{f.name}}"><b><code>{{f.name}}</code> ({{+partials.variable_type type:f/}})</b></p>
62   <p>{{f.description}}</p>
63   {{?f.properties}}
64     <table>
65     <tr><th>Type</th><th>Attribute</th><th>Description</th></tr>
66     {{+partials.type_item
67        title:f.strings.properties
68        display_name:display_name
69        items:f.properties
70        item_partial:(partials.parameter_full hideParamTOC:true)/}}
71     </table>
72   {{/}}
73 {{/}}
74 </ul>