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/memory/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 } | 20 } |
21 | 21 |
22 @class AppListPagerView; | 22 @class AppListPagerView; |
23 @class AppsGridController; | 23 @class AppsGridController; |
24 | 24 |
25 // Controller for the top-level view of the app list UI. It creates and hosts an | 25 // Controller for the top-level view of the app list UI. It creates and hosts an |
26 // AppsGridController (displaying an AppListModel), pager control to navigate | 26 // AppsGridController (displaying an AppListModel), pager control to navigate |
27 // between pages in the grid, and search entry box with a pop up menu. | 27 // between pages in the grid, and search entry box with a pop up menu. |
28 APP_LIST_EXPORT | 28 APP_LIST_EXPORT |
29 @interface AppListViewController : NSViewController<AppsPaginationModelObserver, | 29 @interface AppListViewController : NSViewController<AppsPaginationModelObserver, |
30 AppsSearchBoxDelegate, | 30 AppsSearchBoxDelegate, |
31 AppsSearchResultsDelegate> { | 31 AppsSearchResultsDelegate> { |
32 @private | 32 @private |
33 scoped_nsobject<AppsGridController> appsGridController_; | 33 base::scoped_nsobject<AppsGridController> appsGridController_; |
34 scoped_nsobject<AppListPagerView> pagerControl_; | 34 base::scoped_nsobject<AppListPagerView> pagerControl_; |
35 scoped_nsobject<AppsSearchBoxController> appsSearchBoxController_; | 35 base::scoped_nsobject<AppsSearchBoxController> appsSearchBoxController_; |
36 scoped_nsobject<AppsSearchResultsController> appsSearchResultsController_; | 36 base::scoped_nsobject<AppsSearchResultsController> |
37 scoped_nsobject<NSView> contentsView_; | 37 appsSearchResultsController_; |
| 38 base::scoped_nsobject<NSView> contentsView_; |
38 scoped_ptr<app_list::AppListViewDelegate> delegate_; | 39 scoped_ptr<app_list::AppListViewDelegate> delegate_; |
39 BOOL showingSearchResults_; | 40 BOOL showingSearchResults_; |
40 } | 41 } |
41 | 42 |
42 - (AppsGridController*)appsGridController; | 43 - (AppsGridController*)appsGridController; |
43 | 44 |
44 - (NSSegmentedControl*)pagerControl; | 45 - (NSSegmentedControl*)pagerControl; |
45 | 46 |
46 - (app_list::AppListViewDelegate*)delegate; | 47 - (app_list::AppListViewDelegate*)delegate; |
47 | 48 |
48 - (void)setDelegate:(scoped_ptr<app_list::AppListViewDelegate>)newDelegate; | 49 - (void)setDelegate:(scoped_ptr<app_list::AppListViewDelegate>)newDelegate; |
49 | 50 |
50 @end | 51 @end |
51 | 52 |
52 @interface AppListViewController (TestingAPI) | 53 @interface AppListViewController (TestingAPI) |
53 | 54 |
54 - (void)setDelegate:(scoped_ptr<app_list::AppListViewDelegate>)newDelegate | 55 - (void)setDelegate:(scoped_ptr<app_list::AppListViewDelegate>)newDelegate |
55 withTestModel:(scoped_ptr<app_list::AppListModel>)newModel; | 56 withTestModel:(scoped_ptr<app_list::AppListModel>)newModel; |
56 | 57 |
57 @end | 58 @end |
58 | 59 |
59 #endif // UI_APP_LIST_COCOA_APP_LIST_VIEW_CONTROLLER_H_ | 60 #endif // UI_APP_LIST_COCOA_APP_LIST_VIEW_CONTROLLER_H_ |
OLD | NEW |