Index: ui/base/ime/input_method_minimal.cc |
diff --git a/ui/base/ime/input_method_minimal.cc b/ui/base/ime/input_method_minimal.cc |
index 47d8cec0fb0be232644badb219decf64cdb6ba85..cd00702111f7b10b81d8f32304c96c727d80314c 100644 |
--- a/ui/base/ime/input_method_minimal.cc |
+++ b/ui/base/ime/input_method_minimal.cc |
@@ -23,23 +23,24 @@ bool InputMethodMinimal::OnUntranslatedIMEMessage( |
return false; |
} |
-bool InputMethodMinimal::DispatchKeyEvent(const ui::KeyEvent& event) { |
- DCHECK(event.type() == ET_KEY_PRESSED || event.type() == ET_KEY_RELEASED); |
+void InputMethodMinimal::DispatchKeyEvent(ui::KeyEvent* event) { |
+ DCHECK(event->type() == ET_KEY_PRESSED || event->type() == ET_KEY_RELEASED); |
// If no text input client, do nothing. |
- if (!GetTextInputClient()) |
- return DispatchKeyEventPostIME(event); |
+ if (!GetTextInputClient()) { |
+ ignore_result(DispatchKeyEventPostIME(event)); |
+ return; |
+ } |
// Insert the character. |
- const bool handled = DispatchKeyEventPostIME(event); |
- if (event.type() == ET_KEY_PRESSED && GetTextInputClient()) { |
- const uint16 ch = event.GetCharacter(); |
+ ignore_result(DispatchKeyEventPostIME(event)); |
+ if (event->type() == ET_KEY_PRESSED && GetTextInputClient()) { |
+ const uint16 ch = event->GetCharacter(); |
if (ch) { |
- GetTextInputClient()->InsertChar(ch, event.flags()); |
- return true; |
+ GetTextInputClient()->InsertChar(ch, event->flags()); |
+ event->StopPropagation(); |
} |
} |
- return handled; |
} |
void InputMethodMinimal::OnCaretBoundsChanged(const TextInputClient* client) {} |