| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @fileoverview A helper object used from the "Manage search engines" section | 6 * @fileoverview A helper object used from the "Manage search engines" section |
| 7 * to interact with the browser. | 7 * to interact with the browser. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 /** | 10 /** |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 * @param {string} fieldValue | 80 * @param {string} fieldValue |
| 81 * @return {!Promise<boolean>} | 81 * @return {!Promise<boolean>} |
| 82 */ | 82 */ |
| 83 validateSearchEngineInput: function(fieldName, fieldValue) {}, | 83 validateSearchEngineInput: function(fieldName, fieldValue) {}, |
| 84 | 84 |
| 85 /** @return {!Promise<!SearchPageHotwordInfo>} */ | 85 /** @return {!Promise<!SearchPageHotwordInfo>} */ |
| 86 getHotwordInfo: function() {}, | 86 getHotwordInfo: function() {}, |
| 87 | 87 |
| 88 /** @param {boolean} enabled */ | 88 /** @param {boolean} enabled */ |
| 89 setHotwordSearchEnabled: function(enabled) {}, | 89 setHotwordSearchEnabled: function(enabled) {}, |
| 90 |
| 91 /** @return {!Promise<boolean>} */ |
| 92 getGoogleNowAvailability() {}, |
| 90 }; | 93 }; |
| 91 | 94 |
| 92 /** | 95 /** |
| 93 * @constructor | 96 * @constructor |
| 94 * @implements {settings.SearchEnginesBrowserProxy} | 97 * @implements {settings.SearchEnginesBrowserProxy} |
| 95 */ | 98 */ |
| 96 function SearchEnginesBrowserProxyImpl() {} | 99 function SearchEnginesBrowserProxyImpl() {} |
| 97 // The singleton instance_ is replaced with a test version of this wrapper | 100 // The singleton instance_ is replaced with a test version of this wrapper |
| 98 // during testing. | 101 // during testing. |
| 99 cr.addSingletonGetter(SearchEnginesBrowserProxyImpl); | 102 cr.addSingletonGetter(SearchEnginesBrowserProxyImpl); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 | 142 |
| 140 /** @override */ | 143 /** @override */ |
| 141 getHotwordInfo: function() { | 144 getHotwordInfo: function() { |
| 142 return cr.sendWithPromise('getHotwordInfo'); | 145 return cr.sendWithPromise('getHotwordInfo'); |
| 143 }, | 146 }, |
| 144 | 147 |
| 145 /** @override */ | 148 /** @override */ |
| 146 setHotwordSearchEnabled: function(enabled) { | 149 setHotwordSearchEnabled: function(enabled) { |
| 147 chrome.send('setHotwordSearchEnabled', [enabled]); | 150 chrome.send('setHotwordSearchEnabled', [enabled]); |
| 148 }, | 151 }, |
| 152 |
| 153 /** @override */ |
| 154 getGoogleNowAvailability: function() { |
| 155 return cr.sendWithPromise('getGoogleNowAvailability'); |
| 156 }, |
| 149 }; | 157 }; |
| 150 | 158 |
| 151 return { | 159 return { |
| 152 SearchEnginesBrowserProxy: SearchEnginesBrowserProxy, | 160 SearchEnginesBrowserProxy: SearchEnginesBrowserProxy, |
| 153 SearchEnginesBrowserProxyImpl: SearchEnginesBrowserProxyImpl, | 161 SearchEnginesBrowserProxyImpl: SearchEnginesBrowserProxyImpl, |
| 154 }; | 162 }; |
| 155 }); | 163 }); |
| OLD | NEW |