Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1136)

Side by Side Diff: chrome/browser/resources/options2/language_options.js

Issue 9464053: Hide/Disable several (meaningless) options in Settings uber-page for Guest. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Another merge Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 // currently in use. 354 // currently in use.
355 uiLanguageButton.textContent = 355 uiLanguageButton.textContent =
356 localStrings.getString('is_displayed_in_this_language'); 356 localStrings.getString('is_displayed_in_this_language');
357 // Make it look like a text label. 357 // Make it look like a text label.
358 uiLanguageButton.className = 'text-button'; 358 uiLanguageButton.className = 'text-button';
359 // Remove the event listner. 359 // Remove the event listner.
360 uiLanguageButton.onclick = undefined; 360 uiLanguageButton.onclick = undefined;
361 } else if (languageCode in templateData.uiLanguageCodeSet) { 361 } else if (languageCode in templateData.uiLanguageCodeSet) {
362 // If the language is supported as UI language, users can click on 362 // If the language is supported as UI language, users can click on
363 // the button to change the UI language. 363 // the button to change the UI language.
364 if (cr.commandLine && cr.commandLine.options['--bwsi']) { 364 if (cr.isChromeOS && AccountsOptions.loggedInAsGuest()) {
365 // In the guest mode for ChromeOS, changing UI language does not make 365 // In the guest mode for ChromeOS, changing UI language does not make
366 // sense because it does not take effect after browser restart. 366 // sense because it does not take effect after browser restart.
367 uiLanguageButton.hidden = true; 367 uiLanguageButton.hidden = true;
368 } else { 368 } else {
369 uiLanguageButton.textContent = 369 uiLanguageButton.textContent =
370 localStrings.getString('display_in_this_language'); 370 localStrings.getString('display_in_this_language');
371 uiLanguageButton.className = ''; 371 uiLanguageButton.className = '';
372 // Send the change request to Chrome. 372 // Send the change request to Chrome.
373 uiLanguageButton.onclick = function(e) { 373 uiLanguageButton.onclick = function(e) {
374 chrome.send('uiLanguageChange', [languageCode]); 374 chrome.send('uiLanguageChange', [languageCode]);
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
814 LanguageOptions.uiLanguageSaved = function() { 814 LanguageOptions.uiLanguageSaved = function() {
815 $('language-options-ui-language-button').style.display = 'none'; 815 $('language-options-ui-language-button').style.display = 'none';
816 $('language-options-ui-notification-bar').style.display = 'block'; 816 $('language-options-ui-notification-bar').style.display = 'block';
817 }; 817 };
818 818
819 // Export 819 // Export
820 return { 820 return {
821 LanguageOptions: LanguageOptions 821 LanguageOptions: LanguageOptions
822 }; 822 };
823 }); 823 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options2/content_settings.js ('k') | chrome/browser/resources/options2/password_manager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698