1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
7 "namespace": "omnibox",
8 "description": "The omnibox API allows you to register a keyword with Google Chrome's address bar, which is also known as the omnibox.",
11 "id": "DescriptionStyleType",
13 "description": "The style type.",
14 "enum": ["url", "match", "dim"]
17 "id": "OnInputEnteredDisposition",
19 "enum": ["currentTab", "newForegroundTab", "newBackgroundTab"],
20 "description": "The window disposition for the omnibox query. This is the recommended context to display results. For example, if the omnibox command is to navigate to a certain URL, a disposition of 'newForegroundTab' means the navigation should take place in a new selected tab."
23 "id": "SuggestResult",
25 "description": "A suggest result.",
30 "description": "The text that is put into the URL bar, and that is sent to the extension when the user chooses this entry."
35 "description": "The text that is displayed in the URL dropdown. Can contain XML-style markup for styling. The supported tags are 'url' (for a literal URL), 'match' (for highlighting text that matched what the user's query), and 'dim' (for dim helper text). The styles can be nested, eg. <dim><match>dimmed match</match></dim>. You must escape the five predefined entities to display them as text: stackoverflow.com/a/1091953/89484 "
37 "descriptionStyles": {
41 "description": "An array of style ranges for the description, as provided by the extension.",
44 "name": "matchClassification",
45 "description": "The style ranges for the description, as provided by the extension.",
47 "offset": { "type": "integer" },
48 "type": { "description": "The style type", "$ref": "DescriptionStyleType"},
49 "length": { "type": "integer", "optional": true }
53 "descriptionStylesRaw": {
57 "description": "An array of style ranges for the description, as provided by ToValue().",
60 "name": "matchClassification",
61 "description": "The style ranges for the description, as provided by ToValue().",
63 "offset": { "type": "integer" },
64 "type": { "type": "integer" }
71 "id": "DefaultSuggestResult",
74 "description": "A suggest result.",
79 "description": "The text that is displayed in the URL dropdown. Can contain XML-style markup for styling. The supported tags are 'url' (for a literal URL), 'match' (for highlighting text that matched what the user's query), and 'dim' (for dim helper text). The styles can be nested, eg. <dim><match>dimmed match</match></dim>."
81 "descriptionStyles": {
85 "description": "An array of style ranges for the description, as provided by the extension.",
88 "name": "matchClassification",
89 "description": "The style ranges for the description, as provided by the extension.",
91 "offset": { "type": "integer" },
92 "type": { "description": "The style type", "$ref": "DescriptionStyleType"},
93 "length": { "type": "integer", "optional": true }
97 "descriptionStylesRaw": {
101 "description": "An array of style ranges for the description, as provided by ToValue().",
104 "name": "matchClassification",
105 "description": "The style ranges for the description, as provided by ToValue().",
107 "offset": { "type": "integer" },
108 "type": { "type": "integer" }
117 "name": "sendSuggestions",
120 "description": "A callback passed to the onInputChanged event used for sending suggestions back to the browser.",
122 {"type": "integer", "name": "requestId"},
124 "name": "suggestResults",
126 "description": "An array of suggest results",
128 "$ref": "SuggestResult"
134 "name": "setDefaultSuggestion",
136 "description": "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.",
139 "name": "suggestion",
140 "$ref": "DefaultSuggestResult",
141 "description": "A partial SuggestResult object, without the 'content' parameter."
148 "name": "onInputStarted",
150 "description": "User has started a keyword input session by typing the extension's keyword. This is guaranteed to be sent exactly once per input session, and before any onInputChanged events.",
154 "name": "onInputChanged",
156 "description": "User has changed what is typed into the omnibox.",
165 "description": "A callback passed to the onInputChanged event used for sending suggestions back to the browser.",
168 "name": "suggestResults",
170 "description": "Array of suggest results",
172 "$ref": "SuggestResult"
180 "name": "onInputEntered",
182 "description": "User has accepted what is typed into the omnibox.",
189 "name": "disposition",
190 "$ref": "OnInputEnteredDisposition"
195 "name": "onInputCancelled",
197 "description": "User has ended the keyword input session without accepting the input.",