1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef UI_APP_LIST_VIEWS_START_PAGE_VIEW_H_
6 #define UI_APP_LIST_VIEWS_START_PAGE_VIEW_H_
8 #include "base/basictypes.h"
9 #include "ui/app_list/app_list_model_observer.h"
10 #include "ui/app_list/app_list_view_delegate_observer.h"
11 #include "ui/views/controls/button/button.h"
12 #include "ui/views/view.h"
20 class AppListMainView
;
22 class AppListViewDelegate
;
25 // The start page for the experimental app list.
26 class StartPageView
: public views::View
,
27 public views::ButtonListener
,
28 public AppListViewDelegateObserver
,
29 public AppListModelObserver
{
31 StartPageView(AppListMainView
* app_list_main_view
,
32 AppListViewDelegate
* view_delegate
);
33 virtual ~StartPageView();
37 const std::vector
<TileItemView
*>& tile_views() const { return tile_views_
; }
40 void SetModel(AppListModel
* model
);
42 // Overridden from views::ButtonListener:
43 virtual void ButtonPressed(views::Button
* sender
,
44 const ui::Event
& event
) OVERRIDE
;
46 // Overridden from AppListViewDelegateObserver:
47 virtual void OnProfilesChanged() OVERRIDE
;
49 // Overridden from AppListModelObserver:
50 virtual void OnAppListModelStatusChanged() OVERRIDE
;
51 virtual void OnAppListItemAdded(AppListItem
* item
) OVERRIDE
;
52 virtual void OnAppListItemDeleted() OVERRIDE
;
53 virtual void OnAppListItemUpdated(AppListItem
* item
) OVERRIDE
;
55 // The parent view of ContentsView which is the parent of this view.
56 AppListMainView
* app_list_main_view_
;
58 AppListModel
* model_
; // Owned by AppListSyncableService.
60 AppListViewDelegate
* view_delegate_
; // Owned by AppListView.
62 views::View
* instant_container_
; // Owned by views hierarchy.
63 views::View
* tiles_container_
; // Owned by views hierarchy.
65 std::vector
<TileItemView
*> tile_views_
;
67 DISALLOW_COPY_AND_ASSIGN(StartPageView
);
70 } // namespace app_list
72 #endif // UI_APP_LIST_VIEWS_START_PAGE_VIEW_H_