| 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 'settings-language-detail-page' is a sub-page for editing | 6 * @fileoverview 'settings-language-detail-page' is a sub-page for editing |
| 7 * an individual language's settings. | 7 * an individual language's settings. |
| 8 * | 8 * |
| 9 * @group Chrome Settings Elements | 9 * @group Chrome Settings Elements |
| 10 * @element settings-language-detail-page | 10 * @element settings-language-detail-page |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 * The language to display the details for. | 32 * The language to display the details for. |
| 33 * @type {LanguageInfo|undefined} | 33 * @type {LanguageInfo|undefined} |
| 34 */ | 34 */ |
| 35 detail: Object, | 35 detail: Object, |
| 36 }, | 36 }, |
| 37 | 37 |
| 38 ready: function() { | 38 ready: function() { |
| 39 // In a CrOS multi-user session, the primary user controls the UI language. | 39 // In a CrOS multi-user session, the primary user controls the UI language. |
| 40 if (this.isSecondaryUser_()) { | 40 if (this.isSecondaryUser_()) { |
| 41 var indicator = this.$.policyIndicator; | 41 var indicator = this.$.policyIndicator; |
| 42 indicator.indicatorType = CrPolicyIndicator.Type.PRIMARY_USER; | 42 indicator.indicatorType = CrPolicyIndicatorType.PRIMARY_USER; |
| 43 indicator.controllingUser = loadTimeData.getString('primaryUserEmail'); | 43 indicator.controllingUser = loadTimeData.getString('primaryUserEmail'); |
| 44 } | 44 } |
| 45 | 45 |
| 46 // The UI language choice doesn't persist for guests. | 46 // The UI language choice doesn't persist for guests. |
| 47 if (cr.isChromeOS && | 47 if (cr.isChromeOS && |
| 48 (uiAccountTweaks.UIAccountTweaks.loggedInAsGuest() || | 48 (uiAccountTweaks.UIAccountTweaks.loggedInAsGuest() || |
| 49 uiAccountTweaks.UIAccountTweaks.loggedInAsPublicAccount())) { | 49 uiAccountTweaks.UIAccountTweaks.loggedInAsPublicAccount())) { |
| 50 this.$.languageSettings.hidden = true; | 50 this.$.languageSettings.hidden = true; |
| 51 } | 51 } |
| 52 }, | 52 }, |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 }, | 160 }, |
| 161 | 161 |
| 162 /** | 162 /** |
| 163 * Handler for the restart button. | 163 * Handler for the restart button. |
| 164 * @private | 164 * @private |
| 165 */ | 165 */ |
| 166 onRestartTap_: function() { | 166 onRestartTap_: function() { |
| 167 chrome.send('restart'); | 167 chrome.send('restart'); |
| 168 }, | 168 }, |
| 169 }); | 169 }); |
| OLD | NEW |