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

Unified Diff: ui/app_list/views/apps_grid_view.h

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/app_list_main_view_unittest.cc ('k') | ui/app_list/views/apps_grid_view.cc » ('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.h
diff --git a/ui/app_list/views/apps_grid_view.h b/ui/app_list/views/apps_grid_view.h
index 1576ab0c8b0b3aa424fd6a005c17d5ad79aa1ced..d724b70802edcbb48a8f6c4b27c38b44a47808e5 100644
--- a/ui/app_list/views/apps_grid_view.h
+++ b/ui/app_list/views/apps_grid_view.h
@@ -196,7 +196,9 @@ class APP_LIST_EXPORT AppsGridView : public views::View,
void OnFolderItemRemoved();
// Return the view model for test purposes.
- const views::ViewModel* view_model_for_test() const { return &view_model_; }
+ const views::ViewModelT<AppListItemView>* view_model_for_test() const {
+ return &view_model_;
+ }
// For test: Return if the drag and drop handler was set.
bool has_drag_and_drop_host_for_test() { return NULL != drag_and_drop_host_; }
@@ -259,10 +261,6 @@ class APP_LIST_EXPORT AppsGridView : public views::View,
// number of apps.
void UpdatePulsingBlockViews();
- // Returns the pulsing block view of the item at |index| in the pulsing block
- // model.
- PulsingBlockView* GetPulsingBlockViewAt(int index) const;
-
AppListItemView* CreateViewForItemAtIndex(size_t index);
// Convert between the model index and the visual index. The model index
@@ -482,11 +480,11 @@ class APP_LIST_EXPORT AppsGridView : public views::View,
int cols_;
int rows_per_page_;
- // List of AppListItemViews. There is a view per item in |model_|.
- views::ViewModel view_model_;
+ // List of app item views. There is a view per item in |model_|.
+ views::ViewModelT<AppListItemView> view_model_;
- // List of PulsingBlockViews.
- views::ViewModel pulsing_blocks_model_;
+ // List of pulsing block views.
+ views::ViewModelT<PulsingBlockView> pulsing_blocks_model_;
AppListItemView* selected_view_;
« no previous file with comments | « ui/app_list/views/app_list_main_view_unittest.cc ('k') | ui/app_list/views/apps_grid_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698