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

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

Issue 178343005: [IME] migrate the xkb ID to extension based xkb ID. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit tests failures for when the flag is true and false. Created 6 years, 9 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) 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 #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 7
8 #include <cstddef> 8 #include <cstddef>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // Gets the language codes associated with the given input method IDs. 91 // Gets the language codes associated with the given input method IDs.
92 // The returned language codes won't have duplicates. 92 // The returned language codes won't have duplicates.
93 void GetLanguageCodesFromInputMethodIds( 93 void GetLanguageCodesFromInputMethodIds(
94 const std::vector<std::string>& input_method_ids, 94 const std::vector<std::string>& input_method_ids,
95 std::vector<std::string>* out_language_codes) const; 95 std::vector<std::string>* out_language_codes) const;
96 96
97 // Gets first input method associated with the language. 97 // Gets first input method associated with the language.
98 // Returns empty string on error. 98 // Returns empty string on error.
99 std::string GetLanguageDefaultInputMethodId(const std::string& language_code); 99 std::string GetLanguageDefaultInputMethodId(const std::string& language_code);
100 100
101 // Migrates the legacy xkb id to extension based xkb id.
102 // Returns true if the given input method id list is modified,
103 // returns false otherwise.
104 // TODO(shuchen): Remove this function after few milestones are passed.
105 // See: http://crbug.com/345604
106 bool MigrateXkbInputMethods(
107 std::vector<std::string>* input_method_ids);
108
101 // Updates the internal cache of hardware layouts. 109 // Updates the internal cache of hardware layouts.
102 void UpdateHardwareLayoutCache(); 110 void UpdateHardwareLayoutCache();
103 111
104 // Set hardware keyboard layout for testing purpose. This is for simulating 112 // Set hardware keyboard layout for testing purpose. This is for simulating
105 // "keyboard_layout" entry in VPD values. 113 // "keyboard_layout" entry in VPD values.
106 void SetHardwareKeyboardLayoutForTesting(const std::string& layout); 114 void SetHardwareKeyboardLayoutForTesting(const std::string& layout);
107 115
108 // Fills the input method IDs of the hardware keyboard. e.g. "xkb:us::eng" 116 // Fills the input method IDs of the hardware keyboard. e.g. "xkb:us::eng"
109 // for US Qwerty keyboard or "xkb:ru::rus" for Russian keyboard. 117 // for US Qwerty keyboard or "xkb:ru::rus" for Russian keyboard.
110 const std::vector<std::string>& GetHardwareInputMethodIds(); 118 const std::vector<std::string>& GetHardwareInputMethodIds();
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 std::vector<std::string> hardware_layouts_; 198 std::vector<std::string> hardware_layouts_;
191 std::vector<std::string> hardware_login_layouts_; 199 std::vector<std::string> hardware_login_layouts_;
192 200
193 DISALLOW_COPY_AND_ASSIGN(InputMethodUtil); 201 DISALLOW_COPY_AND_ASSIGN(InputMethodUtil);
194 }; 202 };
195 203
196 } // namespace input_method 204 } // namespace input_method
197 } // namespace chromeos 205 } // namespace chromeos
198 206
199 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_UTIL_H_ 207 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698