| Index: ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
|
| diff --git a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
|
| index f6d0a352776b4b211f012efb1be3ac35024d86db..2cd296225f3aeab309e990e96732bcb84156dda4 100644
|
| --- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
|
| +++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
|
| @@ -244,7 +244,6 @@ DesktopNativeWidgetAura::DesktopNativeWidgetAura(
|
| content_window_(new aura::Window(this)),
|
| native_widget_delegate_(delegate),
|
| last_drop_operation_(ui::DragDropTypes::DRAG_NONE),
|
| - restore_focus_on_activate_(false),
|
| cursor_(gfx::kNullCursor),
|
| widget_type_(Widget::InitParams::TYPE_WINDOW),
|
| close_widget_factory_(this) {
|
| @@ -1081,12 +1080,7 @@ void DesktopNativeWidgetAura::OnWindowActivated(
|
| aura::Window* gained_active,
|
| aura::Window* lost_active) {
|
| DCHECK(content_window_ == gained_active || content_window_ == lost_active);
|
| - if (gained_active == content_window_ && restore_focus_on_activate_) {
|
| - restore_focus_on_activate_ = false;
|
| - GetWidget()->GetFocusManager()->RestoreFocusedView();
|
| - } else if (lost_active == content_window_ && GetWidget()->HasFocusManager()) {
|
| - DCHECK(!restore_focus_on_activate_);
|
| - restore_focus_on_activate_ = true;
|
| + if (lost_active == content_window_ && GetWidget()->HasFocusManager()) {
|
| // Pass in false so that ClearNativeFocus() isn't invoked.
|
| GetWidget()->GetFocusManager()->StoreFocusedView(false);
|
| }
|
|
|