Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6226)

Unified Diff: chrome/browser/views/find_bar_host.cc

Issue 251064: Fix focus restore bug in find-in-bar (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/views/find_bar_host_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/find_bar_host.cc
===================================================================
--- chrome/browser/views/find_bar_host.cc (revision 27722)
+++ chrome/browser/views/find_bar_host.cc (working copy)
@@ -53,11 +53,6 @@
views::FocusManager::GetFocusManagerForNativeView(host_->GetNativeView());
if (focus_manager_) {
focus_manager_->AddFocusChangeListener(this);
-
- // Stores the currently focused view, and tracks focus changes so that we
- // can restore focus when the find box is closed.
- focus_tracker_.reset(new views::ExternalFocusTracker(view_,
- focus_manager_));
} else {
// In some cases (see bug http://crbug.com/17056) it seems we may not have
// a focus manager. Please reopen the bug if you hit this.
@@ -74,6 +69,10 @@
}
void FindBarHost::Show() {
+ // Stores the currently focused view, and tracks focus changes so that we can
+ // restore focus when the find box is closed.
+ focus_tracker_.reset(new views::ExternalFocusTracker(view_, focus_manager_));
+
if (disable_animations_during_testing_) {
animation_->Reset(1);
MoveWindowIfNecessary(gfx::Rect(), true);
« no previous file with comments | « no previous file | chrome/browser/views/find_bar_host_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698