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

Unified Diff: chrome/browser/ui/cocoa/browser_window_controller.mm

Issue 9215002: Fix window zoom in a sane way, remove nasty casts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: style Created 8 years, 11 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
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_cocoa.mm ('k') | content/browser/tab_contents/tab_contents.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/browser_window_controller.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_controller.mm b/chrome/browser/ui/cocoa/browser_window_controller.mm
index 1783de3efe6896660674caba89c2088c4704deba..bfe515437c3015b82d18ca0494dad636176d6c58 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller.mm
@@ -696,10 +696,8 @@ enum {
if (contents) {
// If the intrinsic width is bigger, then make it the zoomed width.
const int kScrollbarWidth = 16; // TODO(viettrungluu): ugh.
- TabContentsViewMac* tab_contents_view =
- static_cast<TabContentsViewMac*>(contents->GetView());
CGFloat intrinsicWidth = static_cast<CGFloat>(
- tab_contents_view->preferred_width() + kScrollbarWidth);
+ contents->GetPreferredSize().width() + kScrollbarWidth);
zoomedWidth = std::max(zoomedWidth,
std::min(intrinsicWidth, frame.size.width));
}
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_cocoa.mm ('k') | content/browser/tab_contents/tab_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698