| 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..c377d3b847a9f4aa9189a88e0c7a61acda4379d6 100644
|
| --- a/ui/wm/core/input_method_event_filter.cc
|
| +++ b/ui/wm/core/input_method_event_filter.cc
|
| @@ -37,12 +37,10 @@ void InputMethodEventFilter::SetInputMethodPropertyInRootWindow(
|
| // InputMethodEventFilter, EventFilter implementation:
|
|
|
| void InputMethodEventFilter::OnKeyEvent(ui::KeyEvent* event) {
|
| - const ui::EventType type = event->type();
|
| - if (type == ui::ET_TRANSLATED_KEY_PRESS ||
|
| - type == ui::ET_TRANSLATED_KEY_RELEASE) {
|
| + if (event->IsTranslated()) {
|
| // The |event| is already handled by this object, change the type of the
|
| // event to ui::ET_KEY_* and pass it to the next filter.
|
| - static_cast<ui::TranslatedKeyEvent*>(event)->ConvertToKeyEvent();
|
| + event->SetTranslated(false);
|
| } else {
|
| // If the focused window is changed, all requests to IME will be
|
| // discarded so it's safe to update the target_dispatcher_ here.
|
| @@ -62,7 +60,8 @@ bool InputMethodEventFilter::DispatchKeyEventPostIME(
|
| #if defined(OS_WIN)
|
| DCHECK(!event.HasNativeEvent() || event.native_event().message != WM_CHAR);
|
| #endif
|
| - ui::TranslatedKeyEvent aura_event(event);
|
| + ui::KeyEvent aura_event(event);
|
| + aura_event.SetTranslated(true);
|
| ui::EventDispatchDetails details =
|
| target_dispatcher_->OnEventFromSource(&aura_event);
|
| CHECK(!details.dispatcher_destroyed);
|
|
|