Chromium Code Reviews| Index: chrome/browser/resources/md_history/app.js |
| diff --git a/chrome/browser/resources/md_history/app.js b/chrome/browser/resources/md_history/app.js |
| index 33e2c62d79a61eec7d0d97c1c32fad400fe67ff8..850249d40ed8ab96975e93a83a71e088d86edd57 100644 |
| --- a/chrome/browser/resources/md_history/app.js |
| +++ b/chrome/browser/resources/md_history/app.js |
| @@ -22,7 +22,10 @@ cr.define('md_history', function() { |
| Polymer({ |
| is: 'history-app', |
| - behaviors: [Polymer.IronScrollTargetBehavior], |
| + behaviors: [ |
| + Polymer.IronScrollTargetBehavior, |
| + WebUIListenerBehavior, |
| + ], |
| properties: { |
| // Used to display notices for profile sign-in status. |
| @@ -74,8 +77,7 @@ Polymer({ |
| isUserSignedIn_: { |
| type: Boolean, |
| - // Updated on synced-device-manager attach by chrome.sending |
| - // 'otherDevicesInitialized'. |
| + // Updated on synced-device-manager. |
| value: loadTimeData.getBoolean('isUserSignedIn'), |
| }, |
| @@ -105,6 +107,12 @@ Polymer({ |
| document.addEventListener('command', this.onCommand_.bind(this)); |
| }, |
| + /** @override */ |
| + attached: function() { |
| + this.addWebUIListener('sign-in-state-updated', |
| + this.updateSignInState.bind(this)); |
|
Dan Beam
2016/09/28 03:56:49
this part is perfect :)
|
| + }, |
| + |
| onFirstRender: function() { |
| setTimeout(function() { |
| chrome.send( |