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

Unified Diff: ui/app_list/search_result.h

Issue 2949733002: Show Play Store rating and price in app list (Closed)
Patch Set: Rebase 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 | « no previous file | ui/app_list/search_result.cc » ('j') | ui/app_list/views/search_result_tile_item_view.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/search_result.h
diff --git a/ui/app_list/search_result.h b/ui/app_list/search_result.h
index 1eb49a78ad02f14a2436c3bd0bf5da244caaed8f..91aefcd70f831d652b615c9a72c33bfe349be8b5 100644
--- a/ui/app_list/search_result.h
+++ b/ui/app_list/search_result.h
@@ -113,6 +113,12 @@ class APP_LIST_EXPORT SearchResult {
const Tags& details_tags() const { return details_tags_; }
void set_details_tags(const Tags& tags) { details_tags_ = tags; }
+ float rating() const { return rating_; }
+ void SetRating(float rating);
+
+ const base::string16& price() const { return price_; }
+ void SetPrice(const base::string16& price);
+
views::View* view() const { return view_; }
void set_view(views::View* view) { view_ = view; }
@@ -198,6 +204,12 @@ class APP_LIST_EXPORT SearchResult {
base::string16 details_;
Tags details_tags_;
+ // Amount of the app's stars in play store. Not exist if set to negative.
+ float rating_ = -1.0;
xiyuan 2017/06/22 17:07:34 nit: -1.0f, to make it clear to compiler this is a
weidongg 2017/06/22 17:58:29 Good to know, thanks. Done.
+
+ // Price of the app in play store. Not exist if set to empty.
xiyuan 2017/06/22 17:07:34 nit: Price -> Price label, to make it clear that i
weidongg 2017/06/22 17:58:29 Yes, if we are to change the name, formatted_price
xiyuan 2017/06/22 18:17:21 formatted_price_ sounds good.
+ base::string16 price_;
+
// Unowned pointer to a view containing a rendered result, or nullptr if there
// is no such view for the result.
// The view has set_owned_by_client() property set. It's a responsibility of
« no previous file with comments | « no previous file | ui/app_list/search_result.cc » ('j') | ui/app_list/views/search_result_tile_item_view.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698