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

Side by Side Diff: chrome/common/extensions/api/omnibox.json

Issue 12314164: Modified Omnibox extension api to use JSON Schema Compiler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replaced include with forward declaration Created 7 years, 8 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." 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."
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 },
24 "descriptionStyles": {
25 "nodoc": true,
26 "optional": true,
27 "type": "array",
28 "description": "The style ranges for the description, as provided by the extension.",
29 "items": {
30 "type": "object",
31 "name": "matchClassification",
32 "description": "Placeholder description.",
33 "properties": {
34 "offset": { "type": "integer" },
35 "type": { "description": "The style type", "type": "string", "en um": ["url", "match", "dim"]},
36 "length": { "type": "integer", "optional": true }
37 }
38 }
39 },
40 "descriptionStylesRaw": {
41 "nodoc": true,
42 "optional": true,
43 "type": "array",
44 "description": "The style ranges for the description, as provided by ToValue().",
45 "items": {
46 "type": "object",
47 "name": "matchClassification",
48 "description": "Placeholder description.",
49 "properties": {
50 "offset": { "type": "integer" },
51 "type": { "type": "integer" }
52 }
53 }
23 } 54 }
24 } 55 }
25 } 56 }
26 ], 57 ],
27 "functions": [ 58 "functions": [
28 { 59 {
29 "name": "sendSuggestions", 60 "name": "sendSuggestions",
30 "nodoc": true, 61 "nodoc": true,
31 "type": "function", 62 "type": "function",
32 "description": "A callback passed to the onInputChanged event used for s ending suggestions back to the browser.", 63 "description": "A callback passed to the onInputChanged event used for s ending suggestions back to the browser.",
33 "parameters": [ 64 "parameters": [
34 {"type": "integer", "name": "requestId"}, 65 {"type": "integer", "name": "requestId"},
35 { 66 {
36 "name": "suggestResults", 67 "name": "suggestResults",
37 "type": "array", 68 "type": "array",
38 "description": "Array of suggest results", 69 "description": "An array of suggest results",
39 "items": { 70 "items": {
40 "type": "object", 71 "$ref": "SuggestResult"
41 "additionalProperties": { "type": "any" }
42 } 72 }
43 } 73 }
44 ] 74 ]
45 }, 75 },
46 { 76 {
47 "name": "setDefaultSuggestion", 77 "name": "setDefaultSuggestion",
48 "type": "function", 78 "type": "function",
49 "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.", 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.",
50 "parameters": [ 80 "parameters": [
51 { 81 {
52 "type": "object",
53 "name": "suggestion", 82 "name": "suggestion",
54 "description": "A partial SuggestResult object, without the 'content ' parameter. See SuggestResult for a description of the parameters.", 83 "$ref": "SuggestResult",
55 "properties": { 84 "description": "A partial SuggestResult object, without the 'content ' parameter. See SuggestResult for a description of the parameters."
56 "description": {
57 "type": "string",
58 "minLength": 1,
59 "description": "The text to display in the default suggestion. T he placeholder string '%s' can be included and will be replaced with the user's input."
60 }
61 }
62 } 85 }
63 ] 86 ]
64 } 87 }
65 ], 88 ],
66 "events": [ 89 "events": [
67 { 90 {
68 "name": "onInputStarted", 91 "name": "onInputStarted",
69 "type": "function", 92 "type": "function",
70 "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.", 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.",
71 "parameters": [] 94 "parameters": []
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 }, 138 },
116 { 139 {
117 "name": "onInputCancelled", 140 "name": "onInputCancelled",
118 "type": "function", 141 "type": "function",
119 "description": "User has ended the keyword input session without accepti ng the input.", 142 "description": "User has ended the keyword input session without accepti ng the input.",
120 "parameters": [] 143 "parameters": []
121 } 144 }
122 ] 145 ]
123 } 146 }
124 ] 147 ]
OLDNEW
« no previous file with comments | « chrome/common/chrome_notification_types.h ('k') | chrome/renderer/resources/extensions/omnibox_custom_bindings.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698