| OLD | NEW |
| 1 search_engines_private_externs.js | 1 search_engines_private_externs.js |
| 2 | 2 |
| 3 // Copyright 2015 The Chromium Authors. All rights reserved. | 3 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 4 // Use of this source code is governed by a BSD-style license that can be | 4 // Use of this source code is governed by a BSD-style license that can be |
| 5 // found in the LICENSE file. | 5 // found in the LICENSE file. |
| 6 | 6 |
| 7 /** @fileoverview Externs generated from namespace: searchEnginesPrivate */ | 7 /** @fileoverview Externs generated from namespace: searchEnginesPrivate */ |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * @const | 10 * @const |
| 11 */ | 11 */ |
| 12 chrome.searchEnginesPrivate = {}; | 12 chrome.searchEnginesPrivate = {}; |
| 13 | 13 |
| 14 /** | 14 /** |
| 15 * @enum {string} |
| 16 * @see https://developer.chrome.com/extensions/searchEnginesPrivate#type-Hotwor
dFeature |
| 17 */ |
| 18 chrome.searchEnginesPrivate.HotwordFeature = { |
| 19 SEARCH: 'SEARCH', |
| 20 ALWAYS_ON: 'ALWAYS_ON', |
| 21 RETRAIN_LINK: 'RETRAIN_LINK', |
| 22 AUDIO_HISTORY: 'AUDIO_HISTORY', |
| 23 }; |
| 24 |
| 25 /** |
| 26 * @typedef {{ |
| 27 * availability: !Array<!chrome.searchEnginesPrivate.HotwordFeature>, |
| 28 * audioHistoryState: (string|undefined), |
| 29 * errorMsg: (string|undefined) |
| 30 * }} |
| 31 * @see https://developer.chrome.com/extensions/searchEnginesPrivate#type-Hotwor
dState |
| 32 */ |
| 33 var HotwordState; |
| 34 |
| 35 /** |
| 15 * @typedef {{ | 36 * @typedef {{ |
| 16 * guid: string, | 37 * guid: string, |
| 17 * name: string, | 38 * name: string, |
| 39 * keyword: string, |
| 40 * url: string, |
| 18 * isSelected: (boolean|undefined) | 41 * isSelected: (boolean|undefined) |
| 19 * }} | 42 * }} |
| 20 * @see https://developer.chrome.com/extensions/searchEnginesPrivate#type-Search
Engine | 43 * @see https://developer.chrome.com/extensions/searchEnginesPrivate#type-Search
Engine |
| 21 */ | 44 */ |
| 22 var SearchEngine; | 45 var SearchEngine; |
| 23 | 46 |
| 24 /** | 47 /** |
| 25 * Gets a list of the "default” search engines. Exactly one of the values | 48 * Gets a list of the "default" search engines. Exactly one of the values should |
| 26 * should have default == true. | 49 * have default == true. |
| 27 * @param {function(!Array<SearchEngine>):void} callback | 50 * @param {function(!Array<SearchEngine>):void} callback |
| 28 * @see https://developer.chrome.com/extensions/searchEnginesPrivate#method-getD
efaultSearchEngines | 51 * @see https://developer.chrome.com/extensions/searchEnginesPrivate#method-getD
efaultSearchEngines |
| 29 */ | 52 */ |
| 30 chrome.searchEnginesPrivate.getDefaultSearchEngines = function(callback) {}; | 53 chrome.searchEnginesPrivate.getDefaultSearchEngines = function(callback) {}; |
| 31 | 54 |
| 32 /** | 55 /** |
| 33 * Sets the search engine with the given GUID as the selected default. | 56 * Sets the search engine with the given GUID as the selected default. |
| 34 * @param {string} guid | 57 * @param {string} guid |
| 35 * @see https://developer.chrome.com/extensions/searchEnginesPrivate#method-setS
electedSearchEngine | 58 * @see https://developer.chrome.com/extensions/searchEnginesPrivate#method-setS
electedSearchEngine |
| 36 */ | 59 */ |
| 37 chrome.searchEnginesPrivate.setSelectedSearchEngine = function(guid) {}; | 60 chrome.searchEnginesPrivate.setSelectedSearchEngine = function(guid) {}; |
| 38 | 61 |
| 39 /** | 62 /** |
| 63 * Gets a list of the "other" search engines. |
| 64 * @param {function(!Array<SearchEngine>):void} callback |
| 65 * @see https://developer.chrome.com/extensions/searchEnginesPrivate#method-getO
therSearchEngines |
| 66 */ |
| 67 chrome.searchEnginesPrivate.getOtherSearchEngines = function(callback) {}; |
| 68 |
| 69 /** |
| 70 * Adds a new "other" (non-default) search engine with the given name, keyword, |
| 71 * and URL. |
| 72 * @param {string} name |
| 73 * @param {string} keyword |
| 74 * @param {string} url |
| 75 * @see https://developer.chrome.com/extensions/searchEnginesPrivate#method-addO
therSearchEngine |
| 76 */ |
| 77 chrome.searchEnginesPrivate.addOtherSearchEngine = function(name, keyword, url)
{}; |
| 78 |
| 79 /** |
| 80 * Updates the search engine that has the given GUID, with the given name, |
| 81 * keyword, and URL. |
| 82 * @param {string} guid |
| 83 * @param {string} name |
| 84 * @param {string} keyword |
| 85 * @param {string} url |
| 86 * @see https://developer.chrome.com/extensions/searchEnginesPrivate#method-upda
teSearchEngine |
| 87 */ |
| 88 chrome.searchEnginesPrivate.updateSearchEngine = function(guid, name, keyword, u
rl) {}; |
| 89 |
| 90 /** |
| 91 * Removes the search engine with the given GUID. |
| 92 * @param {string} guid |
| 93 * @see https://developer.chrome.com/extensions/searchEnginesPrivate#method-remo
veSearchEngine |
| 94 */ |
| 95 chrome.searchEnginesPrivate.removeSearchEngine = function(guid) {}; |
| 96 |
| 97 /** |
| 98 * Gets the hotword state. |
| 99 * @param {function(HotwordState):void} callback |
| 100 * @see https://developer.chrome.com/extensions/searchEnginesPrivate#method-getH
otwordState |
| 101 */ |
| 102 chrome.searchEnginesPrivate.getHotwordState = function(callback) {}; |
| 103 |
| 104 /** |
| 105 * Opts in to hotwording; behavior depends on whether retrain is needed. |
| 106 * @param {boolean} retrain |
| 107 * @see https://developer.chrome.com/extensions/searchEnginesPrivate#method-optI
ntoHotwording |
| 108 */ |
| 109 chrome.searchEnginesPrivate.optIntoHotwording = function(retrain) {}; |
| 110 |
| 111 /** |
| 40 * Fires when the list of default search engines changes or when the user | 112 * Fires when the list of default search engines changes or when the user |
| 41 * selects a preferred default search engine. | 113 * selects a preferred default search engine. The new list of "default" engines |
| 114 * is passed along. |
| 42 * @type {!ChromeEvent} | 115 * @type {!ChromeEvent} |
| 43 * @see https://developer.chrome.com/extensions/searchEnginesPrivate#event-onDef
aultSearchEnginesChanged | 116 * @see https://developer.chrome.com/extensions/searchEnginesPrivate#event-onDef
aultSearchEnginesChanged |
| 44 */ | 117 */ |
| 45 chrome.searchEnginesPrivate.onDefaultSearchEnginesChanged; | 118 chrome.searchEnginesPrivate.onDefaultSearchEnginesChanged; |
| 46 | 119 |
| 120 /** |
| 121 * Fires when the list of "other" search engines changes. The new list of |
| 122 * "other" engines is passed along. |
| 123 * @type {!ChromeEvent} |
| 124 * @see https://developer.chrome.com/extensions/searchEnginesPrivate#event-onOth
erSearchEnginesChanged |
| 125 */ |
| 126 chrome.searchEnginesPrivate.onOtherSearchEnginesChanged; |
| 47 | 127 |
| 128 |
| OLD | NEW |