| 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 * @enum {string} |
| 27 * @see https://developer.chrome.com/extensions/searchEnginesPrivate#type-Search
EngineType |
| 28 */ |
| 29 chrome.searchEnginesPrivate.SearchEngineType = { |
| 30 DEFAULT: 'DEFAULT', |
| 31 OTHER: 'OTHER', |
| 32 }; |
| 33 |
| 34 /** |
| 35 * @typedef {{ |
| 36 * availability: !Array<!chrome.searchEnginesPrivate.HotwordFeature>, |
| 37 * audioHistoryState: (string|undefined), |
| 38 * errorMsg: (string|undefined) |
| 39 * }} |
| 40 * @see https://developer.chrome.com/extensions/searchEnginesPrivate#type-Hotwor
dState |
| 41 */ |
| 42 var HotwordState; |
| 43 |
| 44 /** |
| 15 * @typedef {{ | 45 * @typedef {{ |
| 16 * guid: string, | 46 * guid: string, |
| 17 * name: string, | 47 * name: string, |
| 48 * keyword: string, |
| 49 * url: string, |
| 50 * type: !chrome.searchEnginesPrivate.SearchEngineType, |
| 18 * isSelected: (boolean|undefined) | 51 * isSelected: (boolean|undefined) |
| 19 * }} | 52 * }} |
| 20 * @see https://developer.chrome.com/extensions/searchEnginesPrivate#type-Search
Engine | 53 * @see https://developer.chrome.com/extensions/searchEnginesPrivate#type-Search
Engine |
| 21 */ | 54 */ |
| 22 var SearchEngine; | 55 var SearchEngine; |
| 23 | 56 |
| 24 /** | 57 /** |
| 25 * Gets a list of the "default” search engines. Exactly one of the values | 58 * Gets a list of the search engines. Exactly one of the values should have |
| 26 * should have default == true. | 59 * default == true. |
| 27 * @param {function(!Array<SearchEngine>):void} callback | 60 * @param {function(!Array<SearchEngine>):void} callback |
| 28 * @see https://developer.chrome.com/extensions/searchEnginesPrivate#method-getD
efaultSearchEngines | 61 * @see https://developer.chrome.com/extensions/searchEnginesPrivate#method-getS
earchEngines |
| 29 */ | 62 */ |
| 30 chrome.searchEnginesPrivate.getDefaultSearchEngines = function(callback) {}; | 63 chrome.searchEnginesPrivate.getSearchEngines = function(callback) {}; |
| 31 | 64 |
| 32 /** | 65 /** |
| 33 * Sets the search engine with the given GUID as the selected default. | 66 * Sets the search engine with the given GUID as the selected default. |
| 34 * @param {string} guid | 67 * @param {string} guid |
| 35 * @see https://developer.chrome.com/extensions/searchEnginesPrivate#method-setS
electedSearchEngine | 68 * @see https://developer.chrome.com/extensions/searchEnginesPrivate#method-setS
electedSearchEngine |
| 36 */ | 69 */ |
| 37 chrome.searchEnginesPrivate.setSelectedSearchEngine = function(guid) {}; | 70 chrome.searchEnginesPrivate.setSelectedSearchEngine = function(guid) {}; |
| 38 | 71 |
| 39 /** | 72 /** |
| 40 * Fires when the list of default search engines changes or when the user | 73 * Adds a new "other" (non-default) search engine with the given name, keyword, |
| 41 * selects a preferred default search engine. | 74 * and URL. |
| 75 * @param {string} name |
| 76 * @param {string} keyword |
| 77 * @param {string} url |
| 78 * @see https://developer.chrome.com/extensions/searchEnginesPrivate#method-addO
therSearchEngine |
| 79 */ |
| 80 chrome.searchEnginesPrivate.addOtherSearchEngine = function(name, keyword, url)
{}; |
| 81 |
| 82 /** |
| 83 * Updates the search engine that has the given GUID, with the given name, |
| 84 * keyword, and URL. |
| 85 * @param {string} guid |
| 86 * @param {string} name |
| 87 * @param {string} keyword |
| 88 * @param {string} url |
| 89 * @see https://developer.chrome.com/extensions/searchEnginesPrivate#method-upda
teSearchEngine |
| 90 */ |
| 91 chrome.searchEnginesPrivate.updateSearchEngine = function(guid, name, keyword, u
rl) {}; |
| 92 |
| 93 /** |
| 94 * Removes the search engine with the given GUID. |
| 95 * @param {string} guid |
| 96 * @see https://developer.chrome.com/extensions/searchEnginesPrivate#method-remo
veSearchEngine |
| 97 */ |
| 98 chrome.searchEnginesPrivate.removeSearchEngine = function(guid) {}; |
| 99 |
| 100 /** |
| 101 * Gets the hotword state. |
| 102 * @param {function(HotwordState):void} callback |
| 103 * @see https://developer.chrome.com/extensions/searchEnginesPrivate#method-getH
otwordState |
| 104 */ |
| 105 chrome.searchEnginesPrivate.getHotwordState = function(callback) {}; |
| 106 |
| 107 /** |
| 108 * Opts in to hotwording; |retrain| indicates whether the user wants to retrain |
| 109 * the hotword system with their voice by launching the audio verification app. |
| 110 * @param {boolean} retrain |
| 111 * @see https://developer.chrome.com/extensions/searchEnginesPrivate#method-optI
ntoHotwording |
| 112 */ |
| 113 chrome.searchEnginesPrivate.optIntoHotwording = function(retrain) {}; |
| 114 |
| 115 /** |
| 116 * Fires when the list of search engines changes or when the user selects a |
| 117 * preferred default search engine. The new list of engines is passed along. |
| 42 * @type {!ChromeEvent} | 118 * @type {!ChromeEvent} |
| 43 * @see https://developer.chrome.com/extensions/searchEnginesPrivate#event-onDef
aultSearchEnginesChanged | 119 * @see https://developer.chrome.com/extensions/searchEnginesPrivate#event-onSea
rchEnginesChanged |
| 44 */ | 120 */ |
| 45 chrome.searchEnginesPrivate.onDefaultSearchEnginesChanged; | 121 chrome.searchEnginesPrivate.onSearchEnginesChanged; |
| 46 | 122 |
| 47 | 123 |
| OLD | NEW |