Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(403)

Unified Diff: ui/views/widget/desktop_aura/desktop_native_widget_aura.cc

Issue 418093005: Do not save and restore View focus on aura::Window focus changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Just revert the OnWindowFocused save/restore. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_native_widget_aura.h ('k') | ui/views/widget/native_widget_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9d1861e41db23fb1956fcc03e03065064455200c..9c4743d080e5117edea7c0d06d4fa1b42c1c7197 100644
--- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
+++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
@@ -258,7 +258,6 @@ DesktopNativeWidgetAura::DesktopNativeWidgetAura(
native_widget_delegate_(delegate),
last_drop_operation_(ui::DragDropTypes::DRAG_NONE),
restore_focus_on_activate_(false),
- restore_focus_on_window_focus_(false),
cursor_(gfx::kNullCursor),
widget_type_(Widget::InitParams::TYPE_WINDOW) {
aura::client::SetFocusChangeObserver(content_window_, this);
@@ -1095,23 +1094,14 @@ void DesktopNativeWidgetAura::OnWindowFocused(aura::Window* gained_focus,
native_widget_delegate_->OnNativeFocus(lost_focus);
// If focus is moving from a descendant Window to |content_window_| then
- // native activation hasn't changed. Still, the InputMethod and FocusManager
- // must be informed of the Window focus change.
+ // native activation hasn't changed. Still, the InputMethod must be informed
+ // of the Window focus change.
InputMethod* input_method = GetWidget()->GetInputMethod();
if (input_method)
input_method->OnFocus();
-
- if (restore_focus_on_window_focus_) {
- restore_focus_on_window_focus_ = false;
- GetWidget()->GetFocusManager()->RestoreFocusedView();
- }
} else if (content_window_ == lost_focus) {
desktop_window_tree_host_->OnNativeWidgetBlur();
native_widget_delegate_->OnNativeBlur(gained_focus);
-
- DCHECK(!restore_focus_on_window_focus_);
- restore_focus_on_window_focus_ = true;
- GetWidget()->GetFocusManager()->StoreFocusedView(false);
}
}
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_native_widget_aura.h ('k') | ui/views/widget/native_widget_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698