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

Side by Side Diff: chrome/browser/chromeos/input_method/input_method_util.h

Issue 5990008: Remove wstring from l10n_util. Part 1.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 12 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 | Annotate | Revision Log
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 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_UTIL_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_UTIL_H_
6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_UTIL_H_ 6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_UTIL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 // "USA" (US keyboard) when |input_method_id| is unknown. 98 // "USA" (US keyboard) when |input_method_id| is unknown.
99 // Examples: "pinyin" => "Pinyin" 99 // Examples: "pinyin" => "Pinyin"
100 // "m17n:ar:kbd" => "kbd (m17n)" 100 // "m17n:ar:kbd" => "kbd (m17n)"
101 std::string GetInputMethodDisplayNameFromId(const std::string& input_method_id); 101 std::string GetInputMethodDisplayNameFromId(const std::string& input_method_id);
102 102
103 // Converts a language code to a language display name, using the 103 // Converts a language code to a language display name, using the
104 // current application locale. MaybeRewriteLanguageName() is called 104 // current application locale. MaybeRewriteLanguageName() is called
105 // internally. 105 // internally.
106 // Examples: "fi" => "Finnish" 106 // Examples: "fi" => "Finnish"
107 // "en-US" => "English (United States)" 107 // "en-US" => "English (United States)"
108 std::wstring GetLanguageDisplayNameFromCode(const std::string& language_code); 108 string16 GetLanguageDisplayNameFromCode(const std::string& language_code);
109 109
110 // Converts a language code to a language native display name. 110 // Converts a language code to a language native display name.
111 // MaybeRewriteLanguageName() is called internally. 111 // MaybeRewriteLanguageName() is called internally.
112 // Examples: "fi" => "suomi" (rather than Finnish) 112 // Examples: "fi" => "suomi" (rather than Finnish)
113 // "en-US" => "English (United States)" 113 // "en-US" => "English (United States)"
114 std::wstring GetLanguageNativeDisplayNameFromCode( 114 string16 GetLanguageNativeDisplayNameFromCode(const std::string& language_code);
115 const std::string& language_code);
116 115
117 // Sorts the given language codes by their corresponding language names, 116 // Sorts the given language codes by their corresponding language names,
118 // using the unicode string comparator. Uses unstable sorting. 117 // using the unicode string comparator. Uses unstable sorting.
119 void SortLanguageCodesByNames(std::vector<std::string>* language_codes); 118 void SortLanguageCodesByNames(std::vector<std::string>* language_codes);
120 119
121 // Sorts the given input method ids by their corresponding language names, 120 // Sorts the given input method ids by their corresponding language names,
122 // using the unicode string comparator. Uses stable sorting. 121 // using the unicode string comparator. Uses stable sorting.
123 void SortInputMethodIdsByNames(std::vector<std::string>* input_method_ids); 122 void SortInputMethodIdsByNames(std::vector<std::string>* input_method_ids);
124 123
125 enum InputMethodType { 124 enum InputMethodType {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 const std::string& normalized_language_code, 160 const std::string& normalized_language_code,
162 InputMethodType type, 161 InputMethodType type,
163 std::vector<std::string>* out_input_method_ids); 162 std::vector<std::string>* out_input_method_ids);
164 163
165 void OnLocaleChanged(); 164 void OnLocaleChanged();
166 165
167 } // namespace input_method 166 } // namespace input_method
168 } // namespace chromeos 167 } // namespace chromeos
169 168
170 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_UTIL_H_ 169 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698