Chromium Code Reviews| 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 675730ba1462de360a42d39015c8f52ea1397338..4e23e5a8998f76d18a9908026157285efe809c09 100644 |
| --- a/chrome/browser/resources/settings/search_page/search_page.js |
| +++ b/chrome/browser/resources/settings/search_page/search_page.js |
| @@ -36,6 +36,9 @@ Polymer({ |
| * @private {!chrome.settingsPrivate.PrefObject|undefined} |
| */ |
| hotwordSearchEnablePref_: Object, |
| + |
| + /** @private {boolean} */ |
|
stevenjb
2016/12/14 18:16:06
nit: {boolean} is not needed for Polymer Boolean p
fukino
2016/12/15 04:20:41
Done.
|
| + googleNowAvailable_: Boolean, |
| }, |
| /** @private {?settings.SearchEnginesBrowserProxy} */ |
| @@ -61,6 +64,14 @@ Polymer({ |
| this.browserProxy_.getHotwordInfo().then(function(hotwordInfo) { |
| this.hotwordInfoUpdate_(hotwordInfo); |
| }.bind(this)); |
| + |
| + // Google Now cards in the launcher |
| + cr.addWebUIListener( |
| + 'google-now-availability-changed', |
| + this.googleNowAvailabilityUpdate_.bind(this)); |
| + this.browserProxy_.getGoogleNowAvailability().then(function(available) { |
| + this.googleNowAvailabilityUpdate_(available); |
| + }.bind(this)); |
| }, |
| /** @private */ |
| @@ -104,6 +115,14 @@ Polymer({ |
| }, |
| /** |
| + * @param {boolean} available |
| + * @private |
| + */ |
| + googleNowAvailabilityUpdate_: function(available) { |
| + this.googleNowAvailable_ = available; |
| + }, |
| + |
| + /** |
| * @return {string} |
| * @private |
| */ |