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

Side by Side Diff: ui/base/ime/input_method_win.cc

Issue 48393003: Add InputMethodObserver support into InputMethodBase (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix -Werror=sign-compare Created 7 years, 1 month 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
« no previous file with comments | « ui/base/ime/input_method_tsf.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "ui/base/ime/input_method_win.h" 5 #include "ui/base/ime/input_method_win.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "ui/base/ime/text_input_client.h" 8 #include "ui/base/ime/text_input_client.h"
9 #include "ui/events/event.h" 9 #include "ui/events/event.h"
10 #include "ui/events/event_constants.h" 10 #include "ui/events/event_constants.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 return DispatchFabricatedKeyEventPostIME(event.type(), 87 return DispatchFabricatedKeyEventPostIME(event.type(),
88 event.key_code(), 88 event.key_code(),
89 event.flags()); 89 event.flags());
90 } 90 }
91 91
92 void InputMethodWin::OnInputLocaleChanged() { 92 void InputMethodWin::OnInputLocaleChanged() {
93 active_ = imm32_manager_.SetInputLanguage(); 93 active_ = imm32_manager_.SetInputLanguage();
94 locale_ = imm32_manager_.GetInputLanguageName(); 94 locale_ = imm32_manager_.GetInputLanguageName();
95 direction_ = imm32_manager_.GetTextDirection(); 95 direction_ = imm32_manager_.GetTextDirection();
96 OnInputMethodChanged(); 96 OnInputMethodChanged();
97 InputMethodBase::OnInputLocaleChanged();
97 } 98 }
98 99
99 std::string InputMethodWin::GetInputLocale() { 100 std::string InputMethodWin::GetInputLocale() {
100 return locale_; 101 return locale_;
101 } 102 }
102 103
103 base::i18n::TextDirection InputMethodWin::GetInputTextDirection() { 104 base::i18n::TextDirection InputMethodWin::GetInputTextDirection() {
104 return direction_; 105 return direction_;
105 } 106 }
106 107
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 // receiving keyboard input as long as it is an active window. This works well 343 // receiving keyboard input as long as it is an active window. This works well
343 // even when the |attached_window_handle| becomes active but has not received 344 // even when the |attached_window_handle| becomes active but has not received
344 // WM_FOCUS yet. 345 // WM_FOCUS yet.
345 return attached_window_handle && GetActiveWindow() == attached_window_handle; 346 return attached_window_handle && GetActiveWindow() == attached_window_handle;
346 #else 347 #else
347 return attached_window_handle && GetFocus() == attached_window_handle; 348 return attached_window_handle && GetFocus() == attached_window_handle;
348 #endif 349 #endif
349 } 350 }
350 351
351 } // namespace ui 352 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/ime/input_method_tsf.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698