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