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

Unified Diff: chrome/browser/resources/options/chromeos_language_add_language_overlay.js

Issue 6265010: DOMUI settings: move/rename the language options panel so that it can be use... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/options/chromeos_language_add_language_overlay.js
===================================================================
--- chrome/browser/resources/options/chromeos_language_add_language_overlay.js (revision 71729)
+++ chrome/browser/resources/options/chromeos_language_add_language_overlay.js (working copy)
@@ -1,66 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-///////////////////////////////////////////////////////////////////////////////
-// AddLanguageOverlay class:
-
-cr.define('options.language', function() {
-
- const OptionsPage = options.OptionsPage;
-
- /**
- * Encapsulated handling of ChromeOS add language overlay page.
- * @constructor
- */
- function AddLanguageOverlay() {
- OptionsPage.call(this, 'addLanguageOverlay',
- localStrings.getString('add_button'),
- 'add-language-overlay-page');
- }
-
- cr.addSingletonGetter(AddLanguageOverlay);
-
- AddLanguageOverlay.prototype = {
- // Inherit AddLanguageOverlay from OptionsPage.
- __proto__: OptionsPage.prototype,
-
- /**
- * Initializes AddLanguageOverlay page.
- * Calls base class implementation to starts preference initialization.
- */
- initializePage: function() {
- // Call base class implementation to starts preference initialization.
- OptionsPage.prototype.initializePage.call(this);
-
- // Set up the cancel button.
- $('add-language-overlay-cancel-button').onclick = function(e) {
- OptionsPage.clearOverlays();
- };
-
- // Create the language list with which users can add a language.
- // Note that we have about 40 languages.
- var addLanguageList = $('add-language-overlay-language-list');
- var languageListData = templateData.languageList;
- for (var i = 0; i < languageListData.length; i++) {
- var language = languageListData[i];
- var button = document.createElement('button');
- button.className = 'link-button';
- button.textContent = language.displayName;
- // If the native name is different, add it.
- if (language.displayName != language.nativeDisplayName) {
- button.textContent += ' - ' + language.nativeDisplayName;
- }
- button.languageCode = language.code;
- var li = document.createElement('li');
- li.languageCode = language.code;
- li.appendChild(button);
- addLanguageList.appendChild(li);
- }
- },
- };
-
- return {
- AddLanguageOverlay: AddLanguageOverlay
- };
-});

Powered by Google App Engine
This is Rietveld 408576698