Chromium Code Reviews| Index: athena/home/app_list_view_delegate.cc |
| diff --git a/athena/home/app_list_view_delegate.cc b/athena/home/app_list_view_delegate.cc |
| index 99b1041cf1057e1cc99dfeef467e80a5cfc67176..29ecb0574e4bc6d95041d912c240d46a7bc65050 100644 |
| --- a/athena/home/app_list_view_delegate.cc |
| +++ b/athena/home/app_list_view_delegate.cc |
| @@ -53,14 +53,10 @@ void AppListViewDelegate::RegisterSearchProvider( |
| void AppListViewDelegate::SearchResultChanged() { |
| // TODO(mukai): port app-list's Mixer to reorder the results properly. |
| app_list::SearchProvider* search_provider = search_providers_[0]; |
| - std::vector<app_list::SearchResult*> results; |
| - search_provider->ReleaseResult(&results); |
| - if (results.empty()) { |
| - model_->results()->DeleteAll(); |
| - } else { |
| - for (size_t i = 0; i < results.size(); ++i) |
| - model_->results()->Add(results[i]); |
| - } |
| + const app_list::SearchProvider::Results& results = search_provider->results(); |
| + model_->results()->DeleteAll(); |
|
tapted
2014/10/02 07:19:21
Does this cause flickering of the search results i
Jun Mukai
2014/10/03 01:24:23
Right, this actually causes flickering unfortunate
|
| + for (size_t i = 0; i < results.size(); ++i) |
| + model_->results()->Add(results[i]->Duplicate().release()); |
|
tapted
2014/10/02 07:19:21
(no action required) would be nice if this .releas
Jun Mukai
2014/10/03 01:24:23
Agreed. I think ideally ListModel should support i
|
| } |
| bool AppListViewDelegate::ForceNativeDesktop() const { |