This source file includes following definitions.
- GetPreferredSize
- GetHeightForWidth
#include "ui/views/test/test_views.h"
namespace views {
StaticSizedView::StaticSizedView(const gfx::Size& size) : size_(size) {}
StaticSizedView::~StaticSizedView() {}
gfx::Size StaticSizedView::GetPreferredSize() {
return size_;
}
ProportionallySizedView::ProportionallySizedView(int factor)
: factor_(factor) {}
ProportionallySizedView::~ProportionallySizedView() {}
int ProportionallySizedView::GetHeightForWidth(int w) {
return w * factor_;
}
}