Chromium Code Reviews| OLD | NEW |
|---|---|
| 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." |
| 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 } | |
| 54 } | |
| 55 } | |
| 56 }, | |
| 57 { | |
| 58 "id": "SuggestDefaultResult", | |
|
not at google - send to devlin
2013/03/16 00:04:25
Ah, I see. Let's just make content on SuggestResul
Aaron Jacobs
2013/03/21 21:59:55
Done, except I had to remove the reference to send
| |
| 59 "type": "object", | |
| 60 "description": "A default suggest result.", | |
| 61 "properties": { | |
| 62 "description": { | |
| 63 "type": "string", | |
| 64 "minLength": 1, | |
| 65 "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>." | |
| 66 }, | |
| 67 "descriptionStyles": { | |
| 68 "nodoc": true, | |
| 69 "optional": true, | |
| 70 "type": "array", | |
| 71 "description": "The style ranges for the description, as provided by the extension.", | |
| 72 "items": { | |
| 73 "type": "object", | |
| 74 "name": "matchClassification", | |
| 75 "description": "Placeholder description.", | |
| 76 "properties": { | |
| 77 "offset": { "type": "integer" }, | |
| 78 "type": { "description": "The style type", "type": "string", "en um": ["url", "match", "dim"]}, | |
| 79 "length": { "type": "integer", "optional": true } | |
| 80 } | |
| 81 } | |
| 23 } | 82 } |
| 24 } | 83 } |
| 25 } | 84 } |
| 26 ], | 85 ], |
| 27 "functions": [ | 86 "functions": [ |
| 28 { | 87 { |
| 29 "name": "sendSuggestions", | 88 "name": "sendSuggestions", |
| 30 "nodoc": true, | 89 "nodoc": true, |
| 31 "type": "function", | 90 "type": "function", |
| 32 "description": "A callback passed to the onInputChanged event used for s ending suggestions back to the browser.", | 91 "description": "A callback passed to the onInputChanged event used for s ending suggestions back to the browser.", |
| 33 "parameters": [ | 92 "parameters": [ |
| 34 {"type": "integer", "name": "requestId"}, | 93 {"type": "integer", "name": "requestId"}, |
| 35 { | 94 { |
| 36 "name": "suggestResults", | 95 "name": "suggestResults", |
| 37 "type": "array", | 96 "type": "array", |
| 38 "description": "Array of suggest results", | 97 "description": "Array of suggest results", |
| 39 "items": { | 98 "items": { |
| 40 "type": "object", | 99 "$ref": "SuggestResult" |
| 41 "additionalProperties": { "type": "any" } | |
| 42 } | 100 } |
| 43 } | 101 } |
| 44 ] | 102 ] |
| 45 }, | 103 }, |
| 46 { | 104 { |
| 47 "name": "setDefaultSuggestion", | 105 "name": "setDefaultSuggestion", |
| 48 "type": "function", | 106 "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.", | 107 "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": [ | 108 "parameters": [ |
| 51 { | 109 { |
| 52 "type": "object", | |
| 53 "name": "suggestion", | 110 "name": "suggestion", |
| 54 "description": "A partial SuggestResult object, without the 'content ' parameter. See SuggestResult for a description of the parameters.", | 111 "$ref": "SuggestDefaultResult", |
| 55 "properties": { | 112 "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 } | 113 } |
| 63 ] | 114 ] |
| 64 } | 115 } |
| 65 ], | 116 ], |
| 66 "events": [ | 117 "events": [ |
| 67 { | 118 { |
| 68 "name": "onInputStarted", | 119 "name": "onInputStarted", |
| 69 "type": "function", | 120 "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.", | 121 "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": [] | 122 "parameters": [] |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 109 }, | 160 }, |
| 110 { | 161 { |
| 111 "name": "onInputCancelled", | 162 "name": "onInputCancelled", |
| 112 "type": "function", | 163 "type": "function", |
| 113 "description": "User has ended the keyword input session without accepti ng the input.", | 164 "description": "User has ended the keyword input session without accepti ng the input.", |
| 114 "parameters": [] | 165 "parameters": [] |
| 115 } | 166 } |
| 116 ] | 167 ] |
| 117 } | 168 } |
| 118 ] | 169 ] |
| OLD | NEW |