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

Side by Side Diff: chrome/browser/ui/app_list/search_builder.h

Issue 10872099: ash: Add support for additional icons in apps search list. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CHROME_BROWSER_UI_APP_LIST_SEARCH_BUILDER_H_ 5 #ifndef CHROME_BROWSER_UI_APP_LIST_SEARCH_BUILDER_H_
6 #define CHROME_BROWSER_UI_APP_LIST_SEARCH_BUILDER_H_ 6 #define CHROME_BROWSER_UI_APP_LIST_SEARCH_BUILDER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 16 matching lines...) Expand all
27 public: 27 public:
28 SearchBuilder(Profile* profile, 28 SearchBuilder(Profile* profile,
29 app_list::SearchBoxModel* search_box, 29 app_list::SearchBoxModel* search_box,
30 app_list::AppListModel::SearchResults* results, 30 app_list::AppListModel::SearchResults* results,
31 AppListController* list_controller); 31 AppListController* list_controller);
32 virtual ~SearchBuilder(); 32 virtual ~SearchBuilder();
33 33
34 void StartSearch(); 34 void StartSearch();
35 void StopSearch(); 35 void StopSearch();
36 36
37 // Opens |result|.
37 void OpenResult(const app_list::SearchResult& result, int event_flags); 38 void OpenResult(const app_list::SearchResult& result, int event_flags);
38 39
40 // Invokes a custom action on |result|. |action_index| corresponds to the
41 // index of the selected icon in |result.action_icons()|.
42 void InvokeResultAction(const app_list::SearchResult& result,
43 int action_index,
44 int event_flags);
45
39 private: 46 private:
40 // Populates result list from AutocompleteResult. 47 // Populates result list from AutocompleteResult.
41 void PopulateFromACResult(const AutocompleteResult& result); 48 void PopulateFromACResult(const AutocompleteResult& result);
42 49
43 // AutocompleteControllerDelegate overrides: 50 // AutocompleteControllerDelegate overrides:
44 virtual void OnResultChanged(bool default_match_changed) OVERRIDE; 51 virtual void OnResultChanged(bool default_match_changed) OVERRIDE;
45 52
46 Profile* profile_; 53 Profile* profile_;
47 54
48 // Sub models of AppListModel that represent search box and result list. 55 // Sub models of AppListModel that represent search box and result list.
49 app_list::SearchBoxModel* search_box_; 56 app_list::SearchBoxModel* search_box_;
50 app_list::AppListModel::SearchResults* results_; 57 app_list::AppListModel::SearchResults* results_;
51 58
52 // The omnibox AutocompleteController that collects/sorts/dup- 59 // The omnibox AutocompleteController that collects/sorts/dup-
53 // eliminates the results as they come in. 60 // eliminates the results as they come in.
54 scoped_ptr<AutocompleteController> controller_; 61 scoped_ptr<AutocompleteController> controller_;
55 62
56 // The controller of the app list. Owned by the app list delegate. 63 // The controller of the app list. Owned by the app list delegate.
57 AppListController* list_controller_; 64 AppListController* list_controller_;
58 65
59 // ExtensionAppProvider used for apps only mode. If apps only mode becomes the 66 // ExtensionAppProvider used for apps only mode. If apps only mode becomes the
60 // only mode, remove the AutocompleteController above. Otherwise, remove this. 67 // only mode, remove the AutocompleteController above. Otherwise, remove this.
61 scoped_refptr<ExtensionAppProvider> apps_provider_; 68 scoped_refptr<ExtensionAppProvider> apps_provider_;
62 69
63 DISALLOW_COPY_AND_ASSIGN(SearchBuilder); 70 DISALLOW_COPY_AND_ASSIGN(SearchBuilder);
64 }; 71 };
65 72
66 #endif // CHROME_BROWSER_UI_APP_LIST_SEARCH_BUILDER_H_ 73 #endif // CHROME_BROWSER_UI_APP_LIST_SEARCH_BUILDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698