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 <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 // mutually exclusive. | 50 // mutually exclusive. |
51 enum Style { | 51 enum Style { |
52 NONE = 0, | 52 NONE = 0, |
53 URL = 1 << 0, | 53 URL = 1 << 0, |
54 MATCH = 1 << 1, | 54 MATCH = 1 << 1, |
55 DIM = 1 << 2, | 55 DIM = 1 << 2, |
56 }; | 56 }; |
57 | 57 |
58 Tag(int styles, size_t start, size_t end) | 58 Tag(int styles, size_t start, size_t end) |
59 : styles(styles), | 59 : styles(styles), |
60 range(start, end) { | 60 range(static_cast<uint32_t>(start), static_cast<uint32_t>(end)) {} |
61 } | |
62 | 61 |
63 int styles; | 62 int styles; |
64 gfx::Range range; | 63 gfx::Range range; |
65 }; | 64 }; |
66 typedef std::vector<Tag> Tags; | 65 typedef std::vector<Tag> Tags; |
67 | 66 |
68 // Data representing an action that can be performed on this search result. | 67 // Data representing an action that can be performed on this search result. |
69 // An action could be represented as an icon set or as a blue button with | 68 // An action could be represented as an icon set or as a blue button with |
70 // a label. Icon set is chosen if label text is empty. Otherwise, a blue | 69 // a label. Icon set is chosen if label text is empty. Otherwise, a blue |
71 // button with the label text will be used. | 70 // button with the label text will be used. |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 int percent_downloaded_; | 201 int percent_downloaded_; |
203 | 202 |
204 base::ObserverList<SearchResultObserver> observers_; | 203 base::ObserverList<SearchResultObserver> observers_; |
205 | 204 |
206 DISALLOW_COPY_AND_ASSIGN(SearchResult); | 205 DISALLOW_COPY_AND_ASSIGN(SearchResult); |
207 }; | 206 }; |
208 | 207 |
209 } // namespace app_list | 208 } // namespace app_list |
210 | 209 |
211 #endif // UI_APP_LIST_SEARCH_RESULT_H_ | 210 #endif // UI_APP_LIST_SEARCH_RESULT_H_ |
OLD | NEW |