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 * @fileoverview | 6 * @fileoverview |
7 * 'settings-ui' implements the UI for the Settings page. | 7 * 'settings-ui' implements the UI for the Settings page. |
8 * | 8 * |
9 * Example: | 9 * Example: |
10 * | 10 * |
(...skipping 30 matching lines...) Expand all Loading... |
41 notify: true, | 41 notify: true, |
42 }, | 42 }, |
43 | 43 |
44 /** @private {boolean} */ | 44 /** @private {boolean} */ |
45 toolbarSpinnerActive_: { | 45 toolbarSpinnerActive_: { |
46 type: Boolean, | 46 type: Boolean, |
47 value: false, | 47 value: false, |
48 }, | 48 }, |
49 | 49 |
50 /** | 50 /** |
51 * Dictionary defining page visibility. | 51 * Dictionary defining page visibility. Pages are hidden when their entry |
52 * This is only set when in guest mode. All pages are visible when not set | 52 * is set to *false*. i.e. visibility defaults to true. |
53 * because polymer only notifies after a property is set. | 53 * @private {!PageVisibility} |
54 * @private {!GuestModePageVisibility} | |
55 */ | 54 */ |
56 pageVisibility_: Object, | 55 pageVisibility_: { |
57 | 56 type: Object, |
58 /** @private */ | 57 value: function() { |
59 showAndroidApps_: Boolean, | 58 return {}; |
| 59 }, |
| 60 }, |
60 | 61 |
61 /** @private */ | 62 /** @private */ |
62 lastSearchQuery_: { | 63 lastSearchQuery_: { |
63 type: String, | 64 type: String, |
64 value: '', | 65 value: '', |
65 } | 66 } |
66 }, | 67 }, |
67 | 68 |
68 listeners: { | 69 listeners: { |
69 'refresh-pref': 'onRefreshPref_', | 70 'refresh-pref': 'onRefreshPref_', |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 searchPrediction: false, | 150 searchPrediction: false, |
150 networkPrediction: false, | 151 networkPrediction: false, |
151 }, | 152 }, |
152 downloads: { | 153 downloads: { |
153 googleDrive: false, | 154 googleDrive: false, |
154 }, | 155 }, |
155 // </if> | 156 // </if> |
156 }; | 157 }; |
157 } | 158 } |
158 | 159 |
159 this.showAndroidApps_ = loadTimeData.valueExists('androidAppsAllowed') && | 160 // <if expr="chromeos"> |
| 161 this.pageVisibility_.androidApps = |
| 162 loadTimeData.valueExists('androidAppsAllowed') && |
160 loadTimeData.getBoolean('androidAppsAllowed'); | 163 loadTimeData.getBoolean('androidAppsAllowed'); |
| 164 // </if> |
161 }, | 165 }, |
162 | 166 |
163 /** @private {?IntersectionObserver} */ | 167 /** @private {?IntersectionObserver} */ |
164 intersectionObserver_: null, | 168 intersectionObserver_: null, |
165 | 169 |
166 /** @override */ | 170 /** @override */ |
167 attached: function() { | 171 attached: function() { |
168 document.documentElement.classList.remove('loading'); | 172 document.documentElement.classList.remove('loading'); |
169 | 173 |
170 setTimeout(function() { | 174 setTimeout(function() { |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 this.$.container.removeAttribute('tabindex'); | 280 this.$.container.removeAttribute('tabindex'); |
277 }.bind(this)); | 281 }.bind(this)); |
278 }, | 282 }, |
279 | 283 |
280 /** @private */ | 284 /** @private */ |
281 directionDelegateChanged_: function() { | 285 directionDelegateChanged_: function() { |
282 this.$.drawer.align = this.directionDelegate.isRtl() ? | 286 this.$.drawer.align = this.directionDelegate.isRtl() ? |
283 'right' : 'left'; | 287 'right' : 'left'; |
284 }, | 288 }, |
285 }); | 289 }); |
OLD | NEW |