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 * @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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 47 type: Boolean, | 47 type: Boolean, |
| 48 value: false, | 48 value: false, |
| 49 }, | 49 }, |
| 50 | 50 |
| 51 /** | 51 /** |
| 52 * Dictionary defining page visibility. | 52 * Dictionary defining page visibility. |
| 53 * This is only set when in guest mode. All pages are visible when not set | 53 * This is only set when in guest mode. All pages are visible when not set |
| 54 * because polymer only notifies after a property is set. | 54 * because polymer only notifies after a property is set. |
| 55 * @private {!GuestModePageVisibility} | 55 * @private {!GuestModePageVisibility} |
| 56 */ | 56 */ |
| 57 pageVisibility_: Object, | 57 pageVisibility_: { |
| 58 type: Object, | |
| 59 value: function() { | |
|
dpapad
2017/06/28 01:16:11
Is the function() wrapper necessary? Can this be s
scottchen
2017/06/28 20:51:49
Done.
| |
| 60 return settings.PageVisibility; | |
| 61 } | |
| 62 }, | |
| 58 | 63 |
| 59 /** @private */ | 64 /** @private */ |
| 60 showAndroidApps_: Boolean, | 65 showAndroidApps_: Boolean, |
| 61 | 66 |
| 62 /** @private */ | 67 /** @private */ |
| 63 lastSearchQuery_: { | 68 lastSearchQuery_: { |
| 64 type: String, | 69 type: String, |
| 65 value: '', | 70 value: '', |
| 66 } | 71 } |
| 67 }, | 72 }, |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 119 networkListItemConnecting: | 124 networkListItemConnecting: |
| 120 loadTimeData.getString('networkListItemConnecting'), | 125 loadTimeData.getString('networkListItemConnecting'), |
| 121 networkListItemConnectingTo: | 126 networkListItemConnectingTo: |
| 122 loadTimeData.getString('networkListItemConnectingTo'), | 127 loadTimeData.getString('networkListItemConnectingTo'), |
| 123 networkListItemNotConnected: | 128 networkListItemNotConnected: |
| 124 loadTimeData.getString('networkListItemNotConnected'), | 129 loadTimeData.getString('networkListItemNotConnected'), |
| 125 vpnNameTemplate: loadTimeData.getString('vpnNameTemplate'), | 130 vpnNameTemplate: loadTimeData.getString('vpnNameTemplate'), |
| 126 }; | 131 }; |
| 127 // </if> | 132 // </if> |
| 128 | 133 |
| 129 if (loadTimeData.getBoolean('isGuest')) { | |
| 130 this.pageVisibility_ = { | |
| 131 passwordsAndForms: false, | |
| 132 people: false, | |
| 133 onStartup: false, | |
| 134 reset: false, | |
| 135 // <if expr="not chromeos"> | |
| 136 appearance: false, | |
| 137 defaultBrowser: false, | |
| 138 advancedSettings: false, | |
| 139 // </if> | |
| 140 // <if expr="chromeos"> | |
| 141 appearance: { | |
| 142 setWallpaper: false, | |
| 143 setTheme: false, | |
| 144 homeButton: false, | |
| 145 bookmarksBar: false, | |
| 146 pageZoom: false, | |
| 147 }, | |
| 148 advancedSettings: true, | |
| 149 privacy: { | |
| 150 searchPrediction: false, | |
| 151 networkPrediction: false, | |
| 152 }, | |
| 153 downloads: { | |
| 154 googleDrive: false, | |
| 155 }, | |
| 156 // </if> | |
| 157 }; | |
| 158 } | |
| 159 | |
| 160 this.showAndroidApps_ = loadTimeData.valueExists('androidAppsVisible') && | 134 this.showAndroidApps_ = loadTimeData.valueExists('androidAppsVisible') && |
| 161 loadTimeData.getBoolean('androidAppsVisible'); | 135 loadTimeData.getBoolean('androidAppsVisible'); |
| 162 | 136 |
| 163 this.addEventListener('show-container', function() { | 137 this.addEventListener('show-container', function() { |
| 164 this.$.container.style.visibility = 'visible'; | 138 this.$.container.style.visibility = 'visible'; |
| 165 }.bind(this)); | 139 }.bind(this)); |
| 166 | 140 |
| 167 this.addEventListener('hide-container', function() { | 141 this.addEventListener('hide-container', function() { |
| 168 this.$.container.style.visibility = 'hidden'; | 142 this.$.container.style.visibility = 'hidden'; |
| 169 }.bind(this)); | 143 }.bind(this)); |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 286 listenOnce(this.$.container, ['blur', 'pointerdown'], function() { | 260 listenOnce(this.$.container, ['blur', 'pointerdown'], function() { |
| 287 this.$.container.removeAttribute('tabindex'); | 261 this.$.container.removeAttribute('tabindex'); |
| 288 }.bind(this)); | 262 }.bind(this)); |
| 289 }, | 263 }, |
| 290 | 264 |
| 291 /** @private */ | 265 /** @private */ |
| 292 directionDelegateChanged_: function() { | 266 directionDelegateChanged_: function() { |
| 293 this.$.drawer.align = this.directionDelegate.isRtl() ? 'right' : 'left'; | 267 this.$.drawer.align = this.directionDelegate.isRtl() ? 'right' : 'left'; |
| 294 }, | 268 }, |
| 295 }); | 269 }); |
| OLD | NEW |