| 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 52c77483c61ba7cfbf22cf48046ea13a0ebaecea..e9b29c5efa7ef803a29465a10d87508fed0dbd32 100644
|
| --- a/ui/views/widget/native_widget_aura.cc
|
| +++ b/ui/views/widget/native_widget_aura.cc
|
| @@ -647,7 +647,8 @@ ui::NativeTheme* NativeWidgetAura::GetNativeTheme() const {
|
|
|
| void NativeWidgetAura::DispatchKeyEventPostIME(const ui::KeyEvent& key) {
|
| FocusManager* focus_manager = GetWidget()->GetFocusManager();
|
| - if (delegate_->OnKeyEvent(key) || !focus_manager)
|
| + delegate_->OnKeyEvent(const_cast<ui::KeyEvent*>(&key));
|
| + if (key.handled() || !focus_manager)
|
| return;
|
| focus_manager->OnKeyEvent(key);
|
| }
|
| @@ -768,20 +769,20 @@ scoped_refptr<ui::Texture> NativeWidgetAura::CopyTexture() {
|
| ////////////////////////////////////////////////////////////////////////////////
|
| // NativeWidgetAura, ui::EventHandler implementation:
|
|
|
| -ui::EventResult NativeWidgetAura::OnKeyEvent(ui::KeyEvent* event) {
|
| +void NativeWidgetAura::OnKeyEvent(ui::KeyEvent* event) {
|
| if (event->is_char()) {
|
| // If a ui::InputMethod object is attached to the root window, character
|
| // events are handled inside the object and are not passed to this function.
|
| // If such object is not attached, character events might be sent (e.g. on
|
| // Windows). In this case, we just skip these.
|
| - return ui::ER_UNHANDLED;
|
| + return;
|
| }
|
| // Renderer may send a key event back to us if the key event wasn't handled,
|
| // and the window may be invisible by that time.
|
| if (!window_->IsVisible())
|
| - return ui::ER_UNHANDLED;
|
| + return;
|
| GetWidget()->GetInputMethod()->DispatchKeyEvent(*event);
|
| - return ui::ER_HANDLED;
|
| + event->SetHandled();
|
| }
|
|
|
| ui::EventResult NativeWidgetAura::OnMouseEvent(ui::MouseEvent* event) {
|
|
|