OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_APP_LIST_MAIN_VIEW_H_ | 5 #ifndef UI_APP_LIST_VIEWS_APP_LIST_MAIN_VIEW_H_ |
6 #define UI_APP_LIST_VIEWS_APP_LIST_MAIN_VIEW_H_ | 6 #define UI_APP_LIST_VIEWS_APP_LIST_MAIN_VIEW_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 // when the user is signed in. | 35 // when the user is signed in. |
36 class APP_LIST_EXPORT AppListMainView : public views::View, | 36 class APP_LIST_EXPORT AppListMainView : public views::View, |
37 public AppsGridViewDelegate, | 37 public AppsGridViewDelegate, |
38 public SearchBoxViewDelegate, | 38 public SearchBoxViewDelegate, |
39 public SearchResultListViewDelegate { | 39 public SearchResultListViewDelegate { |
40 public: | 40 public: |
41 // Takes ownership of |delegate|. | 41 // Takes ownership of |delegate|. |
42 explicit AppListMainView(AppListViewDelegate* delegate); | 42 explicit AppListMainView(AppListViewDelegate* delegate); |
43 virtual ~AppListMainView(); | 43 virtual ~AppListMainView(); |
44 | 44 |
45 void Init(gfx::NativeView parent, int initial_apps_page); | 45 void Init(gfx::NativeView parent, |
| 46 int initial_apps_page, |
| 47 SearchBoxView* search_box_view); |
46 | 48 |
47 void ShowAppListWhenReady(); | 49 void ShowAppListWhenReady(); |
48 | 50 |
49 void ResetForShow(); | 51 void ResetForShow(); |
50 | 52 |
51 void Close(); | 53 void Close(); |
52 | 54 |
53 void Prerender(); | 55 void Prerender(); |
54 | 56 |
55 void ModelChanged(); | 57 void ModelChanged(); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 // Overridden from SearchBoxViewDelegate: | 108 // Overridden from SearchBoxViewDelegate: |
107 virtual void QueryChanged(SearchBoxView* sender) override; | 109 virtual void QueryChanged(SearchBoxView* sender) override; |
108 | 110 |
109 // Overridden from SearchResultListViewDelegate: | 111 // Overridden from SearchResultListViewDelegate: |
110 virtual void OnResultInstalled(SearchResult* result) override; | 112 virtual void OnResultInstalled(SearchResult* result) override; |
111 virtual void OnResultUninstalled(SearchResult* result) override; | 113 virtual void OnResultUninstalled(SearchResult* result) override; |
112 | 114 |
113 AppListViewDelegate* delegate_; // Owned by parent view (AppListView). | 115 AppListViewDelegate* delegate_; // Owned by parent view (AppListView). |
114 AppListModel* model_; // Unowned; ownership is handled by |delegate_|. | 116 AppListModel* model_; // Unowned; ownership is handled by |delegate_|. |
115 | 117 |
116 SearchBoxView* search_box_view_; // Owned by views hierarchy. | 118 // Created by AppListView. Owned by views hierarchy. |
| 119 SearchBoxView* search_box_view_; |
117 ContentsView* contents_view_; // Owned by views hierarchy. | 120 ContentsView* contents_view_; // Owned by views hierarchy. |
118 | 121 |
119 // Owned by views hierarchy. NULL in the non-experimental app list. | 122 // Owned by views hierarchy. NULL in the non-experimental app list. |
120 ContentsSwitcherView* contents_switcher_view_; | 123 ContentsSwitcherView* contents_switcher_view_; |
121 | 124 |
122 // A timer that fires when maximum allowed time to wait for icon loading has | 125 // A timer that fires when maximum allowed time to wait for icon loading has |
123 // passed. | 126 // passed. |
124 base::OneShotTimer<AppListMainView> icon_loading_wait_timer_; | 127 base::OneShotTimer<AppListMainView> icon_loading_wait_timer_; |
125 | 128 |
126 ScopedVector<IconLoader> pending_icon_loaders_; | 129 ScopedVector<IconLoader> pending_icon_loaders_; |
127 | 130 |
128 base::WeakPtrFactory<AppListMainView> weak_ptr_factory_; | 131 base::WeakPtrFactory<AppListMainView> weak_ptr_factory_; |
129 | 132 |
130 DISALLOW_COPY_AND_ASSIGN(AppListMainView); | 133 DISALLOW_COPY_AND_ASSIGN(AppListMainView); |
131 }; | 134 }; |
132 | 135 |
133 } // namespace app_list | 136 } // namespace app_list |
134 | 137 |
135 #endif // UI_APP_LIST_VIEWS_APP_LIST_MAIN_VIEW_H_ | 138 #endif // UI_APP_LIST_VIEWS_APP_LIST_MAIN_VIEW_H_ |
OLD | NEW |