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

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

Issue 524503003: Refactor app list scrolling: introduce the PaginationController class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ares-appgrid-vertical-scroll
Patch Set: Fix GN and Gyp. Created 6 years, 4 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/pagination_controller.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 546d1f8bc812a88ab14c2f09f69f8a86446ff7d1..17cb798b419876e5027def13d2faa6bae67c76c5 100644
--- a/ui/app_list/views/apps_grid_view.h
+++ b/ui/app_list/views/apps_grid_view.h
@@ -50,7 +50,7 @@ class AppListItemView;
class AppsGridViewDelegate;
class AppsGridViewFolderDelegate;
class PageSwitcher;
-class PaginationModel;
+class PaginationController;
// AppsGridView displays a grid for AppListItemList sub model.
class APP_LIST_EXPORT AppsGridView : public views::View,
@@ -224,8 +224,6 @@ class APP_LIST_EXPORT AppsGridView : public views::View,
DROP_FOR_FOLDER,
};
- enum ScrollAxis { SCROLL_AXIS_HORIZONTAL, SCROLL_AXIS_VERTICAL };
-
// Represents the index to an item view in the grid.
struct Index {
Index() : page(-1), slot(-1) {}
@@ -461,9 +459,6 @@ class APP_LIST_EXPORT AppsGridView : public views::View,
const base::FilePath& path);
#endif
- // Determines whether the grid view scrolls horizontally or vertically.
- static ScrollAxis GetScrollAxis();
-
AppListModel* model_; // Owned by AppListView.
AppListItemList* item_list_; // Not owned.
AppsGridViewDelegate* delegate_;
@@ -472,6 +467,8 @@ class APP_LIST_EXPORT AppsGridView : public views::View,
AppsGridViewFolderDelegate* folder_delegate_;
PaginationModel pagination_model_;
+ // Must appear after |pagination_model_|.
+ scoped_ptr<PaginationController> pagination_controller_;
PageSwitcher* page_switcher_view_; // Owned by views hierarchy.
int cols_;
« no previous file with comments | « ui/app_list/pagination_controller.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