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

Side by Side Diff: chrome/browser/ui/webui/options/chromeos/language_hangul_handler.cc

Issue 16025007: Refacotring: fix styles of i18n-content names. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bug fix Created 7 years, 6 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 #include "chrome/browser/ui/webui/options/chromeos/language_hangul_handler.h" 5 #include "chrome/browser/ui/webui/options/chromeos/language_hangul_handler.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/chromeos/language_preferences.h" 9 #include "chrome/browser/chromeos/language_preferences.h"
10 #include "grit/generated_resources.h" 10 #include "grit/generated_resources.h"
11 #include "ui/base/l10n/l10n_util.h" 11 #include "ui/base/l10n/l10n_util.h"
12 12
13 namespace chromeos { 13 namespace chromeos {
14 namespace options { 14 namespace options {
15 15
16 LanguageHangulHandler::LanguageHangulHandler() { 16 LanguageHangulHandler::LanguageHangulHandler() {
17 } 17 }
18 18
19 LanguageHangulHandler::~LanguageHangulHandler() { 19 LanguageHangulHandler::~LanguageHangulHandler() {
20 } 20 }
21 21
22 void LanguageHangulHandler::GetLocalizedValues( 22 void LanguageHangulHandler::GetLocalizedValues(
23 DictionaryValue* localized_strings) { 23 DictionaryValue* localized_strings) {
24 DCHECK(localized_strings); 24 DCHECK(localized_strings);
25 25
26 RegisterTitle(localized_strings, "languageHangulPage", 26 RegisterTitle(localized_strings, "languageHangulPage",
27 IDS_OPTIONS_SETTINGS_LANGUAGES_HANGUL_SETTINGS_TITLE); 27 IDS_OPTIONS_SETTINGS_LANGUAGES_HANGUL_SETTINGS_TITLE);
28 28
29 localized_strings->SetString("hangul_keyboard_layout", 29 localized_strings->SetString("hangulKeyboardLayout",
30 l10n_util::GetStringUTF16(IDS_OPTIONS_SETTINGS_KEYBOARD_LAYOUT_TEXT)); 30 l10n_util::GetStringUTF16(IDS_OPTIONS_SETTINGS_KEYBOARD_LAYOUT_TEXT));
31 31
32 localized_strings->Set("HangulkeyboardLayoutList", GetKeyboardLayoutList()); 32 localized_strings->Set("HangulkeyboardLayoutList", GetKeyboardLayoutList());
33 } 33 }
34 34
35 ListValue* LanguageHangulHandler::GetKeyboardLayoutList() { 35 ListValue* LanguageHangulHandler::GetKeyboardLayoutList() {
36 ListValue* keyboard_layout_list = new ListValue(); 36 ListValue* keyboard_layout_list = new ListValue();
37 for (size_t i = 0; i < language_prefs::kNumHangulKeyboardNameIDPairs; ++i) { 37 for (size_t i = 0; i < language_prefs::kNumHangulKeyboardNameIDPairs; ++i) {
38 ListValue* option = new ListValue(); 38 ListValue* option = new ListValue();
39 option->Append(new base::StringValue( 39 option->Append(new base::StringValue(
40 language_prefs::kHangulKeyboardNameIDPairs[i].keyboard_id)); 40 language_prefs::kHangulKeyboardNameIDPairs[i].keyboard_id));
41 option->Append(new base::StringValue(l10n_util::GetStringUTF16( 41 option->Append(new base::StringValue(l10n_util::GetStringUTF16(
42 language_prefs::kHangulKeyboardNameIDPairs[i].message_id))); 42 language_prefs::kHangulKeyboardNameIDPairs[i].message_id)));
43 keyboard_layout_list->Append(option); 43 keyboard_layout_list->Append(option);
44 } 44 }
45 return keyboard_layout_list; 45 return keyboard_layout_list;
46 } 46 }
47 47
48 } // namespace options 48 } // namespace options
49 } // namespace chromeos 49 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698