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, basic: boolean, advanced: boolean}} | 6 * @typedef {{about: boolean, basic: boolean, advanced: boolean}} |
7 */ | 7 */ |
8 var MainPageVisibility; | 8 var MainPageVisibility; |
9 | 9 |
10 /** | 10 /** |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
86 type: Object, | 86 type: Object, |
87 value: function() { return {}; }, | 87 value: function() { return {}; }, |
88 }, | 88 }, |
89 }, | 89 }, |
90 | 90 |
91 /** @override */ | 91 /** @override */ |
92 attached: function() { | 92 attached: function() { |
93 this.listen(this, 'freeze-scroll', 'onFreezeScroll_'); | 93 this.listen(this, 'freeze-scroll', 'onFreezeScroll_'); |
94 var currentRoute = settings.getCurrentRoute(); | 94 var currentRoute = settings.getCurrentRoute(); |
95 this.hasExpandedSection_ = currentRoute && currentRoute.isSubpage(); | 95 this.hasExpandedSection_ = currentRoute && currentRoute.isSubpage(); |
96 if (!loadTimeData.getBoolean('androidAppsAllowed')) | |
97 this.pageVisibility.androidApps = false; | |
michaelpg
2016/12/01 20:15:34
does this work? i'm worried about a couple things:
stevenjb
2016/12/02 00:39:19
Ugh. The way we handle pageVisibility is confusing
michaelpg
2016/12/02 03:47:43
Yeah... I don't know if there's a non-sucky way of
| |
96 }, | 98 }, |
97 | 99 |
98 /** @override */ | 100 /** @override */ |
99 detached: function() { | 101 detached: function() { |
100 this.unlisten(this, 'freeze-scroll', 'onFreezeScroll_'); | 102 this.unlisten(this, 'freeze-scroll', 'onFreezeScroll_'); |
101 }, | 103 }, |
102 | 104 |
103 /** @private */ | 105 /** @private */ |
104 overscrollChanged_: function() { | 106 overscrollChanged_: function() { |
105 if (!this.overscroll_ && this.boundScroll_) { | 107 if (!this.overscroll_ && this.boundScroll_) { |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
356 | 358 |
357 /** | 359 /** |
358 * @param {(boolean|undefined)} visibility | 360 * @param {(boolean|undefined)} visibility |
359 * @return {boolean} True unless visibility is false. | 361 * @return {boolean} True unless visibility is false. |
360 * @private | 362 * @private |
361 */ | 363 */ |
362 showAdvancedSettings_: function(visibility) { | 364 showAdvancedSettings_: function(visibility) { |
363 return visibility !== false; | 365 return visibility !== false; |
364 }, | 366 }, |
365 }); | 367 }); |
OLD | NEW |