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

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

Issue 302803002: Refactor app list so AppsGridView owns the PaginationModel. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Respond to review comments (tapted and xiyuan). Created 6 years, 7 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
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 c6c9efa6f800626ace779214e5aa5590cacb5a5d..d6d26276442e91b9202c6edee21cc11b01d6fa6a 100644
--- a/ui/app_list/views/apps_grid_view.h
+++ b/ui/app_list/views/apps_grid_view.h
@@ -14,6 +14,7 @@
#include "ui/app_list/app_list_export.h"
#include "ui/app_list/app_list_model.h"
#include "ui/app_list/app_list_model_observer.h"
+#include "ui/app_list/pagination_model.h"
#include "ui/app_list/pagination_model_observer.h"
#include "ui/base/models/list_model_observer.h"
#include "ui/compositor/layer_animation_observer.h"
@@ -70,10 +71,8 @@ class APP_LIST_EXPORT AppsGridView : public views::View,
};
// Constructs the app icon grid view. |delegate| is the delegate of this
- // view, which usually is the hosting AppListView. |pagination_model| is
- // the paging info shared within the launcher UI.
- AppsGridView(AppsGridViewDelegate* delegate,
- PaginationModel* pagination_model);
+ // view, which usually is the hosting AppListView.
+ AppsGridView(AppsGridViewDelegate* delegate);
xiyuan 2014/06/02 17:02:08 nit: explicit
Matt Giuca 2014/06/03 01:52:36 Done.
virtual ~AppsGridView();
// Sets fixed layout parameters. After setting this, CalculateLayout below
@@ -131,6 +130,9 @@ class APP_LIST_EXPORT AppsGridView : public views::View,
bool has_dragged_view() const { return drag_view_ != NULL; }
bool dragging() const { return drag_pointer_ != NONE; }
+ // Gets the PaginationModel used for the grid view.
+ PaginationModel* pagination_model() { return &pagination_model_; }
+
// Overridden from views::View:
virtual gfx::Size GetPreferredSize() const OVERRIDE;
virtual void Layout() OVERRIDE;
@@ -461,7 +463,7 @@ class APP_LIST_EXPORT AppsGridView : public views::View,
// This can be NULL. Only grid views inside folders have a folder delegate.
AppsGridViewFolderDelegate* folder_delegate_;
- PaginationModel* pagination_model_; // Owned by AppListController.
+ PaginationModel pagination_model_;
PageSwitcher* page_switcher_view_; // Owned by views hierarchy.
gfx::Size icon_size_;

Powered by Google App Engine
This is Rietveld 408576698