| Index: ui/app_list/app_list_model.cc
|
| diff --git a/ui/app_list/app_list_model.cc b/ui/app_list/app_list_model.cc
|
| index 5714137b3f23ad4c4f92b0e29ab5dd52ed75b1b3..52dd01896b2fed594e26c5b10611cf32bd5020b1 100644
|
| --- a/ui/app_list/app_list_model.cc
|
| +++ b/ui/app_list/app_list_model.cc
|
| @@ -10,7 +10,6 @@
|
| #include "ui/app_list/app_list_item.h"
|
| #include "ui/app_list/app_list_model_observer.h"
|
| #include "ui/app_list/search_box_model.h"
|
| -#include "ui/app_list/search_result.h"
|
|
|
| namespace app_list {
|
|
|
| @@ -285,6 +284,22 @@ void AppListModel::SetFoldersEnabled(bool folders_enabled) {
|
| DeleteItem(folder_ids[i]);
|
| }
|
|
|
| +std::vector<SearchResult*> AppListModel::GetSearchResultsForDisplayType(
|
| + SearchResults* results,
|
| + SearchResult::DisplayType display_type,
|
| + size_t max_results) {
|
| + std::vector<SearchResult*> matches;
|
| + for (size_t i = 0; i < results->item_count(); ++i) {
|
| + SearchResult* item = results->GetItemAt(i);
|
| + if (item->display_type() == display_type) {
|
| + matches.push_back(item);
|
| + if (matches.size() == max_results)
|
| + break;
|
| + }
|
| + }
|
| + return matches;
|
| +}
|
| +
|
| // Private methods
|
|
|
| void AppListModel::OnListItemMoved(size_t from_index,
|
|
|