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

Unified Diff: ui/app_list/search_result.h

Issue 439703002: Allow app list tiles to show search results in the experimental app list. (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
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..d3b0a0e8b6db0adbcef5fe8491556255760c5ab4 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_; }
+ const 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_;

Powered by Google App Engine
This is Rietveld 408576698