diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-25 23:35:35 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-25 23:35:35 +0000 |
commit | 13f351535a767ab35ea91b74eb6909612786de1a (patch) | |
tree | 455bf9599791d31f08e233a80d22633bbd1eaba4 /chrome/browser/sessions | |
parent | f0a644290dfd2c869765737850ab463cbf18c12d (diff) | |
download | chromium_src-13f351535a767ab35ea91b74eb6909612786de1a.zip chromium_src-13f351535a767ab35ea91b74eb6909612786de1a.tar.gz chromium_src-13f351535a767ab35ea91b74eb6909612786de1a.tar.bz2 |
When restoring a session, the browser is shown after a tab is selected causing the focus to be on the location bar (not tab contents for web pages).
This CL ensures the tab decides where the focus should be after the browser is shown.
BUG=6000
TEST=See bug
R=sky
Review URL: http://codereview.chromium.org/28152
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10400 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sessions')
-rw-r--r-- | chrome/browser/sessions/session_restore.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/chrome/browser/sessions/session_restore.cc b/chrome/browser/sessions/session_restore.cc index ced5e90..bff9a74 100644 --- a/chrome/browser/sessions/session_restore.cc +++ b/chrome/browser/sessions/session_restore.cc @@ -359,6 +359,9 @@ class SessionRestoreImpl : public NotificationObserver { std::min(initial_tab_count + std::max(0, selected_session_index), browser->tab_count() - 1), true); browser->window()->Show(); + // Showing the browser focuses the location bar, let the tab decide where + // it wants the focus to be. + browser->GetSelectedTabContents()->SetInitialFocus(); } void AppendURLsToBrowser(Browser* browser, const std::vector<GURL>& urls) { |