| OLD | NEW |
| (Empty) |
| 1 search_engines_private_externs.js | |
| 2 | |
| 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 | |
| 5 // found in the LICENSE file. | |
| 6 | |
| 7 /** @fileoverview Externs generated from namespace: searchEnginesPrivate */ | |
| 8 | |
| 9 /** | |
| 10 * @const | |
| 11 */ | |
| 12 chrome.searchEnginesPrivate = {}; | |
| 13 | |
| 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 /** | |
| 45 * @typedef {{ | |
| 46 * guid: string, | |
| 47 * name: string, | |
| 48 * keyword: string, | |
| 49 * url: string, | |
| 50 * type: !chrome.searchEnginesPrivate.SearchEngineType, | |
| 51 * isSelected: (boolean|undefined) | |
| 52 * }} | |
| 53 * @see https://developer.chrome.com/extensions/searchEnginesPrivate#type-Search
Engine | |
| 54 */ | |
| 55 var SearchEngine; | |
| 56 | |
| 57 /** | |
| 58 * Gets a list of the search engines. Exactly one of the values should have | |
| 59 * default == true. | |
| 60 * @param {function(!Array<SearchEngine>):void} callback | |
| 61 * @see https://developer.chrome.com/extensions/searchEnginesPrivate#method-getS
earchEngines | |
| 62 */ | |
| 63 chrome.searchEnginesPrivate.getSearchEngines = function(callback) {}; | |
| 64 | |
| 65 /** | |
| 66 * Sets the search engine with the given GUID as the selected default. | |
| 67 * @param {string} guid | |
| 68 * @see https://developer.chrome.com/extensions/searchEnginesPrivate#method-setS
electedSearchEngine | |
| 69 */ | |
| 70 chrome.searchEnginesPrivate.setSelectedSearchEngine = function(guid) {}; | |
| 71 | |
| 72 /** | |
| 73 * Adds a new "other" (non-default) search engine with the given name, keyword, | |
| 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. | |
| 118 * @type {!ChromeEvent} | |
| 119 * @see https://developer.chrome.com/extensions/searchEnginesPrivate#event-onSea
rchEnginesChanged | |
| 120 */ | |
| 121 chrome.searchEnginesPrivate.onSearchEnginesChanged; | |
| 122 | |
| 123 | |
| OLD | NEW |