Commit 8d8277a6 authored by derat@chromium.org's avatar derat@chromium.org

Fix omnibox focus ring regression on Windows.

Restore part of LocationBarView::OnFocus(), which was
removed by r269418. Otherwise, the omnibox doesn't receive a
focus ring on Windows.

BUG=380141

Review URL: https://codereview.chromium.org/315663002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@274614 0039d316-1c4b-4281-b951-d872f2087c98
parent 65e95b76
...@@ -1550,6 +1550,12 @@ void LocationBarView::OnBoundsChanged(const gfx::Rect& previous_bounds) { ...@@ -1550,6 +1550,12 @@ void LocationBarView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
popup->UpdatePopupAppearance(); popup->UpdatePopupAppearance();
} }
void LocationBarView::OnFocus() {
// Explicitly focus the omnibox so a focus ring will be displayed around it on
// Windows.
omnibox_view_->SetFocus();
}
void LocationBarView::OnPaint(gfx::Canvas* canvas) { void LocationBarView::OnPaint(gfx::Canvas* canvas) {
View::OnPaint(canvas); View::OnPaint(canvas);
......
...@@ -378,6 +378,7 @@ class LocationBarView : public LocationBar, ...@@ -378,6 +378,7 @@ class LocationBarView : public LocationBar,
// views::View: // views::View:
virtual const char* GetClassName() const OVERRIDE; virtual const char* GetClassName() const OVERRIDE;
virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE; virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE;
virtual void OnFocus() OVERRIDE;
virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
virtual void PaintChildren(gfx::Canvas* canvas, virtual void PaintChildren(gfx::Canvas* canvas,
const views::CullSet& cull_set) OVERRIDE; const views::CullSet& cull_set) OVERRIDE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment