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 b13182d9624edb7521635cad865df163d09e5349..643d284cec734f258eb8f158df4b5a8f68a44b0d 100644 |
--- a/ui/views/widget/native_widget_aura.cc |
+++ b/ui/views/widget/native_widget_aura.cc |
@@ -555,9 +555,6 @@ void NativeWidgetAura::OnFocus() { |
if (widget->is_top_level()) { |
InputMethod* input_method = widget->GetInputMethod(); |
input_method->OnFocus(); |
- // See description of got_initial_focus_in_ for details on this. |
- // TODO(mazda): Investigate this is actually necessary. |
- // widget->GetFocusManager()->RestoreFocusedView(); |
} |
delegate_->OnNativeFocus(window_); |
} |
@@ -567,7 +564,6 @@ void NativeWidgetAura::OnBlur() { |
if (widget->is_top_level()) { |
InputMethod* input_method = widget->GetInputMethod(); |
input_method->OnBlur(); |
- widget->GetFocusManager()->StoreFocusedView(); |
} |
delegate_->OnNativeBlur(NULL); |
} |
@@ -622,12 +618,14 @@ bool NativeWidgetAura::ShouldActivate(aura::Event* event) { |
} |
void NativeWidgetAura::OnActivated() { |
+ GetWidget()->GetFocusManager()->RestoreFocusedView(); |
delegate_->OnNativeWidgetActivationChanged(true); |
if (IsVisible() && GetWidget()->non_client_view()) |
GetWidget()->non_client_view()->SchedulePaint(); |
} |
void NativeWidgetAura::OnLostActive() { |
+ GetWidget()->GetFocusManager()->StoreFocusedView(); |
delegate_->OnNativeWidgetActivationChanged(false); |
if (IsVisible() && GetWidget()->non_client_view()) |
GetWidget()->non_client_view()->SchedulePaint(); |