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

Side by Side Diff: ui/app_list/search_result.h

Issue 2949733002: Show Play Store rating and price in app list (Closed)
Patch Set: Apply fix to patch set 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | ui/app_list/search_result.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_APP_LIST_SEARCH_RESULT_H_ 5 #ifndef UI_APP_LIST_SEARCH_RESULT_H_
6 #define UI_APP_LIST_SEARCH_RESULT_H_ 6 #define UI_APP_LIST_SEARCH_RESULT_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 const Tags& title_tags() const { return title_tags_; } 107 const Tags& title_tags() const { return title_tags_; }
108 void set_title_tags(const Tags& tags) { title_tags_ = tags; } 108 void set_title_tags(const Tags& tags) { title_tags_ = tags; }
109 109
110 const base::string16& details() const { return details_; } 110 const base::string16& details() const { return details_; }
111 void set_details(const base::string16& details) { details_ = details; } 111 void set_details(const base::string16& details) { details_ = details; }
112 112
113 const Tags& details_tags() const { return details_tags_; } 113 const Tags& details_tags() const { return details_tags_; }
114 void set_details_tags(const Tags& tags) { details_tags_ = tags; } 114 void set_details_tags(const Tags& tags) { details_tags_ = tags; }
115 115
116 float rating() const { return rating_; }
117 void SetRating(float rating);
118
119 const base::string16& formatted_price() const { return formatted_price_; }
120 void SetFormattedPrice(const base::string16& formatted_price);
121
116 views::View* view() const { return view_; } 122 views::View* view() const { return view_; }
117 void set_view(views::View* view) { view_ = view; } 123 void set_view(views::View* view) { view_ = view; }
118 124
119 bool is_mouse_in_view() const { return mouse_is_in_view_; } 125 bool is_mouse_in_view() const { return mouse_is_in_view_; }
120 void SetIsMouseInView(bool mouse_is_inside); 126 void SetIsMouseInView(bool mouse_is_inside);
121 127
122 const std::string& id() const { return id_; } 128 const std::string& id() const { return id_; }
123 129
124 double relevance() const { return relevance_; } 130 double relevance() const { return relevance_; }
125 void set_relevance(double relevance) { relevance_ = relevance; } 131 void set_relevance(double relevance) { relevance_ = relevance; }
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 197
192 gfx::ImageSkia icon_; 198 gfx::ImageSkia icon_;
193 gfx::ImageSkia badge_icon_; 199 gfx::ImageSkia badge_icon_;
194 200
195 base::string16 title_; 201 base::string16 title_;
196 Tags title_tags_; 202 Tags title_tags_;
197 203
198 base::string16 details_; 204 base::string16 details_;
199 Tags details_tags_; 205 Tags details_tags_;
200 206
207 // Amount of the app's stars in play store. Not exist if set to negative.
208 float rating_ = -1.0f;
209
210 // Formatted price label of the app in play store. Not exist if set to empty.
211 base::string16 formatted_price_;
212
201 // Unowned pointer to a view containing a rendered result, or nullptr if there 213 // Unowned pointer to a view containing a rendered result, or nullptr if there
202 // is no such view for the result. 214 // is no such view for the result.
203 // The view has set_owned_by_client() property set. It's a responsibility of 215 // The view has set_owned_by_client() property set. It's a responsibility of
204 // SearchProvider to set this property and own this view. 216 // SearchProvider to set this property and own this view.
205 views::View* view_ = nullptr; 217 views::View* view_ = nullptr;
206 218
207 // If view_ isn't null, indicates whether the mouse cursor is inside view_. 219 // If view_ isn't null, indicates whether the mouse cursor is inside view_.
208 bool mouse_is_in_view_ = false; 220 bool mouse_is_in_view_ = false;
209 221
210 std::string id_; 222 std::string id_;
(...skipping 11 matching lines...) Expand all
222 int percent_downloaded_ = 0; 234 int percent_downloaded_ = 0;
223 235
224 base::ObserverList<SearchResultObserver> observers_; 236 base::ObserverList<SearchResultObserver> observers_;
225 237
226 DISALLOW_COPY_AND_ASSIGN(SearchResult); 238 DISALLOW_COPY_AND_ASSIGN(SearchResult);
227 }; 239 };
228 240
229 } // namespace app_list 241 } // namespace app_list
230 242
231 #endif // UI_APP_LIST_SEARCH_RESULT_H_ 243 #endif // UI_APP_LIST_SEARCH_RESULT_H_
OLDNEW
« no previous file with comments | « no previous file | ui/app_list/search_result.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698