Chromium Code Reviews| Index: ui/app_list/views/start_page_view.h |
| diff --git a/ui/app_list/views/start_page_view.h b/ui/app_list/views/start_page_view.h |
| index 2239b0ac9303bf740ddc42ab9ed5bb0e896a6dfc..c88db6831fe166c1b21b30728ad8fc39fd4062d0 100644 |
| --- a/ui/app_list/views/start_page_view.h |
| +++ b/ui/app_list/views/start_page_view.h |
| @@ -6,6 +6,8 @@ |
| #define UI_APP_LIST_VIEWS_START_PAGE_VIEW_H_ |
| #include "base/basictypes.h" |
| +#include "ui/app_list/app_list_model_observer.h" |
| +#include "ui/app_list/app_list_view_delegate_observer.h" |
| #include "ui/views/controls/button/button.h" |
| #include "ui/views/view.h" |
| @@ -16,25 +18,52 @@ class WebContents; |
| namespace app_list { |
| class AppListMainView; |
| +class AppListModel; |
| +class AppListViewDelegate; |
| +class TileItemView; |
| // The start page for the experimental app list. |
| -class StartPageView : public views::View, public views::ButtonListener { |
| +class StartPageView : public views::View, |
| + public views::ButtonListener, |
| + public AppListViewDelegateObserver, |
| + public AppListModelObserver { |
| public: |
| StartPageView(AppListMainView* app_list_main_view, |
| - content::WebContents* start_page_web_contents); |
| + AppListViewDelegate* view_delegate); |
| virtual ~StartPageView(); |
| void Reset(); |
| + const std::vector<TileItemView*>& tile_views() { return tile_views_; } |
|
tapted
2014/05/27 05:10:10
nit: also declare function const?
calamity
2014/05/27 06:21:08
Done.
|
| + |
| private: |
| + void SetModel(AppListModel* model); |
| + TileItemView* GetTileViewAt(int index); |
| + |
| // Overridden from views::ButtonListener: |
| virtual void ButtonPressed(views::Button* sender, |
| const ui::Event& event) OVERRIDE; |
| + // Overridden from AppListViewDelegateObserver: |
| + virtual void OnProfilesChanged() OVERRIDE; |
| + |
| + // Overridden from AppListModelObserver: |
| + virtual void OnAppListModelStatusChanged() OVERRIDE; |
| + virtual void OnAppListItemAdded(AppListItem* item) OVERRIDE; |
| + virtual void OnAppListItemDeleted() OVERRIDE; |
| + virtual void OnAppListItemUpdated(AppListItem* item) OVERRIDE; |
| + |
| // The parent view of ContentsView which is the parent of this view. |
| AppListMainView* app_list_main_view_; |
| + AppListModel* model_; // Owned by AppListSyncableService. |
| + |
| + AppListViewDelegate* view_delegate_; // Owned by AppListView. |
| + |
| views::View* instant_container_; // Owned by views hierarchy. |
| + views::View* tiles_container_; // Owned by views hierarchy. |
| + |
| + std::vector<TileItemView*> tile_views_; |
| DISALLOW_COPY_AND_ASSIGN(StartPageView); |
| }; |