OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/browser.h" | 5 #include "chrome/browser/ui/browser.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <shellapi.h> | 9 #include <shellapi.h> |
10 #endif // OS_WIN | 10 #endif // OS_WIN |
(...skipping 1271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1282 window_->Activate(); | 1282 window_->Activate(); |
1283 } else { | 1283 } else { |
1284 // We set the size of the view here, before WebKit does its initial | 1284 // We set the size of the view here, before WebKit does its initial |
1285 // layout. If we don't, the initial layout of background tabs will be | 1285 // layout. If we don't, the initial layout of background tabs will be |
1286 // performed with a view width of 0, which may cause script outputs and | 1286 // performed with a view width of 0, which may cause script outputs and |
1287 // anchor link location calculations to be incorrect even after a new | 1287 // anchor link location calculations to be incorrect even after a new |
1288 // layout with proper view dimensions. TabStripModel::AddTabContents() | 1288 // layout with proper view dimensions. TabStripModel::AddTabContents() |
1289 // contains similar logic. | 1289 // contains similar logic. |
1290 new_tab->view()->SizeContents(window_->GetRestoredBounds().size()); | 1290 new_tab->view()->SizeContents(window_->GetRestoredBounds().size()); |
1291 new_tab->HideContents(); | 1291 new_tab->HideContents(); |
| 1292 new_tab->controller().LoadIfNecessary(); |
1292 } | 1293 } |
1293 SessionService* session_service = | 1294 SessionService* session_service = |
1294 SessionServiceFactory::GetForProfileIfExisting(profile_); | 1295 SessionServiceFactory::GetForProfileIfExisting(profile_); |
1295 if (session_service) | 1296 if (session_service) |
1296 session_service->TabRestored(wrapper, pin); | 1297 session_service->TabRestored(wrapper, pin); |
1297 return new_tab; | 1298 return new_tab; |
1298 } | 1299 } |
1299 | 1300 |
1300 void Browser::ReplaceRestoredTab( | 1301 void Browser::ReplaceRestoredTab( |
1301 const std::vector<TabNavigation>& navigations, | 1302 const std::vector<TabNavigation>& navigations, |
(...skipping 4012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5314 window_->GetLocationBar()->ShowFirstRunBubble(bubble_type); | 5315 window_->GetLocationBar()->ShowFirstRunBubble(bubble_type); |
5315 } else { | 5316 } else { |
5316 GlobalErrorService* service = | 5317 GlobalErrorService* service = |
5317 GlobalErrorServiceFactory::GetForProfile(profile()); | 5318 GlobalErrorServiceFactory::GetForProfile(profile()); |
5318 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); | 5319 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); |
5319 if (error) { | 5320 if (error) { |
5320 error->ShowBubbleView(this); | 5321 error->ShowBubbleView(this); |
5321 } | 5322 } |
5322 } | 5323 } |
5323 } | 5324 } |
OLD | NEW |