Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1865)

Unified Diff: chrome/common/extensions/api/omnibox.json

Issue 14960004: Fix mismatched parameter expectations between chrome.omnibox setDefaultSuggestion and SuggestResult (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@omniboxJSON
Patch Set: Modify SetOmniboxDefaultSuggestion to generate a dictionary compatible with api::omnibox::SuggestRe… Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/api/omnibox.json
diff --git a/chrome/common/extensions/api/omnibox.json b/chrome/common/extensions/api/omnibox.json
index 6177c5dabd9263fa2bf54953911b05ba538c4d1c..a9e51e5a9e8f6c833a82e6dd55a53b54d791e326 100644
--- a/chrome/common/extensions/api/omnibox.json
+++ b/chrome/common/extensions/api/omnibox.json
@@ -14,7 +14,7 @@
"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. This field must be blank for $ref:setDefaultSuggestion."
+ "description": "The text that is put into the URL bar, and that is sent to the extension when the user chooses this entry."
},
"description": {
"type": "string",
@@ -25,11 +25,11 @@
"nodoc": true,
"optional": true,
"type": "array",
- "description": "The style ranges for the description, as provided by the extension.",
+ "description": "An array of style ranges for the description, as provided by the extension.",
"items": {
"type": "object",
"name": "matchClassification",
- "description": "Placeholder description.",
+ "description": "The style ranges for the description, as provided by the extension.",
"properties": {
"offset": { "type": "integer" },
"type": { "description": "The style type", "type": "string", "enum": ["url", "match", "dim"]},
@@ -41,11 +41,55 @@
"nodoc": true,
"optional": true,
"type": "array",
- "description": "The style ranges for the description, as provided by ToValue().",
+ "description": "An array of style ranges for the description, as provided by ToValue().",
"items": {
"type": "object",
"name": "matchClassification",
- "description": "Placeholder description.",
+ "description": "The style ranges for the description, as provided by ToValue().",
+ "properties": {
+ "offset": { "type": "integer" },
+ "type": { "type": "integer" }
+ }
+ }
+ }
+ }
+ },
+ {
+ "id": "DefaultSuggestResult",
+ "inline_doc": true,
+ "type": "object",
+ "description": "A suggest result.",
not at google - send to devlin 2013/05/08 22:19:06 it'd be nice to avoid this repetition, but we can
+ "properties": {
+ "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": "An array of style ranges for the description, as provided by the extension.",
+ "items": {
+ "type": "object",
+ "name": "matchClassification",
+ "description": "The style ranges for the description, as provided by the extension.",
+ "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": "An array of style ranges for the description, as provided by ToValue().",
+ "items": {
+ "type": "object",
+ "name": "matchClassification",
+ "description": "The style ranges for the description, as provided by ToValue().",
"properties": {
"offset": { "type": "integer" },
"type": { "type": "integer" }
@@ -80,8 +124,8 @@
"parameters": [
{
"name": "suggestion",
- "$ref": "SuggestResult",
- "description": "A partial SuggestResult object, without the 'content' parameter. See SuggestResult for a description of the parameters."
+ "$ref": "DefaultSuggestResult",
+ "description": "A partial SuggestResult object, without the 'content' parameter."
}
]
}

Powered by Google App Engine
This is Rietveld 408576698