| Index: chrome/browser/resources/settings/search_page/search_page.js
|
| diff --git a/chrome/browser/resources/settings/search_page/search_page.js b/chrome/browser/resources/settings/search_page/search_page.js
|
| index 01f0016cf2aa8566fe10aba79a439b7136624925..edcf246a4aee9dae75b9b7fc3c32406af85ebb59 100644
|
| --- a/chrome/browser/resources/settings/search_page/search_page.js
|
| +++ b/chrome/browser/resources/settings/search_page/search_page.js
|
| @@ -54,16 +54,14 @@ Polymer({
|
| // Omnibox search engine
|
| var updateSearchEngines = function(searchEngines) {
|
| this.set('searchEngines_', searchEngines.defaults);
|
| + this.requestHotwordInfoUpdate_();
|
| }.bind(this);
|
| this.browserProxy_.getSearchEnginesList().then(updateSearchEngines);
|
| cr.addWebUIListener('search-engines-changed', updateSearchEngines);
|
|
|
| - // Hotword (OK Google)
|
| + // Hotword (OK Google) listener
|
| cr.addWebUIListener(
|
| 'hotword-info-update', this.hotwordInfoUpdate_.bind(this));
|
| - this.browserProxy_.getHotwordInfo().then(function(hotwordInfo) {
|
| - this.hotwordInfoUpdate_(hotwordInfo);
|
| - }.bind(this));
|
|
|
| // Google Now cards in the launcher
|
| cr.addWebUIListener(
|
| @@ -101,6 +99,13 @@ Polymer({
|
| !!this.hotwordSearchEnablePref_.value);
|
| },
|
|
|
| + /** @private */
|
| + requestHotwordInfoUpdate_: function() {
|
| + this.browserProxy_.getHotwordInfo().then(function(hotwordInfo) {
|
| + this.hotwordInfoUpdate_(hotwordInfo);
|
| + }.bind(this));
|
| + },
|
| +
|
| /**
|
| * @param {!SearchPageHotwordInfo} hotwordInfo
|
| * @private
|
|
|