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

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

Issue 2929273002: Add the Play Store app search to the launcher. (Closed)
Patch Set: Fix unittest build failure. Created 3 years, 6 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
« no previous file with comments | « ui/app_list/views/search_box_view.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/views/search_result_tile_item_view.cc
diff --git a/ui/app_list/views/search_result_tile_item_view.cc b/ui/app_list/views/search_result_tile_item_view.cc
index 70c8e26fa19d17dfab4cc8a2d943b6e054cb3e8c..61f27dc21305de74c6a503f21ece5d7e660cf6ec 100644
--- a/ui/app_list/views/search_result_tile_item_view.cc
+++ b/ui/app_list/views/search_result_tile_item_view.cc
@@ -111,6 +111,10 @@ void SearchResultTileItemView::SetSearchResult(SearchResult* item) {
if (!old_item || !item->icon().BackedBySameObjectAs(old_item->icon())) {
OnIconChanged();
}
+ if (!old_item ||
+ !item->badge_icon().BackedBySameObjectAs(old_item->badge_icon())) {
+ OnBadgeIconChanged();
+ }
}
void SearchResultTileItemView::SetRating(float rating) {
@@ -155,10 +159,12 @@ bool SearchResultTileItemView::OnKeyPressed(const ui::KeyEvent& event) {
void SearchResultTileItemView::OnIconChanged() {
SetIcon(item_->icon());
+ Layout();
}
void SearchResultTileItemView::OnBadgeIconChanged() {
SetBadgeIcon(item_->badge_icon());
+ Layout();
}
void SearchResultTileItemView::OnRatingChanged() {
« no previous file with comments | « ui/app_list/views/search_box_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698