| Index: chrome/browser/resources/settings/search_engines_page/search_engines_browser_proxy.js
|
| diff --git a/chrome/browser/resources/settings/search_engines_page/search_engines_browser_proxy.js b/chrome/browser/resources/settings/search_engines_page/search_engines_browser_proxy.js
|
| index 54239035f75d14c3abb4035975b01f22d87a6cc4..76642485c2167d0ed2518e2f43a009bf2ff2153e 100644
|
| --- a/chrome/browser/resources/settings/search_engines_page/search_engines_browser_proxy.js
|
| +++ b/chrome/browser/resources/settings/search_engines_page/search_engines_browser_proxy.js
|
| @@ -51,112 +51,108 @@ var SearchPageHotwordInfo;
|
|
|
| cr.define('settings', function() {
|
| /** @interface */
|
| - function SearchEnginesBrowserProxy() {}
|
| -
|
| - SearchEnginesBrowserProxy.prototype = {
|
| + class SearchEnginesBrowserProxy {
|
| /** @param {number} modelIndex */
|
| - setDefaultSearchEngine: function(modelIndex) {},
|
| + setDefaultSearchEngine(modelIndex) {}
|
|
|
| /** @param {number} modelIndex */
|
| - removeSearchEngine: function(modelIndex) {},
|
| + removeSearchEngine(modelIndex) {}
|
|
|
| /** @param {number} modelIndex */
|
| - searchEngineEditStarted: function(modelIndex) {},
|
| + searchEngineEditStarted(modelIndex) {}
|
|
|
| - searchEngineEditCancelled: function() {},
|
| + searchEngineEditCancelled() {}
|
|
|
| /**
|
| * @param {string} searchEngine
|
| * @param {string} keyword
|
| * @param {string} queryUrl
|
| */
|
| - searchEngineEditCompleted: function(searchEngine, keyword, queryUrl) {},
|
| + searchEngineEditCompleted(searchEngine, keyword, queryUrl) {}
|
|
|
| /** @return {!Promise<!SearchEnginesInfo>} */
|
| - getSearchEnginesList: function() {},
|
| + getSearchEnginesList() {}
|
|
|
| /**
|
| * @param {string} fieldName
|
| * @param {string} fieldValue
|
| * @return {!Promise<boolean>}
|
| */
|
| - validateSearchEngineInput: function(fieldName, fieldValue) {},
|
| + validateSearchEngineInput(fieldName, fieldValue) {}
|
|
|
| /** @return {!Promise<!SearchPageHotwordInfo>} */
|
| - getHotwordInfo: function() {},
|
| + getHotwordInfo() {}
|
|
|
| /** @param {boolean} enabled */
|
| - setHotwordSearchEnabled: function(enabled) {},
|
| + setHotwordSearchEnabled(enabled) {}
|
|
|
| /** @return {!Promise<boolean>} */
|
| - getGoogleNowAvailability: function() {},
|
| - };
|
| + getGoogleNowAvailability() {}
|
| + }
|
|
|
| /**
|
| - * @constructor
|
| * @implements {settings.SearchEnginesBrowserProxy}
|
| */
|
| - function SearchEnginesBrowserProxyImpl() {}
|
| - // The singleton instance_ is replaced with a test version of this wrapper
|
| - // during testing.
|
| - cr.addSingletonGetter(SearchEnginesBrowserProxyImpl);
|
| -
|
| - SearchEnginesBrowserProxyImpl.prototype = {
|
| + class SearchEnginesBrowserProxyImpl {
|
| /** @override */
|
| - setDefaultSearchEngine: function(modelIndex) {
|
| + setDefaultSearchEngine(modelIndex) {
|
| chrome.send('setDefaultSearchEngine', [modelIndex]);
|
| - },
|
| + }
|
|
|
| /** @override */
|
| - removeSearchEngine: function(modelIndex) {
|
| + removeSearchEngine(modelIndex) {
|
| chrome.send('removeSearchEngine', [modelIndex]);
|
| - },
|
| + }
|
|
|
| /** @override */
|
| - searchEngineEditStarted: function(modelIndex) {
|
| + searchEngineEditStarted(modelIndex) {
|
| chrome.send('searchEngineEditStarted', [modelIndex]);
|
| - },
|
| + }
|
|
|
| /** @override */
|
| - searchEngineEditCancelled: function() {
|
| + searchEngineEditCancelled() {
|
| chrome.send('searchEngineEditCancelled');
|
| - },
|
| + }
|
|
|
| /** @override */
|
| - searchEngineEditCompleted: function(searchEngine, keyword, queryUrl) {
|
| + searchEngineEditCompleted(searchEngine, keyword, queryUrl) {
|
| chrome.send('searchEngineEditCompleted', [
|
| searchEngine,
|
| keyword,
|
| queryUrl,
|
| ]);
|
| - },
|
| + }
|
|
|
| /** @override */
|
| - getSearchEnginesList: function() {
|
| + getSearchEnginesList() {
|
| return cr.sendWithPromise('getSearchEnginesList');
|
| - },
|
| + }
|
|
|
| /** @override */
|
| - validateSearchEngineInput: function(fieldName, fieldValue) {
|
| + validateSearchEngineInput(fieldName, fieldValue) {
|
| return cr.sendWithPromise(
|
| 'validateSearchEngineInput', fieldName, fieldValue);
|
| - },
|
| + }
|
|
|
| /** @override */
|
| - getHotwordInfo: function() {
|
| + getHotwordInfo() {
|
| return cr.sendWithPromise('getHotwordInfo');
|
| - },
|
| + }
|
|
|
| /** @override */
|
| - setHotwordSearchEnabled: function(enabled) {
|
| + setHotwordSearchEnabled(enabled) {
|
| chrome.send('setHotwordSearchEnabled', [enabled]);
|
| - },
|
| + }
|
|
|
| /** @override */
|
| - getGoogleNowAvailability: function() {
|
| + getGoogleNowAvailability() {
|
| return cr.sendWithPromise('getGoogleNowAvailability');
|
| - },
|
| - };
|
| + }
|
| + }
|
| +
|
| + // The singleton instance_ is replaced with a test version of this wrapper
|
| + // during testing.
|
| + cr.addSingletonGetter(SearchEnginesBrowserProxyImpl);
|
|
|
| return {
|
| SearchEnginesBrowserProxy: SearchEnginesBrowserProxy,
|
|
|