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

Unified Diff: ui/views/test/test_views.cc

Issue 2538513002: [ash-md] Fixed TriView to relayout child Views when their preferred size changed. (Closed)
Patch Set: Created 4 years, 1 month 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
« ash/common/system/tray/tri_view.cc ('K') | « ui/views/test/test_views.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/test/test_views.cc
diff --git a/ui/views/test/test_views.cc b/ui/views/test/test_views.cc
index 837f2cece5a0d0abb51597bf3406cda83720ac8c..6755dba1e0436d7248477afb5c9b1451d7bf590b 100644
--- a/ui/views/test/test_views.cc
+++ b/ui/views/test/test_views.cc
@@ -35,6 +35,11 @@ ProportionallySizedView::ProportionallySizedView(int factor)
ProportionallySizedView::~ProportionallySizedView() {}
+void ProportionallySizedView::SetPreferredWidth(int width) {
+ preferred_width_ = width;
+ PreferredSizeChanged();
+}
+
int ProportionallySizedView::GetHeightForWidth(int w) const {
return w * factor_;
}
« ash/common/system/tray/tri_view.cc ('K') | « ui/views/test/test_views.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698