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

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

Issue 297643002: Add tiles to the experimental app list start page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix mac test 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
« no previous file with comments | « ui/app_list/views/contents_view.cc ('k') | ui/app_list/views/start_page_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..89d27a57171f7914578668eee21fd33e8233ff5b 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,51 @@ 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() const { return tile_views_; }
+
private:
+ void SetModel(AppListModel* model);
+
// 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);
};
« no previous file with comments | « ui/app_list/views/contents_view.cc ('k') | ui/app_list/views/start_page_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698