summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-09 06:59:48 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-09 06:59:48 +0000
commite5466f6b8e218ef3b4530b0e85d9a5d6d208cf9f (patch)
tree1d369d97a2a16d93c15a2fb3a6b769642cbe6f86
parent9adb8b15e2faa48229c2406e4f8b801801332501 (diff)
downloadchromium_src-e5466f6b8e218ef3b4530b0e85d9a5d6d208cf9f.zip
chromium_src-e5466f6b8e218ef3b4530b0e85d9a5d6d208cf9f.tar.gz
chromium_src-e5466f6b8e218ef3b4530b0e85d9a5d6d208cf9f.tar.bz2
Revert 113741 "Move {Restore,Store}FocusedView to NativeWidgetAura::On{Activated,LostActive}."
BUG=104361 TEST=Manual Review URL: http://codereview.chromium.org/8821004 This reverts commit 4e7b588132af2c49945df83d40ab77b964d08d85. TBR=mazda@chromium.org BUG=104361 TEST=none Review URL: http://codereview.chromium.org/8889043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113770 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--ui/views/widget/native_widget_aura.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc
index 9113d79..4ad5826 100644
--- a/ui/views/widget/native_widget_aura.cc
+++ b/ui/views/widget/native_widget_aura.cc
@@ -567,6 +567,9 @@ 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_);
}
@@ -576,6 +579,7 @@ void NativeWidgetAura::OnBlur() {
if (widget->is_top_level()) {
InputMethod* input_method = widget->GetInputMethod();
input_method->OnBlur();
+ widget->GetFocusManager()->StoreFocusedView();
}
delegate_->OnNativeBlur(NULL);
}
@@ -630,14 +634,12 @@ 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();