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

Unified Diff: ui/base/ime/win/imm32_manager.cc

Issue 1234193002: Simplify InputMethodWin initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed test failures on Android. Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/base/ime/win/imm32_manager.h ('k') | ui/views/controls/textfield/textfield_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/ime/win/imm32_manager.cc
diff --git a/ui/base/ime/win/imm32_manager.cc b/ui/base/ime/win/imm32_manager.cc
index d83eed5c618308eb6048558cafc66fdcff6f9d8b..0d126446084902691deed2501bcd191286a66340 100644
--- a/ui/base/ime/win/imm32_manager.cc
+++ b/ui/base/ime/win/imm32_manager.cc
@@ -118,7 +118,6 @@ namespace ui {
IMM32Manager::IMM32Manager()
: is_composing_(false),
- ime_status_(false),
input_language_id_(LANG_USER_DEFAULT),
system_caret_(false),
caret_rect_(-1, -1, 0, 0),
@@ -128,7 +127,7 @@ IMM32Manager::IMM32Manager()
IMM32Manager::~IMM32Manager() {
}
-bool IMM32Manager::SetInputLanguage() {
+void IMM32Manager::SetInputLanguage() {
// Retrieve the current keyboard layout from Windows and determine whether
// or not the current input context has IMEs.
// Also save its input language for language-specific operations required
@@ -136,24 +135,6 @@ bool IMM32Manager::SetInputLanguage() {
HKL keyboard_layout = ::GetKeyboardLayout(0);
input_language_id_ =
static_cast<LANGID>(reinterpret_cast<uintptr_t>(keyboard_layout));
-
- // Check TSF Input Processor first.
- // If the active profile is TSF INPUTPROCESSOR, this is IME.
- base::win::ScopedComPtr<ITfInputProcessorProfileMgr> prof_mgr;
- TF_INPUTPROCESSORPROFILE prof;
- if (SUCCEEDED(prof_mgr.CreateInstance(CLSID_TF_InputProcessorProfiles)) &&
- SUCCEEDED(prof_mgr->GetActiveProfile(GUID_TFCAT_TIP_KEYBOARD, &prof)) &&
- prof.hkl == NULL &&
- prof.dwProfileType == TF_PROFILETYPE_INPUTPROCESSOR) {
- ime_status_ = true;
- } else {
- // If the curent language is not using TSF, check IMM32 based IMEs.
- // As ImmIsIME always returns non-0 value on Vista+, use ImmGetIMEFileName
- // instead to check if this HKL has any associated IME file.
- ime_status_ = (ImmGetIMEFileName(keyboard_layout, NULL, 0) != 0);
- }
-
- return ime_status_;
}
void IMM32Manager::CreateImeWindow(HWND window_handle) {
« no previous file with comments | « ui/base/ime/win/imm32_manager.h ('k') | ui/views/controls/textfield/textfield_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698