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