| Index: chrome/browser/ui/browser_browsertest.cc
|
| diff --git a/chrome/browser/ui/browser_browsertest.cc b/chrome/browser/ui/browser_browsertest.cc
|
| index 7f6fa033d5c58ddc9102abb1a97b718c9ba352ba..0fd477c7073a0737e50615f004a0262c4af0aa38 100644
|
| --- a/chrome/browser/ui/browser_browsertest.cc
|
| +++ b/chrome/browser/ui/browser_browsertest.cc
|
| @@ -283,11 +283,23 @@ class RenderViewSizeObserver : public content::WebContentsObserver {
|
| render_view_host->GetWidget()->GetView()->GetViewBounds().size();
|
| }
|
|
|
| + void DidStartNavigationToPendingEntry(
|
| + const GURL& url,
|
| + content::ReloadType reload_type) override {
|
| + // TODO: remove this method when PlzNavigate is turned on by default.
|
| + if (!content::IsBrowserSideNavigationEnabled())
|
| + Resize();
|
| + }
|
| +
|
| // Enlarge WebContentsView by |wcv_resize_insets_| while the navigation entry
|
| // is pending.
|
| - void DidStartNavigationToPendingEntry(
|
| - const GURL& url,
|
| - content::ReloadType reload_type) override {
|
| + void DidStartNavigation(
|
| + content::NavigationHandle* navigation_handle) override {
|
| + if (content::IsBrowserSideNavigationEnabled())
|
| + Resize();
|
| + }
|
| +
|
| + void Resize() {
|
| if (wcv_resize_insets_.IsEmpty())
|
| return;
|
| // Resizing the main browser window by |wcv_resize_insets_| will
|
| @@ -327,7 +339,7 @@ class RenderViewSizeObserver : public content::WebContentsObserver {
|
| typedef std::map<content::RenderViewHost*, Sizes> RenderViewSizes;
|
| RenderViewSizes render_view_sizes_;
|
| // Enlarge WebContentsView by this size insets in
|
| - // DidStartNavigationToPendingEntry.
|
| + // DidStartNavigation.
|
| gfx::Size wcv_resize_insets_;
|
| BrowserWindow* browser_window_; // Weak ptr.
|
|
|
|
|