Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 double price() const { return price_; } | |
| 117 const base::string16& GetPriceString() const; | |
| 118 void SetPrice(double price); | |
|
xiyuan
2017/06/20 22:19:22
Is there a way to clear price and rating info? Tha
weidongg
2017/06/22 00:59:16
Yes, Done.
| |
| 119 | |
| 120 double rating() const { return rating_; } | |
| 121 const base::string16& GetRatingString() const; | |
| 122 void SetRating(double rating); | |
| 123 | |
| 116 views::View* view() const { return view_; } | 124 views::View* view() const { return view_; } |
| 117 void set_view(views::View* view) { view_ = view; } | 125 void set_view(views::View* view) { view_ = view; } |
| 118 | 126 |
| 119 bool is_mouse_in_view() const { return mouse_is_in_view_; } | 127 bool is_mouse_in_view() const { return mouse_is_in_view_; } |
| 120 void SetIsMouseInView(bool mouse_is_inside); | 128 void SetIsMouseInView(bool mouse_is_inside); |
| 121 | 129 |
| 122 const std::string& id() const { return id_; } | 130 const std::string& id() const { return id_; } |
| 123 | 131 |
| 124 double relevance() const { return relevance_; } | 132 double relevance() const { return relevance_; } |
| 125 void set_relevance(double relevance) { relevance_ = relevance; } | 133 void set_relevance(double relevance) { relevance_ = relevance; } |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 191 | 199 |
| 192 gfx::ImageSkia icon_; | 200 gfx::ImageSkia icon_; |
| 193 gfx::ImageSkia badge_icon_; | 201 gfx::ImageSkia badge_icon_; |
| 194 | 202 |
| 195 base::string16 title_; | 203 base::string16 title_; |
| 196 Tags title_tags_; | 204 Tags title_tags_; |
| 197 | 205 |
| 198 base::string16 details_; | 206 base::string16 details_; |
| 199 Tags details_tags_; | 207 Tags details_tags_; |
| 200 | 208 |
| 209 double rating_; // amount of the app's stars in play store. | |
| 210 base::string16 rating_string_; | |
| 211 double price_; // price of the app in play store. | |
| 212 base::string16 price_string_; | |
| 213 | |
| 201 // Unowned pointer to a view containing a rendered result, or nullptr if there | 214 // Unowned pointer to a view containing a rendered result, or nullptr if there |
| 202 // is no such view for the result. | 215 // is no such view for the result. |
| 203 // The view has set_owned_by_client() property set. It's a responsibility of | 216 // The view has set_owned_by_client() property set. It's a responsibility of |
| 204 // SearchProvider to set this property and own this view. | 217 // SearchProvider to set this property and own this view. |
| 205 views::View* view_ = nullptr; | 218 views::View* view_ = nullptr; |
| 206 | 219 |
| 207 // If view_ isn't null, indicates whether the mouse cursor is inside view_. | 220 // If view_ isn't null, indicates whether the mouse cursor is inside view_. |
| 208 bool mouse_is_in_view_ = false; | 221 bool mouse_is_in_view_ = false; |
| 209 | 222 |
| 210 std::string id_; | 223 std::string id_; |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 222 int percent_downloaded_ = 0; | 235 int percent_downloaded_ = 0; |
| 223 | 236 |
| 224 base::ObserverList<SearchResultObserver> observers_; | 237 base::ObserverList<SearchResultObserver> observers_; |
| 225 | 238 |
| 226 DISALLOW_COPY_AND_ASSIGN(SearchResult); | 239 DISALLOW_COPY_AND_ASSIGN(SearchResult); |
| 227 }; | 240 }; |
| 228 | 241 |
| 229 } // namespace app_list | 242 } // namespace app_list |
| 230 | 243 |
| 231 #endif // UI_APP_LIST_SEARCH_RESULT_H_ | 244 #endif // UI_APP_LIST_SEARCH_RESULT_H_ |
| OLD | NEW |