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-basic-page' is the settings page containing the actual settings. | 7 * 'settings-basic-page' is the settings page containing the actual settings. |
8 */ | 8 */ |
9 Polymer({ | 9 Polymer({ |
10 is: 'settings-basic-page', | 10 is: 'settings-basic-page', |
11 | 11 |
12 behaviors: [MainPageBehavior, WebUIListenerBehavior], | 12 behaviors: [MainPageBehavior, WebUIListenerBehavior], |
13 | 13 |
14 properties: { | 14 properties: { |
15 /** Preferences state. */ | 15 /** Preferences state. */ |
16 prefs: { | 16 prefs: { |
17 type: Object, | 17 type: Object, |
18 notify: true, | 18 notify: true, |
19 }, | 19 }, |
20 | 20 |
| 21 // <if expr="chromeos"> |
21 showAndroidApps: Boolean, | 22 showAndroidApps: Boolean, |
22 | 23 |
| 24 showMultidevice: Boolean, |
| 25 |
23 havePlayStoreApp: Boolean, | 26 havePlayStoreApp: Boolean, |
| 27 // </if> |
24 | 28 |
25 /** @type {!AndroidAppsInfo|undefined} */ | 29 /** @type {!AndroidAppsInfo|undefined} */ |
26 androidAppsInfo: Object, | 30 androidAppsInfo: Object, |
27 | 31 |
28 showChromeCleanup: { | 32 showChromeCleanup: { |
29 type: Boolean, | 33 type: Boolean, |
30 value: function() { | 34 value: function() { |
31 return loadTimeData.valueExists('chromeCleanupEnabled') && | 35 return loadTimeData.valueExists('chromeCleanupEnabled') && |
32 loadTimeData.getBoolean('chromeCleanupEnabled'); | 36 loadTimeData.getBoolean('chromeCleanupEnabled'); |
33 }, | 37 }, |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 // settings app is not yet available. | 217 // settings app is not yet available. |
214 if (!this.havePlayStoreApp && | 218 if (!this.havePlayStoreApp && |
215 (!this.androidAppsInfo || !this.androidAppsInfo.settingsAppAvailable)) { | 219 (!this.androidAppsInfo || !this.androidAppsInfo.settingsAppAvailable)) { |
216 return false; | 220 return false; |
217 } | 221 } |
218 | 222 |
219 return true; | 223 return true; |
220 }, | 224 }, |
221 | 225 |
222 /** | 226 /** |
| 227 * @return {boolean} Whether to show the multidevice settings page. |
| 228 * @private |
| 229 */ |
| 230 shouldShowMultidevice_: function() { |
| 231 var visibility = /** @type {boolean|undefined} */ ( |
| 232 this.get('pageVisibility.multidevice')); |
| 233 return this.showMultidevice && this.showPage_(visibility); |
| 234 }, |
| 235 |
| 236 /** |
223 * Hides everything but the newly expanded subpage. | 237 * Hides everything but the newly expanded subpage. |
224 * @private | 238 * @private |
225 */ | 239 */ |
226 onSubpageExpanded_: function() { | 240 onSubpageExpanded_: function() { |
227 this.hasExpandedSection_ = true; | 241 this.hasExpandedSection_ = true; |
228 }, | 242 }, |
229 | 243 |
230 /** | 244 /** |
231 * Render the advanced page now (don't wait for idle). | 245 * Render the advanced page now (don't wait for idle). |
232 * @private | 246 * @private |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 | 301 |
288 /** | 302 /** |
289 * @param {boolean} opened Whether the menu is expanded. | 303 * @param {boolean} opened Whether the menu is expanded. |
290 * @return {string} Icon name. | 304 * @return {string} Icon name. |
291 * @private | 305 * @private |
292 */ | 306 */ |
293 getArrowIcon_: function(opened) { | 307 getArrowIcon_: function(opened) { |
294 return opened ? 'cr:arrow-drop-up' : 'cr:arrow-drop-down'; | 308 return opened ? 'cr:arrow-drop-up' : 'cr:arrow-drop-down'; |
295 }, | 309 }, |
296 }); | 310 }); |
OLD | NEW |