| Index: ui/views/widget/native_widget_aura.cc
|
| diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc
|
| index 7b1805e19e618da5d2093bf803acd7820315d121..4c20a8d3305c95738fbb9fa3bd245a6ebd07ac5b 100644
|
| --- a/ui/views/widget/native_widget_aura.cc
|
| +++ b/ui/views/widget/native_widget_aura.cc
|
| @@ -31,7 +31,7 @@
|
| #endif
|
|
|
| #if defined(HAVE_IBUS)
|
| -#include "ui/views/ime/input_method_ibus.h"
|
| +#include "ui/views/ime/input_method_bridge.h"
|
| #else
|
| #include "ui/views/ime/mock_input_method.h"
|
| #endif
|
| @@ -279,8 +279,10 @@ bool NativeWidgetAura::HasMouseCapture() const {
|
|
|
| InputMethod* NativeWidgetAura::CreateInputMethod() {
|
| #if defined(HAVE_IBUS)
|
| - InputMethod* input_method = new InputMethodIBus(this);
|
| + ui::InputMethod* host = aura::Desktop::GetInstance()->GetInputMethod();
|
| + InputMethod* input_method = new InputMethodBridge(this, host);
|
| #else
|
| + // Use the mock IME for unit tests.
|
| InputMethod* input_method = new MockInputMethod(this);
|
| #endif
|
| input_method->Init(GetWidget());
|
| @@ -572,15 +574,10 @@ void NativeWidgetAura::OnBlur() {
|
| }
|
|
|
| bool NativeWidgetAura::OnKeyEvent(aura::KeyEvent* event) {
|
| - // TODO(beng): Need an InputMethodAura to properly handle character events.
|
| - // Right now, we just skip these.
|
| - if (event->is_char())
|
| - return false;
|
| -
|
| + DCHECK(!event->is_char());
|
| DCHECK(window_->IsVisible());
|
| InputMethod* input_method = GetWidget()->GetInputMethod();
|
| DCHECK(input_method);
|
| - // TODO(oshima): DispatchKeyEvent should return bool?
|
| KeyEvent views_event(event);
|
| input_method->DispatchKeyEvent(views_event);
|
| return true;
|
|
|