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

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

Issue 15955003: Menu for the OSX app launcher. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Refactor HoverImageMenuButton into /ui/base/cocoa/controls Created 7 years, 6 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 | Annotate | Revision Log
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_APPS_SEARCH_BOX_CONTROLLER_H_ 5 #ifndef UI_APP_LIST_COCOA_APPS_SEARCH_BOX_CONTROLLER_H_
6 #define UI_APP_LIST_COCOA_APPS_SEARCH_BOX_CONTROLLER_H_ 6 #define UI_APP_LIST_COCOA_APPS_SEARCH_BOX_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 12
13 namespace app_list { 13 namespace app_list {
14 class AppListMenu;
15 class AppListViewDelegate;
14 class SearchBoxModel; 16 class SearchBoxModel;
15 class SearchBoxModelObserverBridge; 17 class SearchBoxModelObserverBridge;
16 } 18 }
17 19
18 @protocol AppsSearchBoxDelegate<NSTextFieldDelegate> 20 @protocol AppsSearchBoxDelegate<NSTextFieldDelegate>
19 21
22 - (app_list::AppListViewDelegate*)appListDelegate;
20 - (app_list::SearchBoxModel*)searchBoxModel; 23 - (app_list::SearchBoxModel*)searchBoxModel;
21 - (void)modelTextDidChange; 24 - (void)modelTextDidChange;
22 25
23 @end 26 @end
24 27
25 // Controller for the search box in the topmost portion of the app list. 28 // Controller for the search box in the topmost portion of the app list.
26 @interface AppsSearchBoxController : NSViewController<NSTextFieldDelegate> { 29 @interface AppsSearchBoxController : NSViewController<NSMenuDelegate,
30 NSTextFieldDelegate> {
27 @private 31 @private
28 scoped_nsobject<NSTextField> searchInput_; 32 scoped_nsobject<NSTextField> searchInput_;
29 scoped_nsobject<NSImageView> searchImage_; 33 scoped_nsobject<NSImageView> searchImage_;
34 scoped_nsobject<NSPopUpButton> menuButton_;
30 scoped_ptr<app_list::SearchBoxModelObserverBridge> bridge_; 35 scoped_ptr<app_list::SearchBoxModelObserverBridge> bridge_;
36 scoped_ptr<app_list::AppListMenu> appListMenu_;
31 37
32 id<AppsSearchBoxDelegate> delegate_; // Weak. Owns us. 38 id<AppsSearchBoxDelegate> delegate_; // Weak. Owns us.
33 } 39 }
34 40
35 @property(assign, nonatomic) id<AppsSearchBoxDelegate> delegate; 41 @property(assign, nonatomic) id<AppsSearchBoxDelegate> delegate;
36 42
37 - (id)initWithFrame:(NSRect)frame; 43 - (id)initWithFrame:(NSRect)frame;
38 - (void)clearSearch; 44 - (void)clearSearch;
39 45
40 @end 46 @end
41 47
42 @interface AppsSearchBoxController (TestingAPI) 48 @interface AppsSearchBoxController (TestingAPI)
43 49
44 - (NSTextField*)textField; 50 - (NSTextField*)textField;
51 - (NSPopUpButton*)menuControl;
52 - (app_list::AppListMenu*)appListMenu;
45 53
46 @end 54 @end
47 55
48 #endif // UI_APP_LIST_COCOA_APPS_SEARCH_BOX_CONTROLLER_H_ 56 #endif // UI_APP_LIST_COCOA_APPS_SEARCH_BOX_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698