summaryrefslogtreecommitdiffstats
path: root/ui/views
diff options
context:
space:
mode:
authormazda@chromium.org <mazda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-09 02:45:24 +0000
committermazda@chromium.org <mazda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-09 02:45:24 +0000
commit4e7b588132af2c49945df83d40ab77b964d08d85 (patch)
tree97dae9a467b86eefad433536084465c4a0823dcb /ui/views
parentd9e5bfc31ce82b6fa4a89298cea2e737ef8f164a (diff)
downloadchromium_src-4e7b588132af2c49945df83d40ab77b964d08d85.zip
chromium_src-4e7b588132af2c49945df83d40ab77b964d08d85.tar.gz
chromium_src-4e7b588132af2c49945df83d40ab77b964d08d85.tar.bz2
Move {Restore,Store}FocusedView to NativeWidgetAura::On{Activated,LostActive}.
BUG=104361 TEST=Manual Review URL: http://codereview.chromium.org/8821004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113741 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views')
-rw-r--r--ui/views/widget/native_widget_aura.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc
index b13182d..643d284 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();