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

Unified Diff: ui/views/corewm/input_method_event_filter.cc

Issue 142043006: Refactors ui::internal::InputMethodDelegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed an issue of unsigned/signed comparison. Created 6 years, 11 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/views/corewm/input_method_event_filter.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/corewm/input_method_event_filter.cc
diff --git a/ui/views/corewm/input_method_event_filter.cc b/ui/views/corewm/input_method_event_filter.cc
index 8a736917569f6724e48c07b5d5fc64b8af63df3a..91f997c6a3b7611f18dd3668037dc43638cb43a0 100644
--- a/ui/views/corewm/input_method_event_filter.cc
+++ b/ui/views/corewm/input_method_event_filter.cc
@@ -58,21 +58,12 @@ void InputMethodEventFilter::OnKeyEvent(ui::KeyEvent* event) {
// InputMethodEventFilter, ui::InputMethodDelegate implementation:
bool InputMethodEventFilter::DispatchKeyEventPostIME(
- const base::NativeEvent& event) {
+ const ui::KeyEvent& event) {
#if defined(OS_WIN)
- DCHECK(event.message != WM_CHAR);
+ if (DCHECK_IS_ON() && event.HasNativeEvent())
+ DCHECK_NE(event.native_event().message, static_cast<UINT>(WM_CHAR));
#endif
- ui::TranslatedKeyEvent aura_event(event, false /* is_char */);
- return target_dispatcher_->AsWindowTreeHostDelegate()->OnHostKeyEvent(
- &aura_event);
-}
-
-bool InputMethodEventFilter::DispatchFabricatedKeyEventPostIME(
- ui::EventType type,
- ui::KeyboardCode key_code,
- int flags) {
- ui::TranslatedKeyEvent aura_event(type == ui::ET_KEY_PRESSED, key_code,
- flags);
+ ui::TranslatedKeyEvent aura_event(event);
return target_dispatcher_->AsWindowTreeHostDelegate()->OnHostKeyEvent(
&aura_event);
}
« no previous file with comments | « ui/views/corewm/input_method_event_filter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698