OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/chromeos/dom_ui/language_hangul_options_handler.h" |
| 6 |
| 7 #include "app/l10n_util.h" |
| 8 #include "base/values.h" |
| 9 #include "chrome/browser/chromeos/language_preferences.h" |
| 10 #include "grit/generated_resources.h" |
| 11 |
| 12 LanguageHangulOptionsHandler::LanguageHangulOptionsHandler() { |
| 13 } |
| 14 |
| 15 LanguageHangulOptionsHandler::~LanguageHangulOptionsHandler() { |
| 16 } |
| 17 |
| 18 void LanguageHangulOptionsHandler::GetLocalizedValues( |
| 19 DictionaryValue* localized_strings) { |
| 20 DCHECK(localized_strings); |
| 21 // Language Hangul page - ChromeOS |
| 22 localized_strings->SetString(L"keyboard_layout", |
| 23 l10n_util::GetString(IDS_OPTIONS_SETTINGS_KEYBOARD_LAYOUT_TEXT)); |
| 24 |
| 25 localized_strings->Set(L"keyboardLayoutList", GetKeyboardLayoutList()); |
| 26 } |
| 27 |
| 28 ListValue* LanguageHangulOptionsHandler::GetKeyboardLayoutList() { |
| 29 ListValue* keyboard_layout_list = new ListValue(); |
| 30 for (size_t i = 0; i < arraysize(chromeos::kHangulKeyboardNameIDPairs); ++i) { |
| 31 ListValue* option = new ListValue(); |
| 32 option->Append(Value::CreateStringValue(ASCIIToWide( |
| 33 chromeos::kHangulKeyboardNameIDPairs[i].keyboard_id))); |
| 34 option->Append(Value::CreateStringValue(l10n_util::GetString( |
| 35 chromeos::kHangulKeyboardNameIDPairs[i].message_id))); |
| 36 keyboard_layout_list->Append(option); |
| 37 } |
| 38 return keyboard_layout_list; |
| 39 } |
OLD | NEW |