Index: ui/app_list/app_list_model.h |
diff --git a/ui/app_list/app_list_model.h b/ui/app_list/app_list_model.h |
index 9caa323bcd2dc1cd1bd664975edf16f85d389f12..d216296f57a82fa6b5c6ba5b6060d0222a2f8037 100644 |
--- a/ui/app_list/app_list_model.h |
+++ b/ui/app_list/app_list_model.h |
@@ -6,6 +6,7 @@ |
#define UI_APP_LIST_APP_LIST_MODEL_H_ |
#include <string> |
+#include <vector> |
#include "base/basictypes.h" |
#include "base/memory/scoped_ptr.h" |
@@ -13,6 +14,7 @@ |
#include "ui/app_list/app_list_export.h" |
#include "ui/app_list/app_list_item_list.h" |
#include "ui/app_list/app_list_item_list_observer.h" |
+#include "ui/app_list/search_result.h" |
#include "ui/base/models/list_model.h" |
namespace app_list { |
@@ -22,7 +24,6 @@ class AppListItem; |
class AppListItemList; |
class AppListModelObserver; |
class SearchBoxModel; |
-class SearchResult; |
// Master model of app list that consists of three sub models: AppListItemList, |
// SearchBoxModel and SearchResults. The AppListItemList sub model owns a list |
@@ -116,6 +117,13 @@ class APP_LIST_EXPORT AppListModel : public AppListItemListObserver { |
// false, removes any non-OEM folders. |
void SetFoldersEnabled(bool folders_enabled); |
+ // Filters the given |results| by |display_type|. The returned list is |
+ // truncated to |max_results|. |
+ static std::vector<SearchResult*> GetSearchResultsForDisplayType( |
Matt Giuca
2014/08/06 08:54:53
Rename to FilterSearchResultsByDisplayType. ("Get"
calamity
2014/08/12 05:03:36
Done.
|
+ SearchResults* results, |
+ SearchResult::DisplayType display_type, |
+ size_t max_results); |
+ |
AppListItemList* top_level_item_list() { return top_level_item_list_.get(); } |
SearchBoxModel* search_box() { return search_box_.get(); } |