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