Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(275)

Side by Side Diff: ui/app_list/cocoa/app_list_view_controller.h

Issue 22268009: Move signin status and current user information into AppListModel. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/app_list/app_list_view_delegate.h ('k') | ui/app_list/cocoa/app_list_view_controller.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 SigninDelegateObserverBridge; 20 class AppListModelObserverBridge;
21 } 21 }
22 22
23 @class AppListPagerView; 23 @class AppListPagerView;
24 @class AppsGridController; 24 @class AppsGridController;
25 @class SigninViewController; 25 @class SigninViewController;
26 26
27 // Controller for the top-level view of the app list UI. It creates and hosts an 27 // 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 28 // AppsGridController (displaying an AppListModel), pager control to navigate
29 // between pages in the grid, and search entry box with a pop up menu. 29 // between pages in the grid, and search entry box with a pop up menu.
30 APP_LIST_EXPORT 30 APP_LIST_EXPORT
31 @interface AppListViewController : NSViewController<AppsPaginationModelObserver, 31 @interface AppListViewController : NSViewController<AppsPaginationModelObserver,
32 AppsSearchBoxDelegate, 32 AppsSearchBoxDelegate,
33 AppsSearchResultsDelegate> { 33 AppsSearchResultsDelegate> {
34 @private 34 @private
35 base::scoped_nsobject<AppsGridController> appsGridController_; 35 base::scoped_nsobject<AppsGridController> appsGridController_;
36 base::scoped_nsobject<AppListPagerView> pagerControl_; 36 base::scoped_nsobject<AppListPagerView> pagerControl_;
37 base::scoped_nsobject<AppsSearchBoxController> appsSearchBoxController_; 37 base::scoped_nsobject<AppsSearchBoxController> appsSearchBoxController_;
38 base::scoped_nsobject<AppsSearchResultsController> 38 base::scoped_nsobject<AppsSearchResultsController>
39 appsSearchResultsController_; 39 appsSearchResultsController_;
40 base::scoped_nsobject<SigninViewController> signinViewController_; 40 base::scoped_nsobject<SigninViewController> signinViewController_;
41 41
42 // Subview for drawing the background. Hidden when the signin view is visible. 42 // Subview for drawing the background. Hidden when the signin view is visible.
43 base::scoped_nsobject<NSView> backgroundView_; 43 base::scoped_nsobject<NSView> backgroundView_;
44 44
45 // Subview of |backgroundView_| that slides out when search results are shown. 45 // Subview of |backgroundView_| that slides out when search results are shown.
46 base::scoped_nsobject<NSView> contentsView_; 46 base::scoped_nsobject<NSView> contentsView_;
47 47
48 scoped_ptr<app_list::AppListViewDelegate> delegate_; 48 scoped_ptr<app_list::AppListViewDelegate> delegate_;
49 scoped_ptr<app_list::SigninDelegateObserverBridge> signin_observer_bridge_; 49 scoped_ptr<app_list::AppListModelObserverBridge>
50 app_list_model_observer_bridge_;
50 BOOL showingSearchResults_; 51 BOOL showingSearchResults_;
51 } 52 }
52 53
53 - (app_list::AppListViewDelegate*)delegate; 54 - (app_list::AppListViewDelegate*)delegate;
54 - (void)setDelegate:(scoped_ptr<app_list::AppListViewDelegate>)newDelegate; 55 - (void)setDelegate:(scoped_ptr<app_list::AppListViewDelegate>)newDelegate;
55 - (void)onSigninStatusChanged; 56 - (void)onSigninStatusChanged;
56 57
57 @end 58 @end
58 59
59 @interface AppListViewController (TestingAPI) 60 @interface AppListViewController (TestingAPI)
60 61
61 - (AppsGridController*)appsGridController; 62 - (AppsGridController*)appsGridController;
62 - (NSSegmentedControl*)pagerControl; 63 - (NSSegmentedControl*)pagerControl;
63 - (NSView*)backgroundView; 64 - (NSView*)backgroundView;
64 65
65 - (void)setDelegate:(scoped_ptr<app_list::AppListViewDelegate>)newDelegate 66 - (void)setDelegate:(scoped_ptr<app_list::AppListViewDelegate>)newDelegate
66 withTestModel:(scoped_ptr<app_list::AppListModel>)newModel; 67 withTestModel:(scoped_ptr<app_list::AppListModel>)newModel;
67 68
68 @end 69 @end
69 70
70 #endif // UI_APP_LIST_COCOA_APP_LIST_VIEW_CONTROLLER_H_ 71 #endif // UI_APP_LIST_COCOA_APP_LIST_VIEW_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ui/app_list/app_list_view_delegate.h ('k') | ui/app_list/cocoa/app_list_view_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698