| 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_COCOA_APP_LIST_VIEW_CONTROLLER_H_ | 5 #ifndef UI_APP_LIST_COCOA_APP_LIST_VIEW_CONTROLLER_H_ |
| 6 #define UI_APP_LIST_COCOA_APP_LIST_VIEW_CONTROLLER_H_ | 6 #define UI_APP_LIST_COCOA_APP_LIST_VIEW_CONTROLLER_H_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 | 9 |
| 10 #include "base/mac/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "ui/app_list/app_list_export.h" | 12 #include "ui/app_list/app_list_export.h" |
| 13 #import "ui/app_list/cocoa/apps_pagination_model_observer.h" | 13 #import "ui/app_list/cocoa/apps_pagination_model_observer.h" |
| 14 #import "ui/app_list/cocoa/apps_search_box_controller.h" | 14 #import "ui/app_list/cocoa/apps_search_box_controller.h" |
| 15 #import "ui/app_list/cocoa/apps_search_results_controller.h" | 15 #import "ui/app_list/cocoa/apps_search_results_controller.h" |
| 16 | 16 |
| 17 namespace app_list { | 17 namespace app_list { |
| 18 class AppListViewDelegate; | 18 class AppListViewDelegate; |
| 19 class AppListModel; | 19 class AppListModel; |
| 20 class AppListModelObserverBridge; | 20 class AppListModelObserverBridge; |
| 21 } | 21 } |
| 22 | 22 |
| 23 @class AppListPagerView; | 23 @class AppListPagerView; |
| 24 @class AppsGridController; | 24 @class AppsGridController; |
| 25 @class SigninViewController; | |
| 26 | 25 |
| 27 // Controller for the top-level view of the app list UI. It creates and hosts an | 26 // Controller for the top-level view of the app list UI. It creates and hosts an |
| 28 // AppsGridController (displaying an AppListModel), pager control to navigate | 27 // AppsGridController (displaying an AppListModel), pager control to navigate |
| 29 // between pages in the grid, and search entry box with a pop up menu. | 28 // between pages in the grid, and search entry box with a pop up menu. |
| 30 APP_LIST_EXPORT | 29 APP_LIST_EXPORT |
| 31 @interface AppListViewController : NSViewController<AppsPaginationModelObserver, | 30 @interface AppListViewController : NSViewController<AppsPaginationModelObserver, |
| 32 AppsSearchBoxDelegate, | 31 AppsSearchBoxDelegate, |
| 33 AppsSearchResultsDelegate> { | 32 AppsSearchResultsDelegate> { |
| 34 @private | 33 @private |
| 35 base::scoped_nsobject<AppsGridController> appsGridController_; | 34 base::scoped_nsobject<AppsGridController> appsGridController_; |
| 36 base::scoped_nsobject<AppListPagerView> pagerControl_; | 35 base::scoped_nsobject<AppListPagerView> pagerControl_; |
| 37 base::scoped_nsobject<AppsSearchBoxController> appsSearchBoxController_; | 36 base::scoped_nsobject<AppsSearchBoxController> appsSearchBoxController_; |
| 38 base::scoped_nsobject<AppsSearchResultsController> | 37 base::scoped_nsobject<AppsSearchResultsController> |
| 39 appsSearchResultsController_; | 38 appsSearchResultsController_; |
| 40 base::scoped_nsobject<SigninViewController> signinViewController_; | |
| 41 | 39 |
| 42 // Subview for drawing the background. Hidden when the signin view is visible. | 40 // Subview for drawing the background. |
| 43 base::scoped_nsobject<NSView> backgroundView_; | 41 base::scoped_nsobject<NSView> backgroundView_; |
| 44 | 42 |
| 45 // Subview of |backgroundView_| that slides out when search results are shown. | 43 // Subview of |backgroundView_| that slides out when search results are shown. |
| 46 base::scoped_nsobject<NSView> contentsView_; | 44 base::scoped_nsobject<NSView> contentsView_; |
| 47 | 45 |
| 48 // Progress indicator that is visible while the delegate is NULL. | 46 // Progress indicator that is visible while the delegate is NULL. |
| 49 base::scoped_nsobject<NSProgressIndicator> loadingIndicator_; | 47 base::scoped_nsobject<NSProgressIndicator> loadingIndicator_; |
| 50 | 48 |
| 51 scoped_ptr<app_list::AppListViewDelegate> delegate_; | 49 scoped_ptr<app_list::AppListViewDelegate> delegate_; |
| 52 scoped_ptr<app_list::AppListModelObserverBridge> | 50 scoped_ptr<app_list::AppListModelObserverBridge> |
| (...skipping 14 matching lines...) Expand all Loading... |
| 67 | 65 |
| 68 @property(nonatomic, readonly) BOOL showingSearchResults; | 66 @property(nonatomic, readonly) BOOL showingSearchResults; |
| 69 | 67 |
| 70 - (AppsGridController*)appsGridController; | 68 - (AppsGridController*)appsGridController; |
| 71 - (NSSegmentedControl*)pagerControl; | 69 - (NSSegmentedControl*)pagerControl; |
| 72 - (NSView*)backgroundView; | 70 - (NSView*)backgroundView; |
| 73 | 71 |
| 74 @end | 72 @end |
| 75 | 73 |
| 76 #endif // UI_APP_LIST_COCOA_APP_LIST_VIEW_CONTROLLER_H_ | 74 #endif // UI_APP_LIST_COCOA_APP_LIST_VIEW_CONTROLLER_H_ |
| OLD | NEW |