Index: ui/app_list/views/search_result_tile_item_view.h |
diff --git a/ui/app_list/views/search_result_tile_item_view.h b/ui/app_list/views/search_result_tile_item_view.h |
index 3f5ff19fe4083c32a2f2186e685041435dc2b60c..6d0525a8bb330f7039541e4dde4d3fba7510d456 100644 |
--- a/ui/app_list/views/search_result_tile_item_view.h |
+++ b/ui/app_list/views/search_result_tile_item_view.h |
@@ -40,6 +40,8 @@ class APP_LIST_EXPORT SearchResultTileItemView |
// Overridden from SearchResultObserver: |
void OnIconChanged() override; |
void OnBadgeIconChanged() override; |
+ void OnRatingChanged() override; |
+ void OnPriceChanged() override; |
void OnResultDestroying() override; |
// views::ContextMenuController overrides: |
@@ -48,6 +50,13 @@ class APP_LIST_EXPORT SearchResultTileItemView |
ui::MenuSourceType source_type) override; |
private: |
+ // Shows rating in proper format if |rating| is not negative. Otherwise, hides |
+ // the rating label. |
+ void SetRating(float rating); |
+ |
+ // Shows price if |price| is not empty. Otherwise, hides the price label. |
+ void SetPrice(const base::string16& price); |
+ |
// Overridden from views::View: |
void Layout() override; |
gfx::Size CalculatePreferredSize() const override; |
@@ -57,6 +66,9 @@ class APP_LIST_EXPORT SearchResultTileItemView |
// Owned by the model provided by the AppListViewDelegate. |
SearchResult* item_; |
+ views::Label* rating_; // Owned by views hierarchy. |
+ views::Label* price_; // Owned by views hierarchy. |
xiyuan
2017/06/22 17:07:34
nit: forward declare views::Label.
Slightly prefe
weidongg
2017/06/22 17:58:30
Done.
|
+ |
AppListViewDelegate* view_delegate_; |
const bool is_fullscreen_app_list_enabled_; |