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

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: kalman's requests Created 7 years, 9 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 "optional": true,
not at google - send to devlin 2013/03/22 17:33:30 ugh, ok, I change my mind here sorry. this being o
Aaron Jacobs 2013/03/22 19:54:15 Done.
16 "minLength": 1, 17 "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." 18 "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 ommitt ed for $ref:setDefaultSuggestion."
18 }, 19 },
19 "description": { 20 "description": {
20 "type": "string", 21 "type": "string",
21 "minLength": 1, 22 "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>." 23 "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>."
24 },
25 "descriptionStyles": {
26 "nodoc": true,
27 "optional": true,
28 "type": "array",
29 "description": "The style ranges for the description, as provided by the extension.",
30 "items": {
31 "type": "object",
32 "name": "matchClassification",
33 "description": "Placeholder description.",
34 "properties": {
35 "offset": { "type": "integer" },
36 "type": { "description": "The style type", "type": "string", "en um": ["url", "match", "dim"]},
37 "length": { "type": "integer", "optional": true }
38 }
39 }
40 },
41 "descriptionStylesRaw": {
42 "nodoc": true,
43 "optional": true,
44 "type": "array",
45 "description": "The style ranges for the description, as provided by ToValue().",
46 "items": {
47 "type": "object",
48 "name": "matchClassification",
49 "description": "Placeholder description.",
50 "properties": {
51 "offset": { "type": "integer" },
52 "type": { "type": "integer" }
53 }
54 }
23 } 55 }
24 } 56 }
25 } 57 }
26 ], 58 ],
27 "functions": [ 59 "functions": [
28 { 60 {
29 "name": "sendSuggestions", 61 "name": "sendSuggestions",
30 "nodoc": true, 62 "nodoc": true,
31 "type": "function", 63 "type": "function",
32 "description": "A callback passed to the onInputChanged event used for s ending suggestions back to the browser.", 64 "description": "A callback passed to the onInputChanged event used for s ending suggestions back to the browser.",
33 "parameters": [ 65 "parameters": [
34 {"type": "integer", "name": "requestId"}, 66 {"type": "integer", "name": "requestId"},
35 { 67 {
36 "name": "suggestResults", 68 "name": "suggestResults",
37 "type": "array", 69 "type": "array",
38 "description": "Array of suggest results", 70 "description": "An array of suggest results",
39 "items": { 71 "items": {
40 "type": "object", 72 "$ref": "SuggestResult"
41 "additionalProperties": { "type": "any" }
42 } 73 }
43 } 74 }
44 ] 75 ]
45 }, 76 },
46 { 77 {
47 "name": "setDefaultSuggestion", 78 "name": "setDefaultSuggestion",
48 "type": "function", 79 "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.", 80 "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": [ 81 "parameters": [
51 { 82 {
52 "type": "object",
53 "name": "suggestion", 83 "name": "suggestion",
54 "description": "A partial SuggestResult object, without the 'content ' parameter. See SuggestResult for a description of the parameters.", 84 "$ref": "SuggestResult",
55 "properties": { 85 "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 } 86 }
63 ] 87 ]
64 } 88 }
65 ], 89 ],
66 "events": [ 90 "events": [
67 { 91 {
68 "name": "onInputStarted", 92 "name": "onInputStarted",
69 "type": "function", 93 "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.", 94 "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": [] 95 "parameters": []
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 }, 133 },
110 { 134 {
111 "name": "onInputCancelled", 135 "name": "onInputCancelled",
112 "type": "function", 136 "type": "function",
113 "description": "User has ended the keyword input session without accepti ng the input.", 137 "description": "User has ended the keyword input session without accepti ng the input.",
114 "parameters": [] 138 "parameters": []
115 } 139 }
116 ] 140 ]
117 } 141 }
118 ] 142 ]
OLDNEW
« chrome/browser/extensions/extension_prefs.cc ('K') | « chrome/common/chrome_notification_types.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698