1 search_engines_private_externs.js
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.
7 /** @fileoverview Externs generated from namespace: searchEnginesPrivate */
12 chrome.searchEnginesPrivate = {};
16 * @see https://developer.chrome.com/extensions/searchEnginesPrivate#type-HotwordFeature
18 chrome.searchEnginesPrivate.HotwordFeature = {
20 ALWAYS_ON: 'ALWAYS_ON',
21 RETRAIN_LINK: 'RETRAIN_LINK',
22 AUDIO_HISTORY: 'AUDIO_HISTORY',
27 * @see https://developer.chrome.com/extensions/searchEnginesPrivate#type-SearchEngineType
29 chrome.searchEnginesPrivate.SearchEngineType = {
36 * availability: !Array<!chrome.searchEnginesPrivate.HotwordFeature>,
37 * audioHistoryState: (string|undefined),
38 * errorMsg: (string|undefined)
40 * @see https://developer.chrome.com/extensions/searchEnginesPrivate#type-HotwordState
50 * type: !chrome.searchEnginesPrivate.SearchEngineType,
51 * isSelected: (boolean|undefined)
53 * @see https://developer.chrome.com/extensions/searchEnginesPrivate#type-SearchEngine
58 * Gets a list of the search engines. Exactly one of the values should have
60 * @param {function(!Array<SearchEngine>):void} callback
61 * @see https://developer.chrome.com/extensions/searchEnginesPrivate#method-getSearchEngines
63 chrome.searchEnginesPrivate.getSearchEngines = function(callback) {};
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-setSelectedSearchEngine
70 chrome.searchEnginesPrivate.setSelectedSearchEngine = function(guid) {};
73 * Adds a new "other" (non-default) search engine with the given name, keyword,
75 * @param {string} name
76 * @param {string} keyword
78 * @see https://developer.chrome.com/extensions/searchEnginesPrivate#method-addOtherSearchEngine
80 chrome.searchEnginesPrivate.addOtherSearchEngine = function(name, keyword, url) {};
83 * Updates the search engine that has the given GUID, with the given name,
85 * @param {string} guid
86 * @param {string} name
87 * @param {string} keyword
89 * @see https://developer.chrome.com/extensions/searchEnginesPrivate#method-updateSearchEngine
91 chrome.searchEnginesPrivate.updateSearchEngine = function(guid, name, keyword, url) {};
94 * Removes the search engine with the given GUID.
95 * @param {string} guid
96 * @see https://developer.chrome.com/extensions/searchEnginesPrivate#method-removeSearchEngine
98 chrome.searchEnginesPrivate.removeSearchEngine = function(guid) {};
101 * Gets the hotword state.
102 * @param {function(HotwordState):void} callback
103 * @see https://developer.chrome.com/extensions/searchEnginesPrivate#method-getHotwordState
105 chrome.searchEnginesPrivate.getHotwordState = function(callback) {};
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-optIntoHotwording
113 chrome.searchEnginesPrivate.optIntoHotwording = function(retrain) {};
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-onSearchEnginesChanged
121 chrome.searchEnginesPrivate.onSearchEnginesChanged;