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

Unified Diff: ui/views/widget/native_widget_aura.cc

Issue 8821004: Move {Restore,Store}FocusedView to NativeWidgetAura::On{Activated,LostActive} (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move {Restore,Store}FocusedView to On{Activated,LostActive} Created 9 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698