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

Unified Diff: ui/app_list/search_result.h

Issue 2949413002: Show separator in SearchResultTileItemListView (Closed)
Patch Set: Remove SearchResultSeparator 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 | « ui/app_list/app_list_constants.cc ('k') | ui/app_list/views/search_result_tile_item_list_view.h » ('j') | no next file with comments »
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 c88751dccd11d9981e7cc67b5841a1c54e8594bd..afa0054b0112dd6b279557ec610eb13371f19bee 100644
--- a/ui/app_list/search_result.h
+++ b/ui/app_list/search_result.h
@@ -49,6 +49,16 @@ class APP_LIST_EXPORT SearchResult {
DISPLAY_TYPE_LAST,
};
+ // Type of the search result. This should be set in corresponding subclass's
+ // constructor.
+ enum ResultType {
+ RESULT_UNKNOWN, // Unknown type.
+ RESULT_INSTALLED_APP, // Installed apps.
+ RESULT_PLAYSTORE_APP, // Uninstalled apps from playstore.
+ RESULT_INSTANT_APP, // Instant apps.
+ // Add new values here.
+ };
+
// A tagged range in search result text.
struct APP_LIST_EXPORT Tag {
// Similar to ACMatchClassification::Style, the style values are not
@@ -135,6 +145,9 @@ class APP_LIST_EXPORT SearchResult {
display_type_ = display_type;
}
+ ResultType result_type() const { return result_type_; }
+ void set_result_type(ResultType result_type) { result_type_ = result_type; }
+
int distance_from_origin() { return distance_from_origin_; }
void set_distance_from_origin(int distance) {
distance_from_origin_ = distance;
@@ -223,6 +236,8 @@ class APP_LIST_EXPORT SearchResult {
double relevance_ = 0;
DisplayType display_type_ = DISPLAY_LIST;
+ ResultType result_type_ = RESULT_UNKNOWN;
+
// The Manhattan distance from the origin of all search results to this
// result. This is logged for UMA.
int distance_from_origin_ = -1;
« no previous file with comments | « ui/app_list/app_list_constants.cc ('k') | ui/app_list/views/search_result_tile_item_list_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698