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 <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
97 | 97 |
98 const std::string& id() const { return id_; } | 98 const std::string& id() const { return id_; } |
99 double relevance() const { return relevance_; } | 99 double relevance() const { return relevance_; } |
100 DisplayType display_type() const { return display_type_; } | 100 DisplayType display_type() const { return display_type_; } |
101 | 101 |
102 const Actions& actions() const { | 102 const Actions& actions() const { |
103 return actions_; | 103 return actions_; |
104 } | 104 } |
105 void SetActions(const Actions& sets); | 105 void SetActions(const Actions& sets); |
106 | 106 |
107 // Whether the result can be automatically selected by a voice query. | |
108 // (Non-voice results can still appear in the results list to be manually | |
109 // selected.) | |
110 bool voice_result() const { return voice_result_; } | |
calamity
2014/12/16 01:50:03
So do we want to change this as discussed yesterda
Matt Giuca
2014/12/16 02:04:09
As discussed, I think after the changes that the p
| |
111 | |
107 bool is_installing() const { return is_installing_; } | 112 bool is_installing() const { return is_installing_; } |
108 void SetIsInstalling(bool is_installing); | 113 void SetIsInstalling(bool is_installing); |
109 | 114 |
110 int percent_downloaded() const { return percent_downloaded_; } | 115 int percent_downloaded() const { return percent_downloaded_; } |
111 void SetPercentDownloaded(int percent_downloaded); | 116 void SetPercentDownloaded(int percent_downloaded); |
112 | 117 |
113 // Returns the dimension at which this result's icon should be displayed. | 118 // Returns the dimension at which this result's icon should be displayed. |
114 int GetPreferredIconDimension() const; | 119 int GetPreferredIconDimension() const; |
115 | 120 |
116 void NotifyItemInstalled(); | 121 void NotifyItemInstalled(); |
(...skipping 16 matching lines...) Expand all Loading... | |
133 // no menu for the item (e.g. during install). | 138 // no menu for the item (e.g. during install). |
134 // Note the returned menu model is owned by this item. | 139 // Note the returned menu model is owned by this item. |
135 virtual ui::MenuModel* GetContextMenuModel(); | 140 virtual ui::MenuModel* GetContextMenuModel(); |
136 | 141 |
137 protected: | 142 protected: |
138 void set_id(const std::string& id) { id_ = id; } | 143 void set_id(const std::string& id) { id_ = id; } |
139 void set_relevance(double relevance) { relevance_ = relevance; } | 144 void set_relevance(double relevance) { relevance_ = relevance; } |
140 void set_display_type(DisplayType display_type) { | 145 void set_display_type(DisplayType display_type) { |
141 display_type_ = display_type; | 146 display_type_ = display_type; |
142 } | 147 } |
148 void set_voice_result(bool voice_result) { voice_result_ = voice_result; } | |
143 | 149 |
144 private: | 150 private: |
145 gfx::ImageSkia icon_; | 151 gfx::ImageSkia icon_; |
146 | 152 |
147 base::string16 title_; | 153 base::string16 title_; |
148 Tags title_tags_; | 154 Tags title_tags_; |
149 | 155 |
150 base::string16 details_; | 156 base::string16 details_; |
151 Tags details_tags_; | 157 Tags details_tags_; |
152 | 158 |
153 std::string id_; | 159 std::string id_; |
154 double relevance_; | 160 double relevance_; |
155 DisplayType display_type_; | 161 DisplayType display_type_; |
156 | 162 |
157 Actions actions_; | 163 Actions actions_; |
164 bool voice_result_; | |
158 | 165 |
159 bool is_installing_; | 166 bool is_installing_; |
160 int percent_downloaded_; | 167 int percent_downloaded_; |
161 | 168 |
162 ObserverList<SearchResultObserver> observers_; | 169 ObserverList<SearchResultObserver> observers_; |
163 | 170 |
164 DISALLOW_COPY_AND_ASSIGN(SearchResult); | 171 DISALLOW_COPY_AND_ASSIGN(SearchResult); |
165 }; | 172 }; |
166 | 173 |
167 } // namespace app_list | 174 } // namespace app_list |
168 | 175 |
169 #endif // UI_APP_LIST_SEARCH_RESULT_H_ | 176 #endif // UI_APP_LIST_SEARCH_RESULT_H_ |
OLD | NEW |