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 /content | |
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 'content')
-rw-r--r-- | content/browser/renderer_host/render_widget_host_view_aura.cc | 4 | ||||
-rw-r--r-- | content/browser/renderer_host/render_widget_host_view_aura.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc index 90d23e0..9978862 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc @@ -531,6 +531,10 @@ ui::TouchStatus RenderWidgetHostViewAura::OnTouchEvent( return DecideTouchStatus(touch_event_, point); } +bool RenderWidgetHostViewAura::CanFocus() { + return popup_type_ == WebKit::WebPopupTypeNone; +} + bool RenderWidgetHostViewAura::ShouldActivate(aura::Event* event) { return false; } diff --git a/content/browser/renderer_host/render_widget_host_view_aura.h b/content/browser/renderer_host/render_widget_host_view_aura.h index 28dfe4e..2cf607d 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.h +++ b/content/browser/renderer_host/render_widget_host_view_aura.h @@ -114,6 +114,7 @@ class CONTENT_EXPORT RenderWidgetHostViewAura 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; |