Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Unified Diff: third_party/closure_compiler/externs/search_engines_private.js

Issue 1109563003: Implement remaining chrome.searchEnginesPrivate methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address last comment sync fix trybot failure Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/browser/extension_function_histogram_value.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/closure_compiler/externs/search_engines_private.js
diff --git a/third_party/closure_compiler/externs/search_engines_private.js b/third_party/closure_compiler/externs/search_engines_private.js
index 8d6bedd4392b4a12096a4485f3487eae46a0171d..c87ee7ab666a791648e8f764a1727fa41e04a1f8 100644
--- a/third_party/closure_compiler/externs/search_engines_private.js
+++ b/third_party/closure_compiler/externs/search_engines_private.js
@@ -12,9 +12,42 @@ search_engines_private_externs.js
chrome.searchEnginesPrivate = {};
/**
+ * @enum {string}
+ * @see https://developer.chrome.com/extensions/searchEnginesPrivate#type-HotwordFeature
+ */
+chrome.searchEnginesPrivate.HotwordFeature = {
+ SEARCH: 'SEARCH',
+ ALWAYS_ON: 'ALWAYS_ON',
+ RETRAIN_LINK: 'RETRAIN_LINK',
+ AUDIO_HISTORY: 'AUDIO_HISTORY',
+};
+
+/**
+ * @enum {string}
+ * @see https://developer.chrome.com/extensions/searchEnginesPrivate#type-SearchEngineType
+ */
+chrome.searchEnginesPrivate.SearchEngineType = {
+ DEFAULT: 'DEFAULT',
+ OTHER: 'OTHER',
+};
+
+/**
+ * @typedef {{
+ * availability: !Array<!chrome.searchEnginesPrivate.HotwordFeature>,
+ * audioHistoryState: (string|undefined),
+ * errorMsg: (string|undefined)
+ * }}
+ * @see https://developer.chrome.com/extensions/searchEnginesPrivate#type-HotwordState
+ */
+var HotwordState;
+
+/**
* @typedef {{
* guid: string,
* name: string,
+ * keyword: string,
+ * url: string,
+ * type: !chrome.searchEnginesPrivate.SearchEngineType,
* isSelected: (boolean|undefined)
* }}
* @see https://developer.chrome.com/extensions/searchEnginesPrivate#type-SearchEngine
@@ -22,12 +55,12 @@ chrome.searchEnginesPrivate = {};
var SearchEngine;
/**
- * Gets a list of the "default” search engines. Exactly one of the values
- * should have default == true.
+ * Gets a list of the search engines. Exactly one of the values should have
+ * default == true.
* @param {function(!Array<SearchEngine>):void} callback
- * @see https://developer.chrome.com/extensions/searchEnginesPrivate#method-getDefaultSearchEngines
+ * @see https://developer.chrome.com/extensions/searchEnginesPrivate#method-getSearchEngines
*/
-chrome.searchEnginesPrivate.getDefaultSearchEngines = function(callback) {};
+chrome.searchEnginesPrivate.getSearchEngines = function(callback) {};
/**
* Sets the search engine with the given GUID as the selected default.
@@ -37,11 +70,54 @@ chrome.searchEnginesPrivate.getDefaultSearchEngines = function(callback) {};
chrome.searchEnginesPrivate.setSelectedSearchEngine = function(guid) {};
/**
- * Fires when the list of default search engines changes or when the user
- * selects a preferred default search engine.
+ * Adds a new "other" (non-default) search engine with the given name, keyword,
+ * and URL.
+ * @param {string} name
+ * @param {string} keyword
+ * @param {string} url
+ * @see https://developer.chrome.com/extensions/searchEnginesPrivate#method-addOtherSearchEngine
+ */
+chrome.searchEnginesPrivate.addOtherSearchEngine = function(name, keyword, url) {};
+
+/**
+ * Updates the search engine that has the given GUID, with the given name,
+ * keyword, and URL.
+ * @param {string} guid
+ * @param {string} name
+ * @param {string} keyword
+ * @param {string} url
+ * @see https://developer.chrome.com/extensions/searchEnginesPrivate#method-updateSearchEngine
+ */
+chrome.searchEnginesPrivate.updateSearchEngine = function(guid, name, keyword, url) {};
+
+/**
+ * Removes the search engine with the given GUID.
+ * @param {string} guid
+ * @see https://developer.chrome.com/extensions/searchEnginesPrivate#method-removeSearchEngine
+ */
+chrome.searchEnginesPrivate.removeSearchEngine = function(guid) {};
+
+/**
+ * Gets the hotword state.
+ * @param {function(HotwordState):void} callback
+ * @see https://developer.chrome.com/extensions/searchEnginesPrivate#method-getHotwordState
+ */
+chrome.searchEnginesPrivate.getHotwordState = function(callback) {};
+
+/**
+ * Opts in to hotwording; |retrain| indicates whether the user wants to retrain
+ * the hotword system with their voice by launching the audio verification app.
+ * @param {boolean} retrain
+ * @see https://developer.chrome.com/extensions/searchEnginesPrivate#method-optIntoHotwording
+ */
+chrome.searchEnginesPrivate.optIntoHotwording = function(retrain) {};
+
+/**
+ * Fires when the list of search engines changes or when the user selects a
+ * preferred default search engine. The new list of engines is passed along.
* @type {!ChromeEvent}
- * @see https://developer.chrome.com/extensions/searchEnginesPrivate#event-onDefaultSearchEnginesChanged
+ * @see https://developer.chrome.com/extensions/searchEnginesPrivate#event-onSearchEnginesChanged
*/
-chrome.searchEnginesPrivate.onDefaultSearchEnginesChanged;
+chrome.searchEnginesPrivate.onSearchEnginesChanged;
« no previous file with comments | « extensions/browser/extension_function_histogram_value.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698