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

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: Fix the event router bug so my test passes now 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
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..4e0382666db067773faab12f86d5ab6c6565ef08 100644
--- a/third_party/closure_compiler/externs/search_engines_private.js
+++ b/third_party/closure_compiler/externs/search_engines_private.js
@@ -12,9 +12,32 @@ 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',
+};
+
+/**
+ * @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,
* isSelected: (boolean|undefined)
* }}
* @see https://developer.chrome.com/extensions/searchEnginesPrivate#type-SearchEngine
@@ -22,8 +45,8 @@ 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 "default" 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
*/
@@ -37,11 +60,69 @@ chrome.searchEnginesPrivate.getDefaultSearchEngines = function(callback) {};
chrome.searchEnginesPrivate.setSelectedSearchEngine = function(guid) {};
/**
+ * Gets a list of the "other" search engines.
+ * @param {function(!Array<SearchEngine>):void} callback
+ * @see https://developer.chrome.com/extensions/searchEnginesPrivate#method-getOtherSearchEngines
+ */
+chrome.searchEnginesPrivate.getOtherSearchEngines = function(callback) {};
+
+/**
+ * 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; behavior depends on whether retrain is needed.
+ * @param {boolean} retrain
+ * @see https://developer.chrome.com/extensions/searchEnginesPrivate#method-optIntoHotwording
+ */
+chrome.searchEnginesPrivate.optIntoHotwording = function(retrain) {};
+
+/**
* Fires when the list of default search engines changes or when the user
- * selects a preferred default search engine.
+ * selects a preferred default search engine. The new list of "default" engines
+ * is passed along.
* @type {!ChromeEvent}
* @see https://developer.chrome.com/extensions/searchEnginesPrivate#event-onDefaultSearchEnginesChanged
*/
chrome.searchEnginesPrivate.onDefaultSearchEnginesChanged;
+/**
+ * Fires when the list of "other" search engines changes. The new list of
+ * "other" engines is passed along.
+ * @type {!ChromeEvent}
+ * @see https://developer.chrome.com/extensions/searchEnginesPrivate#event-onOtherSearchEnginesChanged
+ */
+chrome.searchEnginesPrivate.onOtherSearchEnginesChanged;
+

Powered by Google App Engine
This is Rietveld 408576698