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

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

Issue 3081019: Add chromeos namespace to the language options page and its friends. (Closed)
Patch Set: Created 10 years, 4 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) 2010 The Chromium Authors. All rights reserved. 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 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/chromeos/dom_ui/language_hangul_options_handler.h" 5 #include "chrome/browser/chromeos/dom_ui/language_hangul_options_handler.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/chromeos/language_preferences.h" 10 #include "chrome/browser/chromeos/language_preferences.h"
11 #include "grit/generated_resources.h" 11 #include "grit/generated_resources.h"
12 12
13 namespace chromeos {
14
13 LanguageHangulOptionsHandler::LanguageHangulOptionsHandler() { 15 LanguageHangulOptionsHandler::LanguageHangulOptionsHandler() {
14 } 16 }
15 17
16 LanguageHangulOptionsHandler::~LanguageHangulOptionsHandler() { 18 LanguageHangulOptionsHandler::~LanguageHangulOptionsHandler() {
17 } 19 }
18 20
19 void LanguageHangulOptionsHandler::GetLocalizedValues( 21 void LanguageHangulOptionsHandler::GetLocalizedValues(
20 DictionaryValue* localized_strings) { 22 DictionaryValue* localized_strings) {
21 DCHECK(localized_strings); 23 DCHECK(localized_strings);
22 // Language Hangul page - ChromeOS 24 // Language Hangul page - ChromeOS
23 localized_strings->SetString(L"keyboard_layout", 25 localized_strings->SetString(L"keyboard_layout",
24 l10n_util::GetString(IDS_OPTIONS_SETTINGS_KEYBOARD_LAYOUT_TEXT)); 26 l10n_util::GetString(IDS_OPTIONS_SETTINGS_KEYBOARD_LAYOUT_TEXT));
25 27
26 localized_strings->Set(L"keyboardLayoutList", GetKeyboardLayoutList()); 28 localized_strings->Set(L"keyboardLayoutList", GetKeyboardLayoutList());
27 } 29 }
28 30
29 ListValue* LanguageHangulOptionsHandler::GetKeyboardLayoutList() { 31 ListValue* LanguageHangulOptionsHandler::GetKeyboardLayoutList() {
30 ListValue* keyboard_layout_list = new ListValue(); 32 ListValue* keyboard_layout_list = new ListValue();
31 for (size_t i = 0; i < arraysize(chromeos::kHangulKeyboardNameIDPairs); ++i) { 33 for (size_t i = 0; i < arraysize(kHangulKeyboardNameIDPairs); ++i) {
32 ListValue* option = new ListValue(); 34 ListValue* option = new ListValue();
33 option->Append(Value::CreateStringValue(ASCIIToWide( 35 option->Append(Value::CreateStringValue(ASCIIToWide(
34 chromeos::kHangulKeyboardNameIDPairs[i].keyboard_id))); 36 kHangulKeyboardNameIDPairs[i].keyboard_id)));
35 option->Append(Value::CreateStringValue(l10n_util::GetString( 37 option->Append(Value::CreateStringValue(l10n_util::GetString(
36 chromeos::kHangulKeyboardNameIDPairs[i].message_id))); 38 kHangulKeyboardNameIDPairs[i].message_id)));
37 keyboard_layout_list->Append(option); 39 keyboard_layout_list->Append(option);
38 } 40 }
39 return keyboard_layout_list; 41 return keyboard_layout_list;
40 } 42 }
43
44 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698