| 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; |  | 
|   25 class AppListViewDelegate; |   24 class AppListViewDelegate; | 
|   26 class ApplicationDragAndDropHost; |   25 class ApplicationDragAndDropHost; | 
|   27 class ContentsView; |   26 class ContentsView; | 
|   28 class PaginationModel; |   27 class PaginationModel; | 
|   29 class SearchBoxView; |   28 class SearchBoxView; | 
|   30  |   29  | 
|   31 // AppListMainView contains the normal view of the app list, which is shown |   30 // AppListMainView contains the normal view of the app list, which is shown | 
|   32 // when the user is signed in. |   31 // when the user is signed in. | 
|   33 class APP_LIST_EXPORT AppListMainView : public views::View, |   32 class APP_LIST_EXPORT AppListMainView : public views::View, | 
|   34                                         public AppsGridViewDelegate, |   33                                         public AppsGridViewDelegate, | 
|   35                                         public AppListModelObserver, |   34                                         public AppListModelObserver, | 
|   36                                         public SearchBoxViewDelegate, |   35                                         public SearchBoxViewDelegate, | 
|   37                                         public SearchResultListViewDelegate { |   36                                         public SearchResultListViewDelegate { | 
|   38  public: |   37  public: | 
|   39   AppListMainView(AppListViewDelegate* delegate, AppListView* app_list_view); |   38   explicit AppListMainView(AppListViewDelegate* delegate); | 
|   40   ~AppListMainView() override; |   39   ~AppListMainView() override; | 
|   41  |   40  | 
|   42   void Init(gfx::NativeView parent, |   41   void Init(gfx::NativeView parent, | 
|   43             int initial_apps_page, |   42             int initial_apps_page, | 
|   44             SearchBoxView* search_box_view); |   43             SearchBoxView* search_box_view); | 
|   45  |   44  | 
|   46   void ShowAppListWhenReady(); |   45   void ShowAppListWhenReady(); | 
|   47  |   46  | 
|   48   void ResetForShow(); |   47   void ResetForShow(); | 
|   49  |   48  | 
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   93  |   92  | 
|   94   // Overridden from SearchResultListViewDelegate: |   93   // Overridden from SearchResultListViewDelegate: | 
|   95   void OnResultInstalled(SearchResult* result) override; |   94   void OnResultInstalled(SearchResult* result) override; | 
|   96  |   95  | 
|   97   AppListViewDelegate* delegate_;  // Owned by parent view (AppListView). |   96   AppListViewDelegate* delegate_;  // Owned by parent view (AppListView). | 
|   98   AppListModel* model_;  // Unowned; ownership is handled by |delegate_|. |   97   AppListModel* model_;  // Unowned; ownership is handled by |delegate_|. | 
|   99  |   98  | 
|  100   // Created by AppListView. Owned by views hierarchy. |   99   // Created by AppListView. Owned by views hierarchy. | 
|  101   SearchBoxView* search_box_view_; |  100   SearchBoxView* search_box_view_; | 
|  102   ContentsView* contents_view_;  // Owned by views hierarchy. |  101   ContentsView* contents_view_;  // Owned by views hierarchy. | 
|  103   AppListView* const app_list_view_;  // Owned by views hierarchy. |  | 
|  104  |  102  | 
|  105   DISALLOW_COPY_AND_ASSIGN(AppListMainView); |  103   DISALLOW_COPY_AND_ASSIGN(AppListMainView); | 
|  106 }; |  104 }; | 
|  107  |  105  | 
|  108 }  // namespace app_list |  106 }  // namespace app_list | 
|  109  |  107  | 
|  110 #endif  // UI_APP_LIST_VIEWS_APP_LIST_MAIN_VIEW_H_ |  108 #endif  // UI_APP_LIST_VIEWS_APP_LIST_MAIN_VIEW_H_ | 
| OLD | NEW |