OLD | NEW |
(Empty) | |
| 1 <!-- BEGIN AUTHORED CONTENT --> |
| 2 <p> |
| 3 The omnibox API allows you to register a |
| 4 keyword with Google Chrome's address bar, |
| 5 which is also known as the omnibox. |
| 6 </p> |
| 7 <p> |
| 8 <img src="/static/images/omnibox.png" width="300" height="150" |
| 9 alt="A screenshot showing suggestions related to the keyword 'Chromium Search'
"/> |
| 10 </p> |
| 11 <p> |
| 12 When the user enters your extension's |
| 13 keyword, the user starts |
| 14 interacting solely with your extension. |
| 15 Each keystroke is sent to your |
| 16 extension, and you can provide suggestions |
| 17 in response. |
| 18 </p> |
| 19 <p> |
| 20 The suggestions can be richly formatted |
| 21 in a variety of ways. |
| 22 <!-- PENDING: for example? (include a mention of method name, maybe show a code
snippet) --> |
| 23 When the user accepts |
| 24 a suggestion, your extension is notified |
| 25 and can take action. |
| 26 </p> |
| 27 <h2 id="manifest">Manifest</h2> |
| 28 <p> |
| 29 You must include an <code>omnibox</code> <code>keyword</code> field |
| 30 in the <a href="manifest.html">manifest</a> |
| 31 to use the omnibox API. |
| 32 You should also |
| 33 specify a 16x16-pixel icon, which will be |
| 34 displayed in the address bar when suggesting that users |
| 35 enter keyword mode. |
| 36 </p> |
| 37 <p> |
| 38 For example: |
| 39 </p> |
| 40 <pre>{ |
| 41 "name": "Aaron's omnibox extension", |
| 42 "version": "1.0", |
| 43 <b>"omnibox": { "keyword" : "aaron" },</b> |
| 44 <b>"icons": {</b> |
| 45 <b>"16": "16-full-color.png"</b> |
| 46 <b>},</b> |
| 47 "background": { |
| 48 "scripts": ["background.js"] |
| 49 } |
| 50 }</pre> |
| 51 <p class="note"> |
| 52 <strong>Note:</strong> |
| 53 Chrome automatically creates a grayscale version of |
| 54 your 16x16-pixel icon. You should provide |
| 55 a full-color version so that it can also be |
| 56 used in other situations that require color. |
| 57 For example, the <a href="contextMenus.html" |
| 58 >context menus API</a> also uses a 16x16-pixel |
| 59 icon, but it is displayed in color. |
| 60 </p> |
| 61 <h2 id="examples">Examples</h2> |
| 62 <p> |
| 63 You can find samples of this API on the |
| 64 <a href="samples.html#omnibox">sample page</a>. |
| 65 <!-- END AUTHORED CONTENT --> |
OLD | NEW |