platformKeys: Add per-extension sign permissions.
[chromium-blink-merge.git] / ui / app_list / cocoa / apps_search_box_controller.h
blobb8a86e57f7b9dc022c5cc11c0718db028d8b3198
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.
5 #ifndef UI_APP_LIST_COCOA_APPS_SEARCH_BOX_CONTROLLER_H_
6 #define UI_APP_LIST_COCOA_APPS_SEARCH_BOX_CONTROLLER_H_
8 #import <Cocoa/Cocoa.h>
10 #include "base/mac/scoped_nsobject.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "ui/app_list/app_list_export.h"
14 namespace app_list {
15 class AppListMenu;
16 class AppListModel;
17 class AppListViewDelegate;
18 class SearchBoxModel;
19 class SearchBoxModelObserverBridge;
22 @class AppListMenuController;
23 @class HoverImageMenuButton;
24 @class SearchTextField;
26 @protocol AppsSearchBoxDelegate<NSTextFieldDelegate>
28 - (app_list::AppListViewDelegate*)appListDelegate;
29 - (app_list::SearchBoxModel*)searchBoxModel;
30 - (app_list::AppListModel*)appListModel;
31 - (void)modelTextDidChange;
33 @end
35 // Controller for the search box in the topmost portion of the app list.
36 APP_LIST_EXPORT
37 @interface AppsSearchBoxController : NSViewController<NSTextFieldDelegate> {
38 @private
39 base::scoped_nsobject<SearchTextField> searchTextField_;
40 base::scoped_nsobject<NSImageView> searchImageView_;
41 base::scoped_nsobject<HoverImageMenuButton> menuButton_;
42 base::scoped_nsobject<AppListMenuController> menuController_;
43 scoped_ptr<app_list::SearchBoxModelObserverBridge> bridge_;
44 scoped_ptr<app_list::AppListMenu> appListMenu_;
46 id<AppsSearchBoxDelegate> delegate_; // Weak. Owns us.
49 @property(assign, nonatomic) id<AppsSearchBoxDelegate> delegate;
51 - (id)initWithFrame:(NSRect)frame;
52 - (void)clearSearch;
54 // Rebuild the menu due to changes from the AppListViewDelegate.
55 - (void)rebuildMenu;
57 @end
59 @interface AppsSearchBoxController (TestingAPI)
61 - (NSTextField*)searchTextField;
62 - (NSPopUpButton*)menuControl;
63 - (app_list::AppListMenu*)appListMenu;
65 @end
67 #endif // UI_APP_LIST_COCOA_APPS_SEARCH_BOX_CONTROLLER_H_