Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 3.0 License, and code samples are licensed under the BSD License.
?2011 Google
このページは大阪弁化フィルタによって翻訳生成されたんですわ。 |
![]() |
The omnibox API allows you to register a keyword with Google Chrome's address bar, which is also known as the omnibox.
When the user enters your extension's keyword, the user starts interacting solely with your extension. Each keystroke is sent to your extension, and you can provide suggestions in response.
The suggestions can be richly formatted in a variety of ways. When the user accepts a suggestion, your extension is notified and can take action.
You must include an omnibox
keyword
field
in the manifest
to use the omnibox API.
You should also
specify a 16x16-pixel icon, which will be
displayed in the address bar when suggesting that users
enter keyword mode.
For example:
{ "name": "Aaron's omnibox extension", "version": "1.0", "omnibox": { "keyword" : "aaron" }, "icons": { "16": "16-full-color.png" }, "background": { "scripts": ["background.js"] } }
Note: Chrome automatically creates a grayscale version of your 16x16-pixel icon. You should provide a full-color version so that it can also be used in other situations that require color. For example, the context menus API also uses a 16x16-pixel icon, but it is displayed in color.
You can find samples of this API on the sample page.
Sets the description and styling for the default suggestion. The default suggestion is the text that is displayed in the first suggestion row underneath the URL bar.
User has ended the keyword input session without accepting the input.
User has changed what is typed into the omnibox.