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

Unified Diff: ui/app_list/views/search_result_page_view.cc

Issue 1132943004: Add Apps.AppListSearchResultDistanceFromOrigin UMA stat. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@add_query_length_stat
Patch Set: Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: ui/app_list/views/search_result_page_view.cc
diff --git a/ui/app_list/views/search_result_page_view.cc b/ui/app_list/views/search_result_page_view.cc
index 3a1e935dd0c0415c8a597d8f22f361f848e0ce80..46fcfb2c498a5814fce1651e34556614701e5dca 100644
--- a/ui/app_list/views/search_result_page_view.cc
+++ b/ui/app_list/views/search_result_page_view.cc
@@ -157,9 +157,18 @@ void SearchResultPageView::ChildPreferredSizeChanged(views::View* child) {
return a->container_score() > b->container_score();
});
+ int result_y_index = 0;
for (size_t i = 0; i < result_container_views_.size(); ++i) {
- result_container_views_[i]->ClearSelectedIndex();
- ReorderChildView(result_container_views_[i]->parent(), i);
+ SearchResultContainerView* view = result_container_views_[i];
+ view->ClearSelectedIndex();
+ ReorderChildView(view->parent(), i);
+
+ // Only notify containers that have finished updating.
+ if (view->UpdateScheduled())
Matt Giuca 2015/05/11 06:50:41 Shouldn't you still take into account the GetYSize
calamity 2015/05/11 07:15:03 Yeah.. I thought about this too. Ideally we'd clea
+ continue;
+
+ view->NotifyFirstResultYIndex(result_y_index);
+ result_y_index += view->GetYSize();
}
}

Powered by Google App Engine
This is Rietveld 408576698