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

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

Issue 8889041: first cut at uber page (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: mac compile Created 9 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 OptionsPage = options.OptionsPage; 9 const OptionsPage = options.OptionsPage;
10 const LanguageList = options.LanguageList; 10 const LanguageList = options.LanguageList;
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 // currently in use. 343 // currently in use.
344 uiLanguageButton.textContent = 344 uiLanguageButton.textContent =
345 localStrings.getString('is_displayed_in_this_language'); 345 localStrings.getString('is_displayed_in_this_language');
346 // Make it look like a text label. 346 // Make it look like a text label.
347 uiLanguageButton.className = 'text-button'; 347 uiLanguageButton.className = 'text-button';
348 // Remove the event listner. 348 // Remove the event listner.
349 uiLanguageButton.onclick = undefined; 349 uiLanguageButton.onclick = undefined;
350 } else if (languageCode in templateData.uiLanguageCodeSet) { 350 } else if (languageCode in templateData.uiLanguageCodeSet) {
351 // If the language is supported as UI language, users can click on 351 // If the language is supported as UI language, users can click on
352 // the button to change the UI language. 352 // the button to change the UI language.
353 if (cr.commandLine.options['--bwsi']) { 353 if (cr.commandLine && cr.commandLine.options['--bwsi']) {
354 // In the guest mode for ChromeOS, changing UI language does not make 354 // In the guest mode for ChromeOS, changing UI language does not make
355 // sense because it does not take effect after browser restart. 355 // sense because it does not take effect after browser restart.
356 uiLanguageButton.hidden = true; 356 uiLanguageButton.hidden = true;
357 } else { 357 } else {
358 uiLanguageButton.textContent = 358 uiLanguageButton.textContent =
359 localStrings.getString('display_in_this_language'); 359 localStrings.getString('display_in_this_language');
360 uiLanguageButton.className = ''; 360 uiLanguageButton.className = '';
361 // Send the change request to Chrome. 361 // Send the change request to Chrome.
362 uiLanguageButton.onclick = function(e) { 362 uiLanguageButton.onclick = function(e) {
363 chrome.send('uiLanguageChange', [languageCode]); 363 chrome.send('uiLanguageChange', [languageCode]);
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 LanguageOptions.uiLanguageSaved = function() { 802 LanguageOptions.uiLanguageSaved = function() {
803 $('language-options-ui-language-button').style.display = 'none'; 803 $('language-options-ui-language-button').style.display = 'none';
804 $('language-options-ui-notification-bar').style.display = 'block'; 804 $('language-options-ui-notification-bar').style.display = 'block';
805 }; 805 };
806 806
807 // Export 807 // Export
808 return { 808 return {
809 LanguageOptions: LanguageOptions 809 LanguageOptions: LanguageOptions
810 }; 810 };
811 }); 811 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/browser_options.js ('k') | chrome/browser/resources/options/personal_options.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698