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

Side by Side Diff: ui/app_list/search_result.h

Issue 2920393002: Implementing answer card hover highlight. (Closed)
Patch Set: CR comments 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 unified diff | Download patch
OLDNEW
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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 109
110 const base::string16& details() const { return details_; } 110 const base::string16& details() const { return details_; }
111 void set_details(const base::string16& details) { details_ = details; } 111 void set_details(const base::string16& details) { details_ = details; }
112 112
113 const Tags& details_tags() const { return details_tags_; } 113 const Tags& details_tags() const { return details_tags_; }
114 void set_details_tags(const Tags& tags) { details_tags_ = tags; } 114 void set_details_tags(const Tags& tags) { details_tags_ = tags; }
115 115
116 views::View* view() const { return view_; } 116 views::View* view() const { return view_; }
117 void set_view(views::View* view) { view_ = view; } 117 void set_view(views::View* view) { view_ = view; }
118 118
119 bool is_mouse_in_view() const { return mouse_is_in_view_; }
120 void SetIsMouseInView(bool mouse_is_inside);
121
119 const std::string& id() const { return id_; } 122 const std::string& id() const { return id_; }
120 123
121 double relevance() const { return relevance_; } 124 double relevance() const { return relevance_; }
122 void set_relevance(double relevance) { relevance_ = relevance; } 125 void set_relevance(double relevance) { relevance_ = relevance; }
123 126
124 DisplayType display_type() const { return display_type_; } 127 DisplayType display_type() const { return display_type_; }
125 void set_display_type(DisplayType display_type) { 128 void set_display_type(DisplayType display_type) {
126 display_type_ = display_type; 129 display_type_ = display_type;
127 } 130 }
128 131
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 197
195 base::string16 details_; 198 base::string16 details_;
196 Tags details_tags_; 199 Tags details_tags_;
197 200
198 // Unowned pointer to a view containing a rendered result, or nullptr if there 201 // Unowned pointer to a view containing a rendered result, or nullptr if there
199 // is no such view for the result. 202 // is no such view for the result.
200 // The view has set_owned_by_client() property set. It's a responsibility of 203 // The view has set_owned_by_client() property set. It's a responsibility of
201 // SearchProvider to set this property and own this view. 204 // SearchProvider to set this property and own this view.
202 views::View* view_ = nullptr; 205 views::View* view_ = nullptr;
203 206
207 // If view_ isn't null, indicates whether the mouse cursor is inside view_.
208 bool mouse_is_in_view_ = false;
209
204 std::string id_; 210 std::string id_;
205 double relevance_; 211 double relevance_;
206 DisplayType display_type_; 212 DisplayType display_type_;
207 213
208 // The Manhattan distance from the origin of all search results to this 214 // The Manhattan distance from the origin of all search results to this
209 // result. This is logged for UMA. 215 // result. This is logged for UMA.
210 int distance_from_origin_; 216 int distance_from_origin_;
211 217
212 Actions actions_; 218 Actions actions_;
213 bool voice_result_; 219 bool voice_result_;
214 220
215 bool is_installing_; 221 bool is_installing_;
216 int percent_downloaded_; 222 int percent_downloaded_;
217 223
218 base::ObserverList<SearchResultObserver> observers_; 224 base::ObserverList<SearchResultObserver> observers_;
219 225
220 DISALLOW_COPY_AND_ASSIGN(SearchResult); 226 DISALLOW_COPY_AND_ASSIGN(SearchResult);
221 }; 227 };
222 228
223 } // namespace app_list 229 } // namespace app_list
224 230
225 #endif // UI_APP_LIST_SEARCH_RESULT_H_ 231 #endif // UI_APP_LIST_SEARCH_RESULT_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/search/answer_card_search_provider.cc ('k') | ui/app_list/search_result.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698