app_list_view_controller.h revision 90dce4d38c5ff5333bea97d859d4e484e27edf0c
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 3// found in the LICENSE file. 4 5#ifndef UI_APP_LIST_COCOA_APP_LIST_VIEW_CONTROLLER_H_ 6#define UI_APP_LIST_COCOA_APP_LIST_VIEW_CONTROLLER_H_ 7 8#import <Cocoa/Cocoa.h> 9 10#include "base/memory/scoped_nsobject.h" 11#include "base/memory/scoped_ptr.h" 12#include "ui/app_list/app_list_export.h" 13#import "ui/app_list/cocoa/apps_pagination_model_observer.h" 14 15namespace app_list { 16class AppListViewDelegate; 17} 18 19@class AppsGridController; 20@class AppListPagerView; 21 22// Controller for the top-level view of the app list UI. It creates and hosts an 23// AppsGridController (displaying an AppListModel), and pager control for 24// navigating between pages in the grid. 25APP_LIST_EXPORT 26@interface AppListViewController : 27 NSViewController<AppsPaginationModelObserver, NSTextFieldDelegate> { 28 @private 29 scoped_nsobject<AppsGridController> appsGridController_; 30 scoped_nsobject<AppListPagerView> pagerControl_; 31 scoped_ptr<app_list::AppListViewDelegate> delegate_; 32} 33 34- (AppsGridController*)appsGridController; 35 36- (NSSegmentedControl*)pagerControl; 37 38- (app_list::AppListViewDelegate*)delegate; 39 40- (void)setDelegate:(scoped_ptr<app_list::AppListViewDelegate>)newDelegate; 41 42@end 43 44#endif // UI_APP_LIST_COCOA_APP_LIST_VIEW_CONTROLLER_H_ 45