OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // TODO(kochi): Generalize the notification as a component and put it | 5 // TODO(kochi): Generalize the notification as a component and put it |
6 // in js/cr/ui/notification.js . | 6 // in js/cr/ui/notification.js . |
7 | 7 |
8 cr.define('options', function() { | 8 cr.define('options', function() { |
9 /** @const */ var OptionsPage = options.OptionsPage; | 9 /** @const */ var OptionsPage = options.OptionsPage; |
10 /** @const */ var LanguageList = options.LanguageList; | 10 /** @const */ var LanguageList = options.LanguageList; |
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
562 } else if (languageCode in loadTimeData.getValue('uiLanguageCodeSet')) { | 562 } else if (languageCode in loadTimeData.getValue('uiLanguageCodeSet')) { |
563 if (cr.isChromeOS && UIAccountTweaks.loggedInAsGuest()) { | 563 if (cr.isChromeOS && UIAccountTweaks.loggedInAsGuest()) { |
564 // In the guest mode for ChromeOS, changing UI language does not make | 564 // In the guest mode for ChromeOS, changing UI language does not make |
565 // sense because it does not take effect after browser restart. | 565 // sense because it does not take effect after browser restart. |
566 uiLanguageButton.hidden = true; | 566 uiLanguageButton.hidden = true; |
567 uiLanguageMessage.hidden = true; | 567 uiLanguageMessage.hidden = true; |
568 } else { | 568 } else { |
569 uiLanguageButton.textContent = | 569 uiLanguageButton.textContent = |
570 loadTimeData.getString('displayInThisLanguage'); | 570 loadTimeData.getString('displayInThisLanguage'); |
571 | 571 |
572 if (loadTimeData.getBoolean('secondaryUser')) { | 572 if (cr.isChromeOS && loadTimeData.getBoolean('secondaryUser')) { |
Dan Beam
2014/05/20 23:34:09
why not loadTimeData.valueExists('secondaryUser')?
michaelpg
2014/05/20 23:39:53
TIL.
| |
573 uiLanguageButton.disabled = true; | 573 uiLanguageButton.disabled = true; |
574 uiLanguageIndicator.setAttribute('controlled-by', 'shared'); | 574 uiLanguageIndicator.setAttribute('controlled-by', 'shared'); |
575 } else { | 575 } else { |
576 uiLanguageButton.onclick = function(e) { | 576 uiLanguageButton.onclick = function(e) { |
577 chrome.send('uiLanguageChange', [languageCode]); | 577 chrome.send('uiLanguageChange', [languageCode]); |
578 }; | 578 }; |
579 } | 579 } |
580 showMutuallyExclusiveNodes( | 580 showMutuallyExclusiveNodes( |
581 [uiLanguageButton, uiLanguageMessage, uiLanguageNotification], 0); | 581 [uiLanguageButton, uiLanguageMessage, uiLanguageNotification], 0); |
582 } | 582 } |
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1327 | 1327 |
1328 LanguageOptions.onComponentManagerInitialized = function(componentImes) { | 1328 LanguageOptions.onComponentManagerInitialized = function(componentImes) { |
1329 LanguageOptions.getInstance().appendComponentExtensionIme_(componentImes); | 1329 LanguageOptions.getInstance().appendComponentExtensionIme_(componentImes); |
1330 }; | 1330 }; |
1331 | 1331 |
1332 // Export | 1332 // Export |
1333 return { | 1333 return { |
1334 LanguageOptions: LanguageOptions | 1334 LanguageOptions: LanguageOptions |
1335 }; | 1335 }; |
1336 }); | 1336 }); |
OLD | NEW |