| 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 7cc406ef400055dc7b2de60a0eed8bbc1c8ca686..c0dbb18a500611cfc0f8a7e112cfe6348a483d02 100644
|
| --- a/chrome/browser/resources/md_history/app.js
|
| +++ b/chrome/browser/resources/md_history/app.js
|
| @@ -24,7 +24,6 @@ Polymer({
|
|
|
| behaviors: [
|
| Polymer.IronScrollTargetBehavior,
|
| - WebUIListenerBehavior,
|
| ],
|
|
|
| properties: {
|
| @@ -117,12 +116,6 @@ Polymer({
|
| document.addEventListener('command', this.onCommand_.bind(this));
|
| },
|
|
|
| - /** @override */
|
| - attached: function() {
|
| - this.addWebUIListener('sign-in-state-updated',
|
| - this.updateSignInState.bind(this));
|
| - },
|
| -
|
| onFirstRender: function() {
|
| setTimeout(function() {
|
| chrome.send(
|
| @@ -259,8 +252,11 @@ Polymer({
|
| var syncedDeviceManagerElem =
|
| /** @type {HistorySyncedDeviceManagerElement} */this
|
| .$$('history-synced-device-manager');
|
| - if (syncedDeviceManagerElem)
|
| - syncedDeviceManagerElem.tabSyncDisabled();
|
| + if (syncedDeviceManagerElem) {
|
| + md_history.ensureLazyLoaded().then(function() {
|
| + syncedDeviceManagerElem.tabSyncDisabled();
|
| + });
|
| + }
|
| return;
|
| }
|
|
|
| @@ -326,13 +322,15 @@ Polymer({
|
| // This allows the synced-device-manager to render so that it can be set as
|
| // the scroll target.
|
| requestAnimationFrame(function() {
|
| - // <iron-pages> can occasionally end up with no item selected during
|
| - // tests.
|
| - if (!this.$.content.selectedItem)
|
| - return;
|
| - this.scrollTarget =
|
| - this.$.content.selectedItem.getContentScrollTarget();
|
| - this._scrollHandler();
|
| + md_history.ensureLazyLoaded().then(function() {
|
| + // <iron-pages> can occasionally end up with no item selected during
|
| + // tests.
|
| + if (!this.$.content.selectedItem)
|
| + return;
|
| + this.scrollTarget =
|
| + this.$.content.selectedItem.getContentScrollTarget();
|
| + this._scrollHandler();
|
| + }.bind(this));
|
| }.bind(this));
|
| this.recordHistoryPageView_();
|
| },
|
|
|