diff options
author | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-03 22:17:40 +0000 |
---|---|---|
committer | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-03 22:17:40 +0000 |
commit | a8bb9670c4e3e91c5f081a272a6d51ed8ee76d8f (patch) | |
tree | 77ecaf1ab0b57487accad841b2806aaeb1041f18 /ui/views | |
parent | 986afae849b2403e0b3b159e9bc567aec6624aaa (diff) | |
download | chromium_src-a8bb9670c4e3e91c5f081a272a6d51ed8ee76d8f.zip chromium_src-a8bb9670c4e3e91c5f081a272a6d51ed8ee76d8f.tar.gz chromium_src-a8bb9670c4e3e91c5f081a272a6d51ed8ee76d8f.tar.bz2 |
aura: Ask the WindowDelegate before a Window is Focus()ed.
. In aura, before a window is focused, ask the delegate if it can be focused.
. Make a popup RWHVA non-focusable.
This is to prevent the focus from moving from the main web-page to the combobox (which causes the combobox to get destroyed). This fixes an issue where comboboxes in the login screen could not be used properly.
BUG=105786
TEST=manually
Review URL: http://codereview.chromium.org/8770011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112909 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views')
-rw-r--r-- | ui/views/widget/native_widget_aura.cc | 4 | ||||
-rw-r--r-- | ui/views/widget/native_widget_aura.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc index 26d3392..71500e3f 100644 --- a/ui/views/widget/native_widget_aura.cc +++ b/ui/views/widget/native_widget_aura.cc @@ -611,6 +611,10 @@ ui::TouchStatus NativeWidgetAura::OnTouchEvent(aura::TouchEvent* event) { return delegate_->OnTouchEvent(touch_event); } +bool NativeWidgetAura::CanFocus() { + return true; +} + bool NativeWidgetAura::ShouldActivate(aura::Event* event) { return can_activate_; } diff --git a/ui/views/widget/native_widget_aura.h b/ui/views/widget/native_widget_aura.h index 16c1bef..4a0f11a 100644 --- a/ui/views/widget/native_widget_aura.h +++ b/ui/views/widget/native_widget_aura.h @@ -131,6 +131,7 @@ class VIEWS_EXPORT NativeWidgetAura : public internal::NativeWidgetPrivate, virtual int GetNonClientComponent(const gfx::Point& point) const OVERRIDE; virtual bool OnMouseEvent(aura::MouseEvent* event) OVERRIDE; virtual ui::TouchStatus OnTouchEvent(aura::TouchEvent* event) OVERRIDE; + virtual bool CanFocus() OVERRIDE; virtual bool ShouldActivate(aura::Event* event) OVERRIDE; virtual void OnActivated() OVERRIDE; virtual void OnLostActive() OVERRIDE; |