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

Unified Diff: ui/app_list/search_result.h

Issue 10872099: ash: Add support for additional icons in apps search list. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix compile Created 8 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 | « ui/app_list/app_list_view_delegate.h ('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 f96d8d487afe4925bb980421bb5bcde5c799b0aa..c7b2760abcdf99c92371add02c5fa90b6c64603b 100644
--- a/ui/app_list/search_result.h
+++ b/ui/app_list/search_result.h
@@ -45,12 +45,26 @@ class APP_LIST_EXPORT SearchResult {
};
typedef std::vector<Tag> Tags;
+ // A collection of images representing an action that can be performed on this
+ // search result.
+ struct ActionIconSet {
+ ActionIconSet(const gfx::ImageSkia& base_image,
+ const gfx::ImageSkia& hover_image,
+ const gfx::ImageSkia& pressed_image,
+ const string16& tooltip_text);
+ ~ActionIconSet();
+
+ gfx::ImageSkia base_image;
+ gfx::ImageSkia hover_image;
+ gfx::ImageSkia pressed_image;
+
+ string16 tooltip_text;
+ };
+ typedef std::vector<ActionIconSet> ActionIconSets;
+
SearchResult();
virtual ~SearchResult();
- void AddObserver(SearchResultObserver* observer);
- void RemoveObserver(SearchResultObserver* observer);
-
const gfx::ImageSkia& icon() const { return icon_; }
void SetIcon(const gfx::ImageSkia& icon);
@@ -66,6 +80,14 @@ class APP_LIST_EXPORT SearchResult {
const Tags& details_tags() const { return details_tags_; }
void set_details_tags(const Tags& tags) { details_tags_ = tags; }
+ const ActionIconSets& action_icons() const {
+ return action_icons_;
+ }
+ void SetActionIcons(const ActionIconSets& sets);
+
+ void AddObserver(SearchResultObserver* observer);
+ void RemoveObserver(SearchResultObserver* observer);
+
private:
gfx::ImageSkia icon_;
@@ -75,6 +97,10 @@ class APP_LIST_EXPORT SearchResult {
string16 details_;
Tags details_tags_;
+ // Optional list of icons representing additional actions that can be
+ // performed on this result.
+ ActionIconSets action_icons_;
+
ObserverList<SearchResultObserver> observers_;
DISALLOW_COPY_AND_ASSIGN(SearchResult);
« no previous file with comments | « ui/app_list/app_list_view_delegate.h ('k') | ui/app_list/search_result.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698