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

Side by Side Diff: chrome/browser/ui/browser_browsertest.cc

Issue 2225343002: Navigation: move RestoreType and ReloadType into a separate file (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase+ Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 // Cache the size when RenderViewHost is first created. 277 // Cache the size when RenderViewHost is first created.
278 void RenderViewCreated(content::RenderViewHost* render_view_host) override { 278 void RenderViewCreated(content::RenderViewHost* render_view_host) override {
279 render_view_sizes_[render_view_host].rwhv_create_size = 279 render_view_sizes_[render_view_host].rwhv_create_size =
280 render_view_host->GetWidget()->GetView()->GetViewBounds().size(); 280 render_view_host->GetWidget()->GetView()->GetViewBounds().size();
281 } 281 }
282 282
283 // Enlarge WebContentsView by |wcv_resize_insets_| while the navigation entry 283 // Enlarge WebContentsView by |wcv_resize_insets_| while the navigation entry
284 // is pending. 284 // is pending.
285 void DidStartNavigationToPendingEntry( 285 void DidStartNavigationToPendingEntry(
286 const GURL& url, 286 const GURL& url,
287 NavigationController::ReloadType reload_type) override { 287 content::ReloadType reload_type) override {
288 if (wcv_resize_insets_.IsEmpty()) 288 if (wcv_resize_insets_.IsEmpty())
289 return; 289 return;
290 // Resizing the main browser window by |wcv_resize_insets_| will 290 // Resizing the main browser window by |wcv_resize_insets_| will
291 // automatically resize the WebContentsView by the same amount. 291 // automatically resize the WebContentsView by the same amount.
292 // Just resizing WebContentsView directly doesn't work on Linux, because the 292 // Just resizing WebContentsView directly doesn't work on Linux, because the
293 // next automatic layout of the browser window will resize WebContentsView 293 // next automatic layout of the browser window will resize WebContentsView
294 // back to the previous size. To make it consistent, resize main browser 294 // back to the previous size. To make it consistent, resize main browser
295 // window on all platforms. 295 // window on all platforms.
296 gfx::Rect bounds(browser_window_->GetBounds()); 296 gfx::Rect bounds(browser_window_->GetBounds());
297 gfx::Size size(bounds.size()); 297 gfx::Size size(bounds.size());
(...skipping 2569 matching lines...) Expand 10 before | Expand all | Expand 10 after
2867 Browser* browser = new Browser(params); 2867 Browser* browser = new Browser(params);
2868 gfx::Rect bounds = browser->window()->GetBounds(); 2868 gfx::Rect bounds = browser->window()->GetBounds();
2869 2869
2870 // Should be EXPECT_EQ, but this width is inconsistent across platforms. 2870 // Should be EXPECT_EQ, but this width is inconsistent across platforms.
2871 // See https://crbug.com/567925. 2871 // See https://crbug.com/567925.
2872 EXPECT_GE(bounds.width(), 100); 2872 EXPECT_GE(bounds.width(), 100);
2873 EXPECT_EQ(122, bounds.height()); 2873 EXPECT_EQ(122, bounds.height());
2874 browser->window()->Close(); 2874 browser->window()->Close();
2875 } 2875 }
2876 } 2876 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698