Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 * @typedef {{about: boolean, settings: boolean}} | 6 * @typedef {{about: boolean, settings: boolean}} |
| 7 */ | 7 */ |
| 8 var MainPageVisibility; | 8 var MainPageVisibility; |
| 9 | 9 |
| 10 /** | 10 /** |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 78 type: Object, | 78 type: Object, |
| 79 value: function() { return {}; }, | 79 value: function() { return {}; }, |
| 80 }, | 80 }, |
| 81 | 81 |
| 82 showAndroidApps: Boolean, | 82 showAndroidApps: Boolean, |
| 83 }, | 83 }, |
| 84 | 84 |
| 85 /** @override */ | 85 /** @override */ |
| 86 attached: function() { | 86 attached: function() { |
| 87 this.listen(this, 'freeze-scroll', 'onFreezeScroll_'); | 87 this.listen(this, 'freeze-scroll', 'onFreezeScroll_'); |
| 88 this.listen(this, 'lazy-loaded', 'onLazyLoaded_'); | |
| 89 }, | |
| 90 | |
| 91 /** @private */ | |
| 92 onLazyLoaded_: function() { | |
| 93 Polymer.dom.flush(); | |
|
Dan Beam
2017/03/18 00:15:51
should we be doing this only in certain cases?
Dan Beam
2017/03/18 00:41:06
we probably should, but let's just see if anybody
dpapad
2017/03/20 20:34:55
Ok.
| |
| 94 this.updateOverscrollForPage_(); | |
| 88 }, | 95 }, |
| 89 | 96 |
| 90 /** @override */ | 97 /** @override */ |
| 91 detached: function() { | 98 detached: function() { |
| 92 this.unlisten(this, 'freeze-scroll', 'onFreezeScroll_'); | 99 this.unlisten(this, 'freeze-scroll', 'onFreezeScroll_'); |
| 93 }, | 100 }, |
| 94 | 101 |
| 95 /** @private */ | 102 /** @private */ |
| 96 overscrollChanged_: function() { | 103 overscrollChanged_: function() { |
| 97 if (!this.overscroll_ && this.boundScroll_) { | 104 if (!this.overscroll_ && this.boundScroll_) { |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 274 text: this.showNoResultsFound_ ? | 281 text: this.showNoResultsFound_ ? |
| 275 loadTimeData.getString('searchNoResults') : | 282 loadTimeData.getString('searchNoResults') : |
| 276 loadTimeData.getStringF('searchResults', query) | 283 loadTimeData.getStringF('searchResults', query) |
| 277 }); | 284 }); |
| 278 } | 285 } |
| 279 }.bind(this)); | 286 }.bind(this)); |
| 280 }.bind(this), 0); | 287 }.bind(this), 0); |
| 281 }.bind(this)); | 288 }.bind(this)); |
| 282 }, | 289 }, |
| 283 }); | 290 }); |
| OLD | NEW |