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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 [ 5 [
6 { 6 {
7 "namespace": "omnibox", 7 "namespace": "omnibox",
8 "types": [ 8 "types": [
9 { 9 {
10 "id": "SuggestResult", 10 "id": "SuggestResult",
11 "type": "object", 11 "type": "object",
12 "description": "A suggest result.", 12 "description": "A suggest result.",
13 "properties": { 13 "properties": {
14 "content": { 14 "content": {
15 "type": "string", 15 "type": "string",
16 "minLength": 1, 16 "minLength": 1,
17 "description": "The text that is put into the URL bar, and that is s ent to the extension when the user chooses this entry. This field must be blank for $ref:setDefaultSuggestion." 17 "description": "The text that is put into the URL bar, and that is s ent to the extension when the user chooses this entry."
18 }, 18 },
19 "description": { 19 "description": {
20 "type": "string", 20 "type": "string",
21 "minLength": 1, 21 "minLength": 1,
22 "description": "The text that is displayed in the URL dropdown. Can contain XML-style markup for styling. The supported tags are 'url' (for a litera l 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 ma tch</match></dim>." 22 "description": "The text that is displayed in the URL dropdown. Can contain XML-style markup for styling. The supported tags are 'url' (for a litera l 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 ma tch</match></dim>."
23 }, 23 },
24 "descriptionStyles": { 24 "descriptionStyles": {
25 "nodoc": true, 25 "nodoc": true,
26 "optional": true, 26 "optional": true,
27 "type": "array", 27 "type": "array",
28 "description": "The style ranges for the description, as provided by the extension.", 28 "description": "An array of style ranges for the description, as pro vided by the extension.",
29 "items": { 29 "items": {
30 "type": "object", 30 "type": "object",
31 "name": "matchClassification", 31 "name": "matchClassification",
32 "description": "Placeholder description.", 32 "description": "The style ranges for the description, as provided by the extension.",
33 "properties": { 33 "properties": {
34 "offset": { "type": "integer" }, 34 "offset": { "type": "integer" },
35 "type": { "description": "The style type", "type": "string", "en um": ["url", "match", "dim"]}, 35 "type": { "description": "The style type", "type": "string", "en um": ["url", "match", "dim"]},
36 "length": { "type": "integer", "optional": true } 36 "length": { "type": "integer", "optional": true }
37 } 37 }
38 } 38 }
39 }, 39 },
40 "descriptionStylesRaw": { 40 "descriptionStylesRaw": {
41 "nodoc": true, 41 "nodoc": true,
42 "optional": true, 42 "optional": true,
43 "type": "array", 43 "type": "array",
44 "description": "The style ranges for the description, as provided by ToValue().", 44 "description": "An array of style ranges for the description, as pro vided by ToValue().",
45 "items": { 45 "items": {
46 "type": "object", 46 "type": "object",
47 "name": "matchClassification", 47 "name": "matchClassification",
48 "description": "Placeholder description.", 48 "description": "The style ranges for the description, as provided by ToValue().",
49 "properties": { 49 "properties": {
50 "offset": { "type": "integer" }, 50 "offset": { "type": "integer" },
51 "type": { "type": "integer" } 51 "type": { "type": "integer" }
52 }
53 }
54 }
55 }
56 },
57 {
58 "id": "DefaultSuggestResult",
59 "inline_doc": true,
60 "type": "object",
61 "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
62 "properties": {
63 "description": {
64 "type": "string",
65 "minLength": 1,
66 "description": "The text that is displayed in the URL dropdown. Can contain XML-style markup for styling. The supported tags are 'url' (for a litera l 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 ma tch</match></dim>."
67 },
68 "descriptionStyles": {
69 "nodoc": true,
70 "optional": true,
71 "type": "array",
72 "description": "An array of style ranges for the description, as pro vided by the extension.",
73 "items": {
74 "type": "object",
75 "name": "matchClassification",
76 "description": "The style ranges for the description, as provided by the extension.",
77 "properties": {
78 "offset": { "type": "integer" },
79 "type": { "description": "The style type", "type": "string", "en um": ["url", "match", "dim"]},
80 "length": { "type": "integer", "optional": true }
81 }
82 }
83 },
84 "descriptionStylesRaw": {
85 "nodoc": true,
86 "optional": true,
87 "type": "array",
88 "description": "An array of style ranges for the description, as pro vided by ToValue().",
89 "items": {
90 "type": "object",
91 "name": "matchClassification",
92 "description": "The style ranges for the description, as provided by ToValue().",
93 "properties": {
94 "offset": { "type": "integer" },
95 "type": { "type": "integer" }
52 } 96 }
53 } 97 }
54 } 98 }
55 } 99 }
56 } 100 }
57 ], 101 ],
58 "functions": [ 102 "functions": [
59 { 103 {
60 "name": "sendSuggestions", 104 "name": "sendSuggestions",
61 "nodoc": true, 105 "nodoc": true,
(...skipping 11 matching lines...) Expand all
73 } 117 }
74 ] 118 ]
75 }, 119 },
76 { 120 {
77 "name": "setDefaultSuggestion", 121 "name": "setDefaultSuggestion",
78 "type": "function", 122 "type": "function",
79 "description": "Sets the description and styling for the default suggest ion. The default suggestion is the text that is displayed in the first suggestio n row underneath the URL bar.", 123 "description": "Sets the description and styling for the default suggest ion. The default suggestion is the text that is displayed in the first suggestio n row underneath the URL bar.",
80 "parameters": [ 124 "parameters": [
81 { 125 {
82 "name": "suggestion", 126 "name": "suggestion",
83 "$ref": "SuggestResult", 127 "$ref": "DefaultSuggestResult",
84 "description": "A partial SuggestResult object, without the 'content ' parameter. See SuggestResult for a description of the parameters." 128 "description": "A partial SuggestResult object, without the 'content ' parameter."
85 } 129 }
86 ] 130 ]
87 } 131 }
88 ], 132 ],
89 "events": [ 133 "events": [
90 { 134 {
91 "name": "onInputStarted", 135 "name": "onInputStarted",
92 "type": "function", 136 "type": "function",
93 "description": "User has started a keyword input session by typing the e xtension's keyword. This is guaranteed to be sent exactly once per input session , and before any onInputChanged events.", 137 "description": "User has started a keyword input session by typing the e xtension's keyword. This is guaranteed to be sent exactly once per input session , and before any onInputChanged events.",
94 "parameters": [] 138 "parameters": []
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 }, 182 },
139 { 183 {
140 "name": "onInputCancelled", 184 "name": "onInputCancelled",
141 "type": "function", 185 "type": "function",
142 "description": "User has ended the keyword input session without accepti ng the input.", 186 "description": "User has ended the keyword input session without accepti ng the input.",
143 "parameters": [] 187 "parameters": []
144 } 188 }
145 ] 189 ]
146 } 190 }
147 ] 191 ]
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698