| 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 c60ab073ad4a80a3b0684a7cd88f23f19e6058ac..7d43a782fe520b9b2e78c8cecef02cf00b3cd603 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());
|
| @@ -576,15 +578,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;
|
|
|