Chromium Code Reviews| 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/macros.h" | 10 #include "base/macros.h" | 
| 11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" | 
| 12 #include "base/timer/timer.h" | 12 #include "base/timer/timer.h" | 
| 13 #include "ui/app_list/app_list_export.h" | 13 #include "ui/app_list/app_list_export.h" | 
| 14 #include "ui/app_list/app_list_model_observer.h" | 14 #include "ui/app_list/app_list_model_observer.h" | 
| 15 #include "ui/app_list/views/apps_grid_view_delegate.h" | 15 #include "ui/app_list/views/apps_grid_view_delegate.h" | 
| 16 #include "ui/app_list/views/search_box_view_delegate.h" | 16 #include "ui/app_list/views/search_box_view_delegate.h" | 
| 17 #include "ui/app_list/views/search_result_list_view_delegate.h" | 17 #include "ui/app_list/views/search_result_list_view_delegate.h" | 
| 18 #include "ui/views/view.h" | 18 #include "ui/views/view.h" | 
| 19 | 19 | 
| 20 namespace app_list { | 20 namespace app_list { | 
| 21 | 21 | 
| 22 class AppListItem; | 22 class AppListItem; | 
| 23 class AppListModel; | 23 class AppListModel; | 
| 24 class AppListView; | |
| 24 class AppListViewDelegate; | 25 class AppListViewDelegate; | 
| 25 class ApplicationDragAndDropHost; | 26 class ApplicationDragAndDropHost; | 
| 26 class ContentsView; | 27 class ContentsView; | 
| 27 class PaginationModel; | 28 class PaginationModel; | 
| 28 class SearchBoxView; | 29 class SearchBoxView; | 
| 29 | 30 | 
| 30 // AppListMainView contains the normal view of the app list, which is shown | 31 // AppListMainView contains the normal view of the app list, which is shown | 
| 31 // when the user is signed in. | 32 // when the user is signed in. | 
| 32 class APP_LIST_EXPORT AppListMainView : public views::View, | 33 class APP_LIST_EXPORT AppListMainView : public views::View, | 
| 33 public AppsGridViewDelegate, | 34 public AppsGridViewDelegate, | 
| 34 public AppListModelObserver, | 35 public AppListModelObserver, | 
| 35 public SearchBoxViewDelegate, | 36 public SearchBoxViewDelegate, | 
| 36 public SearchResultListViewDelegate { | 37 public SearchResultListViewDelegate { | 
| 37 public: | 38 public: | 
| 38 explicit AppListMainView(AppListViewDelegate* delegate); | 39 explicit AppListMainView(AppListViewDelegate* delegate, | 
| 
 
msw
2017/06/06 17:56:31
nit: remove explicit
 
newcomer
2017/06/06 23:26:27
Done.
 
 | |
| 40 AppListView* app_list_view); | |
| 39 ~AppListMainView() override; | 41 ~AppListMainView() override; | 
| 40 | 42 | 
| 41 void Init(gfx::NativeView parent, | 43 void Init(gfx::NativeView parent, | 
| 42 int initial_apps_page, | 44 int initial_apps_page, | 
| 43 SearchBoxView* search_box_view); | 45 SearchBoxView* search_box_view); | 
| 44 | 46 | 
| 45 void ShowAppListWhenReady(); | 47 void ShowAppListWhenReady(); | 
| 46 | 48 | 
| 47 void ResetForShow(); | 49 void ResetForShow(); | 
| 48 | 50 | 
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 92 | 94 | 
| 93 // Overridden from SearchResultListViewDelegate: | 95 // Overridden from SearchResultListViewDelegate: | 
| 94 void OnResultInstalled(SearchResult* result) override; | 96 void OnResultInstalled(SearchResult* result) override; | 
| 95 | 97 | 
| 96 AppListViewDelegate* delegate_; // Owned by parent view (AppListView). | 98 AppListViewDelegate* delegate_; // Owned by parent view (AppListView). | 
| 97 AppListModel* model_; // Unowned; ownership is handled by |delegate_|. | 99 AppListModel* model_; // Unowned; ownership is handled by |delegate_|. | 
| 98 | 100 | 
| 99 // Created by AppListView. Owned by views hierarchy. | 101 // Created by AppListView. Owned by views hierarchy. | 
| 100 SearchBoxView* search_box_view_; | 102 SearchBoxView* search_box_view_; | 
| 101 ContentsView* contents_view_; // Owned by views hierarchy. | 103 ContentsView* contents_view_; // Owned by views hierarchy. | 
| 104 AppListView* const app_list_view_; // Owned by views hierarchy. | |
| 102 | 105 | 
| 103 DISALLOW_COPY_AND_ASSIGN(AppListMainView); | 106 DISALLOW_COPY_AND_ASSIGN(AppListMainView); | 
| 104 }; | 107 }; | 
| 105 | 108 | 
| 106 } // namespace app_list | 109 } // namespace app_list | 
| 107 | 110 | 
| 108 #endif // UI_APP_LIST_VIEWS_APP_LIST_MAIN_VIEW_H_ | 111 #endif // UI_APP_LIST_VIEWS_APP_LIST_MAIN_VIEW_H_ | 
| OLD | NEW |