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

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

Issue 2949733002: Show Play Store rating and price in app list (Closed)
Patch Set: 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
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 eb24b845b1afe6d2a6d93e2710fa74f29210a330..a48b76b64b7f25ef591f89f0d8d8edf2579fe263 100644
--- a/ui/app_list/views/search_result_tile_item_view.cc
+++ b/ui/app_list/views/search_result_tile_item_view.cc
@@ -49,6 +49,12 @@ void SearchResultTileItemView::SetSearchResult(SearchResult* item) {
SetTitle(item_->title());
+ // Todo(weidongg) add condition: instant or play store app.
xiyuan 2017/06/20 22:19:22 nit: TODO style is wrong. // TODO(weidongg): Only
weidongg 2017/06/22 00:59:16 Done.
+
xiyuan 2017/06/20 22:19:22 nit: strip extra empty lines here and Line 55.
weidongg 2017/06/22 00:59:16 Done.
+ SetPrice(item_->GetPriceString());
+
+ SetRating(item_->GetRatingString());
+
// Only refresh the icon if it's different from the old one. This prevents
// flickering.
if (old_item == NULL ||
@@ -79,6 +85,14 @@ void SearchResultTileItemView::OnBadgeIconChanged() {
SetBadgeIcon(item_->badge_icon());
}
+void SearchResultTileItemView::OnPriceChanged() {
+ SetPrice(item_->GetPriceString());
+}
+
+void SearchResultTileItemView::OnRatingChanged() {
+ SetRating(item_->GetRatingString());
+}
+
void SearchResultTileItemView::OnResultDestroying() {
// The menu comes from |item_|. If we're showing a menu we need to cancel it.
context_menu_runner_.reset();

Powered by Google App Engine
This is Rietveld 408576698