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

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

Issue 19460003: One-click install for the OSX App Launcher Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Cleaner, more future-proof Created 6 years, 11 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
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_RESULTS_CONTROLLER_H_ 5 #ifndef UI_APP_LIST_COCOA_APPS_SEARCH_RESULTS_CONTROLLER_H_
6 #define UI_APP_LIST_COCOA_APPS_SEARCH_RESULTS_CONTROLLER_H_ 6 #define UI_APP_LIST_COCOA_APPS_SEARCH_RESULTS_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 #include "ui/app_list/app_list_model.h" 13 #include "ui/app_list/app_list_model.h"
14 #import "ui/base/cocoa/tracking_area.h" 14 #import "ui/base/cocoa/tracking_area.h"
15 15
16 namespace app_list { 16 namespace app_list {
17 class AppsSearchResultsModelBridge; 17 class AppsSearchResultsModelBridge;
18 class SearchResult; 18 class SearchResult;
19 } 19 }
20 20
21 @class AppsSearchResultsCell; 21 @class AppsSearchResultsCell;
22 22
23 // Delegate allowing AppsSearchResultsController to communicate with its owner.
23 @protocol AppsSearchResultsDelegate<NSObject> 24 @protocol AppsSearchResultsDelegate<NSObject>
24 25
26 // Retrieve the model, which includes current search results.
25 - (app_list::AppListModel*)appListModel; 27 - (app_list::AppListModel*)appListModel;
28
29 // Open |result| from the model.
26 - (void)openResult:(app_list::SearchResult*)result; 30 - (void)openResult:(app_list::SearchResult*)result;
31
32 // Perform the current search again (e.g. when uninstalling a search result).
27 - (void)redoSearch; 33 - (void)redoSearch;
28 34
35 // Called when an action button is clicked for |result|, to invoke its action.
36 - (void)invokeResultAction:(app_list::SearchResult*)result
37 atIndex:(int)actionIndex;
38
29 @end 39 @end
30 40
31 // Controller for the search results displayed when a user types in the app list 41 // Controller for the search results displayed when a user types in the app list
32 // search box. Results display in an NSTableView with a single column. Each row 42 // search box. Results display in an NSTableView with a single column. Each row
33 // has an icon on the left, and one or two lines of formatted text describing 43 // has an icon on the left, and one or two lines of formatted text describing
34 // the result. 44 // the result.
35 APP_LIST_EXPORT 45 APP_LIST_EXPORT
36 @interface AppsSearchResultsController 46 @interface AppsSearchResultsController
37 : NSViewController<NSTableViewDelegate, NSTableViewDataSource> { 47 : NSViewController<NSTableViewDelegate, NSTableViewDataSource> {
38 @private 48 @private
(...skipping 11 matching lines...) Expand all
50 60
51 - (id)initWithAppsSearchResultsFrameSize:(NSSize)size; 61 - (id)initWithAppsSearchResultsFrameSize:(NSSize)size;
52 62
53 // Returns true when handling Enter, to activate the highlighted search result, 63 // Returns true when handling Enter, to activate the highlighted search result,
54 // or up/down to navigate results. 64 // or up/down to navigate results.
55 - (BOOL)handleCommandBySelector:(SEL)command; 65 - (BOOL)handleCommandBySelector:(SEL)command;
56 66
57 @end 67 @end
58 68
59 #endif // UI_APP_LIST_COCOA_APPS_SEARCH_RESULTS_CONTROLLER_H_ 69 #endif // UI_APP_LIST_COCOA_APPS_SEARCH_RESULTS_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ui/app_list/cocoa/apps_pagination_model_observer.h ('k') | ui/app_list/cocoa/apps_search_results_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698