Chromium Code Reviews| Index: views/widget/native_widget_aura.cc |
| diff --git a/views/widget/native_widget_aura.cc b/views/widget/native_widget_aura.cc |
| index 2113872f11ad9873b79e4e4b4afbc2380358e4c0..c2c80ba1ef8362097c4b07bd58280544ed9bcc1b 100644 |
| --- a/views/widget/native_widget_aura.cc |
| +++ b/views/widget/native_widget_aura.cc |
| @@ -413,7 +413,8 @@ void NativeWidgetAura::SetCursor(gfx::NativeCursor cursor) { |
| } |
| void NativeWidgetAura::ClearNativeFocus() { |
| - NOTIMPLEMENTED(); |
| + if (window_ && window_->GetFocusManager()) |
| + window_->GetFocusManager()->SetFocusedWindow(window_); |
| } |
| void NativeWidgetAura::FocusNativeView(gfx::NativeView native_view) { |
| @@ -434,7 +435,10 @@ gfx::Rect NativeWidgetAura::GetWorkAreaBoundsInScreen() const { |
| // NativeWidgetAura, views::InputMethodDelegate implementation: |
| void NativeWidgetAura::DispatchKeyEventPostIME(const KeyEvent& key) { |
| - delegate_->OnKeyEvent(key); |
| + if (delegate_->OnKeyEvent(key)) |
| + return; |
| + if (key.type() == ui::ET_KEY_PRESSED && GetWidget()->GetFocusManager()) |
| + GetWidget()->GetFocusManager()->OnKeyEvent(key); |
|
Ben Goodger (Google)
2011/10/27 15:33:01
OK... so does this handle browser key events (e.g.
mazda
2011/10/28 14:44:33
Yes, shortcut keys are handled when web content ar
|
| } |
| //////////////////////////////////////////////////////////////////////////////// |
| @@ -452,7 +456,8 @@ void NativeWidgetAura::OnFocus() { |
| InputMethod* input_method = widget->GetInputMethod(); |
| input_method->OnFocus(); |
| // See description of got_initial_focus_in_ for details on this. |
| - widget->GetFocusManager()->RestoreFocusedView(); |
| + // TODO(mazda): Investigate this is actually necessary. |
| + // widget->GetFocusManager()->RestoreFocusedView(); |
| } |
| delegate_->OnNativeFocus(window_); |
| } |