| 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 const std::string& id() const { return id_; } | 104 const std::string& id() const { return id_; } |
| 105 | 105 |
| 106 double relevance() const { return relevance_; } | 106 double relevance() const { return relevance_; } |
| 107 void set_relevance(double relevance) { relevance_ = relevance; } | 107 void set_relevance(double relevance) { relevance_ = relevance; } |
| 108 | 108 |
| 109 DisplayType display_type() const { return display_type_; } | 109 DisplayType display_type() const { return display_type_; } |
| 110 void set_display_type(DisplayType display_type) { | 110 void set_display_type(DisplayType display_type) { |
| 111 display_type_ = display_type; | 111 display_type_ = display_type; |
| 112 } | 112 } |
| 113 | 113 |
| 114 int distance_from_origin() { return distance_from_origin_; } |
| 115 void set_distance_from_origin(int distance) { |
| 116 distance_from_origin_ = distance; |
| 117 } |
| 118 |
| 114 const Actions& actions() const { | 119 const Actions& actions() const { |
| 115 return actions_; | 120 return actions_; |
| 116 } | 121 } |
| 117 void SetActions(const Actions& sets); | 122 void SetActions(const Actions& sets); |
| 118 | 123 |
| 119 // Whether the result can be automatically selected by a voice query. | 124 // Whether the result can be automatically selected by a voice query. |
| 120 // (Non-voice results can still appear in the results list to be manually | 125 // (Non-voice results can still appear in the results list to be manually |
| 121 // selected.) | 126 // selected.) |
| 122 bool voice_result() const { return voice_result_; } | 127 bool voice_result() const { return voice_result_; } |
| 123 | 128 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 base::string16 title_; | 167 base::string16 title_; |
| 163 Tags title_tags_; | 168 Tags title_tags_; |
| 164 | 169 |
| 165 base::string16 details_; | 170 base::string16 details_; |
| 166 Tags details_tags_; | 171 Tags details_tags_; |
| 167 | 172 |
| 168 std::string id_; | 173 std::string id_; |
| 169 double relevance_; | 174 double relevance_; |
| 170 DisplayType display_type_; | 175 DisplayType display_type_; |
| 171 | 176 |
| 177 // The Manhattan distance from the origin of all search results to this |
| 178 // result. This is logged for UMA. |
| 179 int distance_from_origin_; |
| 180 |
| 172 Actions actions_; | 181 Actions actions_; |
| 173 bool voice_result_; | 182 bool voice_result_; |
| 174 | 183 |
| 175 bool is_installing_; | 184 bool is_installing_; |
| 176 int percent_downloaded_; | 185 int percent_downloaded_; |
| 177 | 186 |
| 178 ObserverList<SearchResultObserver> observers_; | 187 ObserverList<SearchResultObserver> observers_; |
| 179 | 188 |
| 180 DISALLOW_COPY_AND_ASSIGN(SearchResult); | 189 DISALLOW_COPY_AND_ASSIGN(SearchResult); |
| 181 }; | 190 }; |
| 182 | 191 |
| 183 } // namespace app_list | 192 } // namespace app_list |
| 184 | 193 |
| 185 #endif // UI_APP_LIST_SEARCH_RESULT_H_ | 194 #endif // UI_APP_LIST_SEARCH_RESULT_H_ |
| OLD | NEW |