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

Unified Diff: ui/app_list/search_result.h

Issue 455323003: Add DisplayType to app list SearchResults (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | « chrome/browser/ui/app_list/search/app_result.cc ('k') | ui/app_list/search_result.cc » ('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 d533b7937fa60e176fa5c9e6672b15c93f53e9a4..f210248d4e03a236306ab16b3ac230b0bff10004 100644
--- a/ui/app_list/search_result.h
+++ b/ui/app_list/search_result.h
@@ -27,6 +27,12 @@ class SearchResultObserver;
// default style.
class APP_LIST_EXPORT SearchResult {
public:
+ // How the result should be displayed.
+ enum DisplayType {
+ DISPLAY_LIST,
+ DISPLAY_TILE,
+ };
+
// A tagged range in search result text.
struct APP_LIST_EXPORT Tag {
// Similar to ACMatchClassification::Style, the style values are not
@@ -90,6 +96,7 @@ class APP_LIST_EXPORT SearchResult {
const std::string& id() const { return id_; }
double relevance() const { return relevance_; }
+ DisplayType display_type() const { return display_type_; }
const Actions& actions() const {
return actions_;
@@ -122,6 +129,9 @@ class APP_LIST_EXPORT SearchResult {
protected:
void set_id(const std::string& id) { id_ = id; }
void set_relevance(double relevance) { relevance_ = relevance; }
+ void set_display_type(DisplayType display_type) {
+ display_type_ = display_type;
+ }
private:
gfx::ImageSkia icon_;
@@ -134,6 +144,7 @@ class APP_LIST_EXPORT SearchResult {
std::string id_;
double relevance_;
+ DisplayType display_type_;
Actions actions_;
« no previous file with comments | « chrome/browser/ui/app_list/search/app_result.cc ('k') | ui/app_list/search_result.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698