summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sessions/session_restore.cc
diff options
context:
space:
mode:
authorjaphet@chromium.org <japhet@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-22 20:25:18 +0000
committerjaphet@chromium.org <japhet@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-22 20:25:18 +0000
commitc93a9dd5234903b294d78aa70d494f9f80fc5603 (patch)
tree984473b00000502a65c95f68d36c574c2a160834 /chrome/browser/sessions/session_restore.cc
parentd5440866c468d45c1ac89c788f8f60a6773c0d35 (diff)
downloadchromium_src-c93a9dd5234903b294d78aa70d494f9f80fc5603.zip
chromium_src-c93a9dd5234903b294d78aa70d494f9f80fc5603.tar.gz
chromium_src-c93a9dd5234903b294d78aa70d494f9f80fc5603.tar.bz2
Move code to size a restored tab on initialization from SessionRestore::RestoreTabsToBrowser()
to Browser::AddRestoredTab(). BUG=40232 TEST=none Review URL: http://codereview.chromium.org/1642013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45343 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sessions/session_restore.cc')
-rw-r--r--chrome/browser/sessions/session_restore.cc13
1 files changed, 2 insertions, 11 deletions
diff --git a/chrome/browser/sessions/session_restore.cc b/chrome/browser/sessions/session_restore.cc
index dfa65d1..bd9ad1c 100644
--- a/chrome/browser/sessions/session_restore.cc
+++ b/chrome/browser/sessions/session_restore.cc
@@ -398,22 +398,13 @@ class SessionRestoreImpl : public NotificationObserver {
0,
std::min(selected_index,
static_cast<int>(tab.navigations.size() - 1)));
- TabContents* new_tab = browser->AddRestoredTab(tab.navigations,
+ tab_loader_->AddTab(&browser->AddRestoredTab(tab.navigations,
static_cast<int>(i - window.tabs.begin()),
selected_index,
tab.app_extension_id,
false,
tab.pinned,
- true);
- // We set the size of the view here, before WebKit does its initial
- // layout. If we don't, the initial layout of background tabs will be
- // performed with a view width of 0, which may cause script outputs and
- // anchor link location calculations to be incorrect even after a new
- // layout with proper view dimensions. TabStripModel::AddTabContents()
- // contains similar logic.
- new_tab->view()->SizeContents(window.bounds.size());
- new_tab->HideContents();
- tab_loader_->AddTab(&new_tab->controller());
+ true)->controller());
}
}