OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_APP_LIST_VIEWS_START_PAGE_VIEW_H_ | 5 #ifndef UI_APP_LIST_VIEWS_START_PAGE_VIEW_H_ |
6 #define UI_APP_LIST_VIEWS_START_PAGE_VIEW_H_ | 6 #define UI_APP_LIST_VIEWS_START_PAGE_VIEW_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 class APP_LIST_EXPORT StartPageView : public views::View { | 23 class APP_LIST_EXPORT StartPageView : public views::View { |
24 public: | 24 public: |
25 StartPageView(AppListMainView* app_list_main_view, | 25 StartPageView(AppListMainView* app_list_main_view, |
26 AppListViewDelegate* view_delegate); | 26 AppListViewDelegate* view_delegate); |
27 ~StartPageView() override; | 27 ~StartPageView() override; |
28 | 28 |
29 void Reset(); | 29 void Reset(); |
30 | 30 |
31 void UpdateForTesting(); | 31 void UpdateForTesting(); |
32 | 32 |
| 33 void OpenCustomLauncherPage(); |
| 34 |
33 const std::vector<SearchResultTileItemView*>& tile_views() const; | 35 const std::vector<SearchResultTileItemView*>& tile_views() const; |
34 TileItemView* all_apps_button() const; | 36 TileItemView* all_apps_button() const; |
35 | 37 |
36 // Called when the start page view is displayed. | 38 // Called when the start page view is displayed. |
37 void OnShow(); | 39 void OnShow(); |
38 | 40 |
39 // Called when the start page view is hidden (while the app list is still | |
40 // open). | |
41 void OnHide(); | |
42 | |
43 // Overridden from views::View: | 41 // Overridden from views::View: |
44 void Layout() override; | 42 void Layout() override; |
45 bool OnKeyPressed(const ui::KeyEvent& event) override; | 43 bool OnKeyPressed(const ui::KeyEvent& event) override; |
46 | 44 |
| 45 bool OnMousePressed(const ui::MouseEvent& event) override; |
| 46 bool OnMouseWheel(const ui::MouseWheelEvent& event) override; |
| 47 void OnGestureEvent(ui::GestureEvent* event) override; |
| 48 |
47 // Returns search box bounds to use when the start page is active. | 49 // Returns search box bounds to use when the start page is active. |
48 gfx::Rect GetSearchBoxBounds() const; | 50 gfx::Rect GetSearchBoxBounds() const; |
49 | 51 |
50 // Updates whether the custom page clickzone is visible. | |
51 void UpdateCustomPageClickzoneVisibility(); | |
52 | |
53 private: | 52 private: |
54 class StartPageTilesContainer; | 53 class StartPageTilesContainer; |
55 | 54 |
56 void InitInstantContainer(); | 55 void InitInstantContainer(); |
57 | 56 |
58 TileItemView* GetTileItemView(size_t index); | 57 TileItemView* GetTileItemView(size_t index); |
59 | 58 |
60 // The parent view of ContentsView which is the parent of this view. | 59 // The parent view of ContentsView which is the parent of this view. |
61 AppListMainView* app_list_main_view_; | 60 AppListMainView* app_list_main_view_; |
62 | 61 |
63 AppListViewDelegate* view_delegate_; // Owned by AppListView. | 62 AppListViewDelegate* view_delegate_; // Owned by AppListView. |
64 | 63 |
65 views::View* search_box_spacer_view_; // Owned by views hierarchy. | 64 views::View* search_box_spacer_view_; // Owned by views hierarchy. |
66 views::View* instant_container_; // Owned by views hierarchy. | 65 views::View* instant_container_; // Owned by views hierarchy. |
67 StartPageTilesContainer* tiles_container_; // Owned by views hierarchy. | 66 StartPageTilesContainer* tiles_container_; // Owned by views hierarchy. |
68 | 67 |
69 DISALLOW_COPY_AND_ASSIGN(StartPageView); | 68 DISALLOW_COPY_AND_ASSIGN(StartPageView); |
70 }; | 69 }; |
71 | 70 |
72 } // namespace app_list | 71 } // namespace app_list |
73 | 72 |
74 #endif // UI_APP_LIST_VIEWS_START_PAGE_VIEW_H_ | 73 #endif // UI_APP_LIST_VIEWS_START_PAGE_VIEW_H_ |
OLD | NEW |