Update mojo sdk to rev 1dc8a9a5db73d3718d99917fadf31f5fb2ebad4f
[chromium-blink-merge.git] / third_party / closure_compiler / externs / search_engines_private.js
blobc87ee7ab666a791648e8f764a1727fa41e04a1f8
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 */
9 /**
10  * @const
11  */
12 chrome.searchEnginesPrivate = {};
14 /**
15  * @enum {string}
16  * @see https://developer.chrome.com/extensions/searchEnginesPrivate#type-HotwordFeature
17  */
18 chrome.searchEnginesPrivate.HotwordFeature = {
19   SEARCH: 'SEARCH',
20   ALWAYS_ON: 'ALWAYS_ON',
21   RETRAIN_LINK: 'RETRAIN_LINK',
22   AUDIO_HISTORY: 'AUDIO_HISTORY',
25 /**
26  * @enum {string}
27  * @see https://developer.chrome.com/extensions/searchEnginesPrivate#type-SearchEngineType
28  */
29 chrome.searchEnginesPrivate.SearchEngineType = {
30   DEFAULT: 'DEFAULT',
31   OTHER: 'OTHER',
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-HotwordState
41  */
42 var HotwordState;
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-SearchEngine
54  */
55 var SearchEngine;
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-getSearchEngines
62  */
63 chrome.searchEnginesPrivate.getSearchEngines = function(callback) {};
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-setSelectedSearchEngine
69  */
70 chrome.searchEnginesPrivate.setSelectedSearchEngine = function(guid) {};
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-addOtherSearchEngine
79  */
80 chrome.searchEnginesPrivate.addOtherSearchEngine = function(name, keyword, url) {};
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-updateSearchEngine
90  */
91 chrome.searchEnginesPrivate.updateSearchEngine = function(guid, name, keyword, url) {};
93 /**
94  * Removes the search engine with the given GUID.
95  * @param {string} guid
96  * @see https://developer.chrome.com/extensions/searchEnginesPrivate#method-removeSearchEngine
97  */
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
104  */
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
112  */
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
120  */
121 chrome.searchEnginesPrivate.onSearchEnginesChanged;