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 <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/observer_list.h" | 11 #include "base/observer_list.h" |
12 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
13 #include "ui/app_list/app_list_export.h" | 13 #include "ui/app_list/app_list_export.h" |
14 #include "ui/base/models/list_model.h" | 14 #include "ui/base/models/list_model.h" |
15 #include "ui/base/range/range.h" | |
16 #include "ui/gfx/image/image_skia.h" | 15 #include "ui/gfx/image/image_skia.h" |
| 16 #include "ui/gfx/range/range.h" |
17 | 17 |
18 namespace ui { | 18 namespace ui { |
19 class MenuModel; | 19 class MenuModel; |
20 } | 20 } |
21 | 21 |
22 namespace app_list { | 22 namespace app_list { |
23 | 23 |
24 class SearchResultObserver; | 24 class SearchResultObserver; |
25 | 25 |
26 // SearchResult consists of an icon, title text and details text. Title and | 26 // SearchResult consists of an icon, title text and details text. Title and |
(...skipping 11 matching lines...) Expand all Loading... |
38 MATCH = 1 << 1, | 38 MATCH = 1 << 1, |
39 DIM = 1 << 2, | 39 DIM = 1 << 2, |
40 }; | 40 }; |
41 | 41 |
42 Tag(int styles, size_t start, size_t end) | 42 Tag(int styles, size_t start, size_t end) |
43 : styles(styles), | 43 : styles(styles), |
44 range(start, end) { | 44 range(start, end) { |
45 } | 45 } |
46 | 46 |
47 int styles; | 47 int styles; |
48 ui::Range range; | 48 gfx::Range range; |
49 }; | 49 }; |
50 typedef std::vector<Tag> Tags; | 50 typedef std::vector<Tag> Tags; |
51 | 51 |
52 // Data representing an action that can be performed on this search result. | 52 // Data representing an action that can be performed on this search result. |
53 // An action could be represented as an icon set or as a blue button with | 53 // An action could be represented as an icon set or as a blue button with |
54 // a label. Icon set is chosen if label text is empty. Otherwise, a blue | 54 // a label. Icon set is chosen if label text is empty. Otherwise, a blue |
55 // button with the label text will be used. | 55 // button with the label text will be used. |
56 struct APP_LIST_EXPORT Action { | 56 struct APP_LIST_EXPORT Action { |
57 Action(const gfx::ImageSkia& base_image, | 57 Action(const gfx::ImageSkia& base_image, |
58 const gfx::ImageSkia& hover_image, | 58 const gfx::ImageSkia& hover_image, |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 int percent_downloaded_; | 126 int percent_downloaded_; |
127 | 127 |
128 ObserverList<SearchResultObserver> observers_; | 128 ObserverList<SearchResultObserver> observers_; |
129 | 129 |
130 DISALLOW_COPY_AND_ASSIGN(SearchResult); | 130 DISALLOW_COPY_AND_ASSIGN(SearchResult); |
131 }; | 131 }; |
132 | 132 |
133 } // namespace app_list | 133 } // namespace app_list |
134 | 134 |
135 #endif // UI_APP_LIST_SEARCH_RESULT_H_ | 135 #endif // UI_APP_LIST_SEARCH_RESULT_H_ |
OLD | NEW |