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

Side by Side Diff: chrome/browser/chromeos/dom_ui/language_hangul_options_handler.cc

Issue 2853032: Add a DOM UI version of ibus-hangul configuration dialog. (Closed)
Patch Set: '' Created 10 years, 5 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
(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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698