Index: mandoline/ui/aura/input_method_mandoline.cc |
diff --git a/mandoline/ui/aura/input_method_mandoline.cc b/mandoline/ui/aura/input_method_mandoline.cc |
index 3ab9203a0002b352ea097778343654a352d603cc..53031d2c56dd69b82c6d49feafcf38743a310331 100644 |
--- a/mandoline/ui/aura/input_method_mandoline.cc |
+++ b/mandoline/ui/aura/input_method_mandoline.cc |
@@ -28,27 +28,28 @@ bool InputMethodMandoline::OnUntranslatedIMEMessage( |
return false; |
} |
-bool InputMethodMandoline::DispatchKeyEvent(const ui::KeyEvent& event) { |
- DCHECK(event.type() == ui::ET_KEY_PRESSED || |
- event.type() == ui::ET_KEY_RELEASED); |
+void InputMethodMandoline::DispatchKeyEvent(ui::KeyEvent* event) { |
+ DCHECK(event->type() == ui::ET_KEY_PRESSED || |
+ event->type() == ui::ET_KEY_RELEASED); |
// If no text input client, do nothing. |
- if (!GetTextInputClient()) |
- return DispatchKeyEventPostIME(event); |
+ if (!GetTextInputClient()) { |
+ ignore_result(DispatchKeyEventPostIME(event)); |
+ return; |
+ } |
// Here is where we change the differ from our base class's logic. Instead of |
// always dispatching a key down event, and then sending a synthesized |
// character event, we instead check to see if this is a character event and |
// send out the key if it is. (We fallback to normal dispatch if it isn't.) |
- if (event.is_char()) { |
- const uint16 ch = event.GetCharacter(); |
+ if (event->is_char()) { |
+ const uint16 ch = event->GetCharacter(); |
if (GetTextInputClient()) |
- GetTextInputClient()->InsertChar(ch, event.flags()); |
- |
- return false; |
+ GetTextInputClient()->InsertChar(ch, event->flags()); |
+ return; |
} |
- return DispatchKeyEventPostIME(event); |
+ ignore_result(DispatchKeyEventPostIME(event)); |
} |
void InputMethodMandoline::OnCaretBoundsChanged( |