| 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   AppListMainView(AppListViewDelegate* delegate, AppListView* app_list_view); | 
|   39   ~AppListMainView() override; |   40   ~AppListMainView() override; | 
|   40  |   41  | 
|   41   void Init(gfx::NativeView parent, |   42   void Init(gfx::NativeView parent, | 
|   42             int initial_apps_page, |   43             int initial_apps_page, | 
|   43             SearchBoxView* search_box_view); |   44             SearchBoxView* search_box_view); | 
|   44  |   45  | 
|   45   void ShowAppListWhenReady(); |   46   void ShowAppListWhenReady(); | 
|   46  |   47  | 
|   47   void ResetForShow(); |   48   void ResetForShow(); | 
|   48  |   49  | 
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   92  |   93  | 
|   93   // Overridden from SearchResultListViewDelegate: |   94   // Overridden from SearchResultListViewDelegate: | 
|   94   void OnResultInstalled(SearchResult* result) override; |   95   void OnResultInstalled(SearchResult* result) override; | 
|   95  |   96  | 
|   96   AppListViewDelegate* delegate_;  // Owned by parent view (AppListView). |   97   AppListViewDelegate* delegate_;  // Owned by parent view (AppListView). | 
|   97   AppListModel* model_;  // Unowned; ownership is handled by |delegate_|. |   98   AppListModel* model_;  // Unowned; ownership is handled by |delegate_|. | 
|   98  |   99  | 
|   99   // Created by AppListView. Owned by views hierarchy. |  100   // Created by AppListView. Owned by views hierarchy. | 
|  100   SearchBoxView* search_box_view_; |  101   SearchBoxView* search_box_view_; | 
|  101   ContentsView* contents_view_;  // Owned by views hierarchy. |  102   ContentsView* contents_view_;  // Owned by views hierarchy. | 
 |  103   AppListView* const app_list_view_;  // Owned by views hierarchy. | 
|  102  |  104  | 
|  103   DISALLOW_COPY_AND_ASSIGN(AppListMainView); |  105   DISALLOW_COPY_AND_ASSIGN(AppListMainView); | 
|  104 }; |  106 }; | 
|  105  |  107  | 
|  106 }  // namespace app_list |  108 }  // namespace app_list | 
|  107  |  109  | 
|  108 #endif  // UI_APP_LIST_VIEWS_APP_LIST_MAIN_VIEW_H_ |  110 #endif  // UI_APP_LIST_VIEWS_APP_LIST_MAIN_VIEW_H_ | 
| OLD | NEW |