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

Unified Diff: chrome/browser/ui/browser_tabrestore.cc

Issue 209023003: Remove references to WebContentsView::SizeContents from chrome/ and app/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a missing NULL pointer check to android code. Created 6 years, 8 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
Index: chrome/browser/ui/browser_tabrestore.cc
diff --git a/chrome/browser/ui/browser_tabrestore.cc b/chrome/browser/ui/browser_tabrestore.cc
index f939a74327c13c3394d662f3a9e7d44766a7017e..f009090f548f26f6b0ddd580df931221607fb748 100644
--- a/chrome/browser/ui/browser_tabrestore.cc
+++ b/chrome/browser/ui/browser_tabrestore.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/ui/browser_tabrestore.h"
+#include "apps/ui/web_contents_sizer.h"
#include "chrome/browser/extensions/tab_helper.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sessions/session_service.h"
@@ -113,14 +114,14 @@ content::WebContents* AddRestoredTab(
if (select) {
browser->window()->Activate();
} else {
- // 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::AddWebContents()
- // contains similar logic.
- web_contents->GetView()->SizeContents(
- browser->window()->GetRestoredBounds().size());
+ // We set the size of the view here, before Blink 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::AddWebContents() contains similar
+ // logic.
+ apps::ResizeWebContents(web_contents,
+ browser->window()->GetRestoredBounds().size());
web_contents->WasHidden();
}
SessionService* session_service =
« no previous file with comments | « chrome/browser/prerender/prerender_contents.cc ('k') | chrome/browser/ui/fullscreen/fullscreen_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698