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

Unified Diff: chrome/views/native_button.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
Index: chrome/views/native_button.cc
===================================================================
--- chrome/views/native_button.cc (revision 3391)
+++ chrome/views/native_button.cc (working copy)
@@ -33,7 +33,7 @@
padding_ = size;
}
-void NativeButton::GetPreferredSize(CSize *out) {
+gfx::Size NativeButton::GetPreferredSize() {
HWND hwnd = GetNativeControlHWND();
if (hwnd) {
SIZE sz = {0, 0};
@@ -54,8 +54,9 @@
sz.cy = std::max(static_cast<int>(sz.cy),
font_.vertical_dlus_to_pixels(min_dlu_size_.height()));
}
- *out = sz;
+ return gfx::Size(sz.cx, sz.cy);
}
+ return gfx::Size();
}
void NativeButton::SetLabel(const std::wstring& l) {

Powered by Google App Engine
This is Rietveld 408576698