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

Unified Diff: ui/wm/core/input_method_event_filter.cc

Issue 298893003: Supports fake key events for setComposition/commitText by on-screen keyboards. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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
Index: ui/wm/core/input_method_event_filter.cc
diff --git a/ui/wm/core/input_method_event_filter.cc b/ui/wm/core/input_method_event_filter.cc
index 4854a1b5f99239498fd06323cd99ff7362c9a40f..224b2704600b772081b34539d272fb8a3098fc26 100644
--- a/ui/wm/core/input_method_event_filter.cc
+++ b/ui/wm/core/input_method_event_filter.cc
@@ -63,9 +63,11 @@ bool InputMethodEventFilter::DispatchKeyEventPostIME(
DCHECK(!event.HasNativeEvent() || event.native_event().message != WM_CHAR);
#endif
ui::TranslatedKeyEvent aura_event(event);
- ui::EventDispatchDetails details =
- target_dispatcher_->OnEventFromSource(&aura_event);
- CHECK(!details.dispatcher_destroyed);
+ if (target_dispatcher_) {
Seigo Nonaka 2014/05/26 04:59:29 nit: I prefer early exit like: if (!target_dispatc
Shu Chen 2014/05/26 05:04:49 I don't think it's a good idea to have a dup code
+ ui::EventDispatchDetails details =
+ target_dispatcher_->OnEventFromSource(&aura_event);
+ CHECK(!details.dispatcher_destroyed);
+ }
return aura_event.handled();
}
« ui/base/ime/input_method_chromeos.cc ('K') | « ui/base/ime/input_method_chromeos.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698