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

Unified Diff: ui/views/view_model_utils.cc

Issue 598013003: Added views::ViewModelT<T>, a type-safe template version of ViewModel. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@appsgridview-static-casts
Patch Set: Fix browser_test compile on ChromeOS (missing include). Created 6 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
« no previous file with comments | « ui/views/view_model_utils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/view_model_utils.cc
diff --git a/ui/views/view_model_utils.cc b/ui/views/view_model_utils.cc
index 056e75b8a7fa1620c69dbee233e5d2242dc97e2b..4bb3ac4eb307c1675b6737f7bdb46e434edd62bb 100644
--- a/ui/views/view_model_utils.cc
+++ b/ui/views/view_model_utils.cc
@@ -23,15 +23,15 @@ int primary_axis_coordinate(ViewModelUtils::Alignment alignment,
} // namespace
// static
-void ViewModelUtils::SetViewBoundsToIdealBounds(const ViewModel& model) {
+void ViewModelUtils::SetViewBoundsToIdealBounds(const ViewModelBase& model) {
for (int i = 0; i < model.view_size(); ++i)
- model.view_at(i)->SetBoundsRect(model.ideal_bounds(i));
+ model.ViewAtBase(i)->SetBoundsRect(model.ideal_bounds(i));
}
// static
-bool ViewModelUtils::IsAtIdealBounds(const ViewModel& model) {
+bool ViewModelUtils::IsAtIdealBounds(const ViewModelBase& model) {
for (int i = 0; i < model.view_size(); ++i) {
- View* view = model.view_at(i);
+ View* view = model.ViewAtBase(i);
if (view->bounds() != model.ideal_bounds(i))
return false;
}
@@ -39,7 +39,7 @@ bool ViewModelUtils::IsAtIdealBounds(const ViewModel& model) {
}
// static
-int ViewModelUtils::DetermineMoveIndex(const ViewModel& model,
+int ViewModelUtils::DetermineMoveIndex(const ViewModelBase& model,
View* view,
Alignment alignment,
int x,
« no previous file with comments | « ui/views/view_model_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698