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

Unified Diff: chrome/views/window.cc

Issue 7344: Convert GetPreferredSize from:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 2 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
« chrome/browser/views/download_shelf_view.cc ('K') | « chrome/views/view.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/views/window.cc
===================================================================
--- chrome/views/window.cc (revision 3391)
+++ chrome/views/window.cc (working copy)
@@ -325,16 +325,17 @@
}
void Window::SizeWindowToDefault() {
- CSize pref(0, 0);
+ gfx::Size pref;
if (non_client_view_) {
- non_client_view_->GetPreferredSize(&pref);
+ pref = non_client_view_->GetPreferredSize();
} else {
- client_view_->GetPreferredSize(&pref);
+ pref = client_view_->GetPreferredSize();
}
- DCHECK(pref.cx > 0 && pref.cy > 0);
+ DCHECK(pref.width() > 0 && pref.height() > 0);
// CenterAndSizeWindow adjusts the window size to accommodate the non-client
// area.
- win_util::CenterAndSizeWindow(owning_window(), GetHWND(), pref, true);
+ win_util::CenterAndSizeWindow(owning_window(), GetHWND(), pref.ToSIZE(),
+ true);
}
void Window::RunSystemMenu(const CPoint& point) {
« chrome/browser/views/download_shelf_view.cc ('K') | « chrome/views/view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698