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..396c7b2166f095676d5595991c92a365ec7e6f11 100644 |
--- a/ui/app_list/views/apps_grid_view.h |
+++ b/ui/app_list/views/apps_grid_view.h |
@@ -10,6 +10,8 @@ |
#include "base/basictypes.h" |
#include "base/compiler_specific.h" |
+#include "base/memory/ref_counted.h" |
tapted
2014/06/02 04:02:21
nit: unused?
Matt Giuca
2014/06/02 07:11:23
Done.
Matt Giuca
2014/06/03 01:52:36
Actually, ref_counted.h is used (not by my code, b
|
+#include "base/memory/scoped_ptr.h" |
#include "base/timer/timer.h" |
#include "ui/app_list/app_list_export.h" |
#include "ui/app_list/app_list_model.h" |
@@ -70,10 +72,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); |
virtual ~AppsGridView(); |
// Sets fixed layout parameters. After setting this, CalculateLayout below |
@@ -131,6 +131,11 @@ 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* GetPaginationModel() const { |
xiyuan
2014/05/30 15:47:47
GetPaginationModel -> pagination_model and get rid
Matt Giuca
2014/06/02 07:11:23
Done.
|
+ return pagination_model_.get(); |
+ } |
+ |
// Overridden from views::View: |
virtual gfx::Size GetPreferredSize() const OVERRIDE; |
virtual void Layout() OVERRIDE; |
@@ -461,7 +466,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. |
+ scoped_ptr<PaginationModel> pagination_model_; |
tapted
2014/06/02 04:02:21
I'd consider trying this out as a non-pointer data
Matt Giuca
2014/06/02 07:11:23
Done.
|
PageSwitcher* page_switcher_view_; // Owned by views hierarchy. |
gfx::Size icon_size_; |