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

Unified Diff: ui/app_list/views/apps_grid_view.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/app_list/views/apps_grid_view.h ('k') | ui/app_list/views/contents_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/views/apps_grid_view.cc
diff --git a/ui/app_list/views/apps_grid_view.cc b/ui/app_list/views/apps_grid_view.cc
index 22b7fd97237393262ff49957a89cb5a1965b46b7..43628e420ae62d5fb68b2f7f69741fd894d4a345 100644
--- a/ui/app_list/views/apps_grid_view.cc
+++ b/ui/app_list/views/apps_grid_view.cc
@@ -762,7 +762,7 @@ void AppsGridView::StopPageFlipTimer() {
}
AppListItemView* AppsGridView::GetItemViewAt(int index) const {
- return static_cast<AppListItemView*>(view_model_.view_at(index));
+ return view_model_.view_at(index);
}
void AppsGridView::SetTopItemViewsVisible(bool visible) {
@@ -1057,7 +1057,7 @@ void AppsGridView::UpdatePulsingBlockViews() {
return;
while (pulsing_blocks_model_.view_size() > desired) {
- PulsingBlockView* view = GetPulsingBlockViewAt(0);
+ PulsingBlockView* view = pulsing_blocks_model_.view_at(0);
pulsing_blocks_model_.Remove(0);
delete view;
}
@@ -1069,10 +1069,6 @@ void AppsGridView::UpdatePulsingBlockViews() {
}
}
-PulsingBlockView* AppsGridView::GetPulsingBlockViewAt(int index) const {
- return static_cast<PulsingBlockView*>(pulsing_blocks_model_.view_at(index));
-}
-
AppListItemView* AppsGridView::CreateViewForItemAtIndex(size_t index) {
// The drag_view_ might be pending for deletion, therefore view_model_
// may have one more item than item_list_.
« no previous file with comments | « ui/app_list/views/apps_grid_view.h ('k') | ui/app_list/views/contents_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698