diff options
author | Samusaaron3@gmail.com <Samusaaron3@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-26 05:23:53 +0000 |
---|---|---|
committer | Samusaaron3@gmail.com <Samusaaron3@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-26 05:23:53 +0000 |
commit | 721cee10665ba6f66b30a696780b72a1d9bc9bee (patch) | |
tree | cba770d074244f0f279a19181928e35dc16ded7e /chrome/common | |
parent | 87402bf93fc5bef3f3d128407ac880d8d959775a (diff) | |
download | chromium_src-721cee10665ba6f66b30a696780b72a1d9bc9bee.zip chromium_src-721cee10665ba6f66b30a696780b72a1d9bc9bee.tar.gz chromium_src-721cee10665ba6f66b30a696780b72a1d9bc9bee.tar.bz2 |
Modified Omnibox extension api to use JSON Schema Compiler
BUG=121174
Review URL: https://chromiumcodereview.appspot.com/12314164
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@196628 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/chrome_notification_types.h | 4 | ||||
-rw-r--r-- | chrome/common/extensions/api/omnibox.json | 49 |
2 files changed, 38 insertions, 15 deletions
diff --git a/chrome/common/chrome_notification_types.h b/chrome/common/chrome_notification_types.h index a89ce0f..b0eb519 100644 --- a/chrome/common/chrome_notification_types.h +++ b/chrome/common/chrome_notification_types.h @@ -638,8 +638,8 @@ enum NotificationType { NOTIFICATION_EXTENSION_DOWNLOADS_EVENT, // Sent when an omnibox extension has sent back omnibox suggestions. The - // source is the profile, and the details are an ExtensionOmniboxSuggestions - // object. + // source is the profile, and the details are an + // extensions::api::omnibox::SendSuggestions::Params object. NOTIFICATION_EXTENSION_OMNIBOX_SUGGESTIONS_READY, // Sent when the user accepts the input in an extension omnibox keyword diff --git a/chrome/common/extensions/api/omnibox.json b/chrome/common/extensions/api/omnibox.json index 297e2c1..6177c5d 100644 --- a/chrome/common/extensions/api/omnibox.json +++ b/chrome/common/extensions/api/omnibox.json @@ -14,12 +14,43 @@ "content": { "type": "string", "minLength": 1, - "description": "The text that is put into the URL bar, and that is sent to the extension when the user chooses this entry." + "description": "The text that is put into the URL bar, and that is sent to the extension when the user chooses this entry. This field must be blank for $ref:setDefaultSuggestion." }, "description": { "type": "string", "minLength": 1, "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>." + }, + "descriptionStyles": { + "nodoc": true, + "optional": true, + "type": "array", + "description": "The style ranges for the description, as provided by the extension.", + "items": { + "type": "object", + "name": "matchClassification", + "description": "Placeholder description.", + "properties": { + "offset": { "type": "integer" }, + "type": { "description": "The style type", "type": "string", "enum": ["url", "match", "dim"]}, + "length": { "type": "integer", "optional": true } + } + } + }, + "descriptionStylesRaw": { + "nodoc": true, + "optional": true, + "type": "array", + "description": "The style ranges for the description, as provided by ToValue().", + "items": { + "type": "object", + "name": "matchClassification", + "description": "Placeholder description.", + "properties": { + "offset": { "type": "integer" }, + "type": { "type": "integer" } + } + } } } } @@ -35,10 +66,9 @@ { "name": "suggestResults", "type": "array", - "description": "Array of suggest results", + "description": "An array of suggest results", "items": { - "type": "object", - "additionalProperties": { "type": "any" } + "$ref": "SuggestResult" } } ] @@ -49,16 +79,9 @@ "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.", "parameters": [ { - "type": "object", "name": "suggestion", - "description": "A partial SuggestResult object, without the 'content' parameter. See SuggestResult for a description of the parameters.", - "properties": { - "description": { - "type": "string", - "minLength": 1, - "description": "The text to display in the default suggestion. The placeholder string '%s' can be included and will be replaced with the user's input." - } - } + "$ref": "SuggestResult", + "description": "A partial SuggestResult object, without the 'content' parameter. See SuggestResult for a description of the parameters." } ] } |