1 // Copyright 2013 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include "ui/views/test/test_views.h" 6 7 namespace views { 8 StaticSizedView(const gfx::Size & size)9StaticSizedView::StaticSizedView(const gfx::Size& size) : size_(size) {} 10 ~StaticSizedView()11StaticSizedView::~StaticSizedView() {} 12 GetPreferredSize()13gfx::Size StaticSizedView::GetPreferredSize() { 14 return size_; 15 } 16 ProportionallySizedView(int factor)17ProportionallySizedView::ProportionallySizedView(int factor) 18 : factor_(factor) {} 19 ~ProportionallySizedView()20ProportionallySizedView::~ProportionallySizedView() {} 21 GetHeightForWidth(int w)22int ProportionallySizedView::GetHeightForWidth(int w) { 23 return w * factor_; 24 } 25 26 } // namespace views 27