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