aw: Move SharedRendererState out of AwContents
[chromium-blink-merge.git] / ui / app_list / BUILD.gn
blob6ccf287c2e0b503a6664dc82b434640b9a131622
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//build/config/ui.gni")
7 component("app_list") {
8   sources = [
9     "app_list_constants.cc",
10     "app_list_constants.h",
11     "app_list_export.h",
12     "app_list_folder_item.cc",
13     "app_list_folder_item.h",
14     "app_list_item.cc",
15     "app_list_item.h",
16     "app_list_item_observer.h",
17     "app_list_item_list.cc",
18     "app_list_item_list.h",
19     "app_list_item_list_observer.h",
20     "app_list_menu.cc",
21     "app_list_menu.h",
22     "app_list_model.cc",
23     "app_list_model.h",
24     "app_list_model_observer.h",
25     "app_list_switches.cc",
26     "app_list_switches.h",
27     "app_list_view_delegate.cc",
28     "app_list_view_delegate.h",
29     "folder_image.cc",
30     "folder_image.h",
31     "pagination_controller.cc",
32     "pagination_controller.h",
33     "pagination_model.cc",
34     "pagination_model.h",
35     "pagination_model_observer.h",
36     "search_box_model.cc",
37     "search_box_model.h",
38     "search_box_model_observer.h",
39     "search_controller.cc",
40     "search_controller.h",
41     "search_provider.cc",
42     "search_provider.h",
43     "search_result.cc",
44     "search_result.h",
45     "search/dictionary_data_store.cc",
46     "search/dictionary_data_store.h",
47     "search/history.cc",
48     "search/history.h",
49     "search/history_data.cc",
50     "search/history_data.h",
51     "search/history_data_store.cc",
52     "search/history_data_store.h",
53     "search/history_types.h",
54     "search/mixer.cc",
55     "search/mixer.h",
56     "search/term_break_iterator.cc",
57     "search/term_break_iterator.h",
58     "search/tokenized_string.cc",
59     "search/tokenized_string.h",
60     "search/tokenized_string_char_iterator.cc",
61     "search/tokenized_string_char_iterator.h",
62     "search/tokenized_string_match.cc",
63     "search/tokenized_string_match.h",
64     "speech_ui_model.cc",
65     "speech_ui_model.h",
66     "speech_ui_model_observer.h",
67   ]
69   defines = [ "APP_LIST_IMPLEMENTATION" ]
71   deps = [
72     "//base",
73     "//base:i18n",
74     "//base/third_party/dynamic_annotations",
75     "//components/keyed_service/core",
76     "//skia",
77     "//sync",
78     "//third_party/icu",
79     "//ui/accessibility",
80     "//ui/base",
81     "//ui/compositor",
82     "//ui/events:events_base",
83     "//ui/gfx",
84     "//ui/gfx/geometry",
85     "//ui/resources",
86     "//ui/strings",
87   ]
89   if (use_aura) {
90     deps += [
91       "//ui/aura",
92       "//ui/wm",
93     ]
94   }
96   if (toolkit_views) {
97     sources += [
98       "views/all_apps_tile_item_view.cc",
99       "views/all_apps_tile_item_view.h",
100       "views/apps_container_view.cc",
101       "views/apps_container_view.h",
102       "views/app_list_background.cc",
103       "views/app_list_background.h",
104       "views/app_list_drag_and_drop_host.h",
105       "views/app_list_folder_view.cc",
106       "views/app_list_folder_view.h",
107       "views/app_list_item_view.cc",
108       "views/app_list_item_view.h",
109       "views/app_list_main_view.cc",
110       "views/app_list_main_view.h",
111       "views/app_list_menu_views.cc",
112       "views/app_list_menu_views.h",
113       "views/app_list_view.cc",
114       "views/app_list_view.h",
115       "views/app_list_view_observer.h",
116       "views/apps_grid_view.cc",
117       "views/apps_grid_view.h",
118       "views/apps_grid_view_delegate.h",
119       "views/apps_grid_view_folder_delegate.h",
120       "views/cached_label.cc",
121       "views/cached_label.h",
122       "views/contents_switcher_view.cc",
123       "views/contents_switcher_view.h",
124       "views/contents_view.cc",
125       "views/contents_view.h",
126       "views/folder_background_view.cc",
127       "views/folder_background_view.h",
128       "views/folder_header_view.cc",
129       "views/folder_header_view.h",
130       "views/folder_header_view_delegate.h",
131       "views/page_switcher.cc",
132       "views/page_switcher.h",
133       "views/progress_bar_view.cc",
134       "views/progress_bar_view.h",
135       "views/pulsing_block_view.cc",
136       "views/pulsing_block_view.h",
137       "views/search_box_view.cc",
138       "views/search_box_view.h",
139       "views/search_box_view_delegate.h",
140       "views/search_result_container_view.cc",
141       "views/search_result_container_view.h",
142       "views/search_result_actions_view.cc",
143       "views/search_result_actions_view.h",
144       "views/search_result_list_view.cc",
145       "views/search_result_list_view.h",
146       "views/search_result_list_view_delegate.h",
147       "views/search_result_view.cc",
148       "views/search_result_view.h",
149       "views/speech_view.cc",
150       "views/speech_view.h",
151       "views/start_page_view.cc",
152       "views/start_page_view.h",
153       "views/search_result_tile_item_view.cc",
154       "views/search_result_tile_item_view.h",
155       "views/tile_item_view.cc",
156       "views/tile_item_view.h",
157       "views/top_icon_animation_view.cc",
158       "views/top_icon_animation_view.h",
159     ]
160     deps += [
161       "//ui/events",
162       "//ui/views",
163     ]
164   }
166   if (is_mac) {
167     sources += [
168       "cocoa/app_list_pager_view.h",
169       "cocoa/app_list_pager_view.mm",
170       "cocoa/app_list_view_controller.h",
171       "cocoa/app_list_view_controller.mm",
172       "cocoa/app_list_window_controller.h",
173       "cocoa/app_list_window_controller.mm",
174       "cocoa/apps_collection_view_drag_manager.h",
175       "cocoa/apps_collection_view_drag_manager.mm",
176       "cocoa/apps_grid_controller.h",
177       "cocoa/apps_grid_controller.mm",
178       "cocoa/apps_grid_view_item.h",
179       "cocoa/apps_grid_view_item.mm",
180       "cocoa/apps_pagination_model_observer.h",
181       "cocoa/apps_search_box_controller.h",
182       "cocoa/apps_search_box_controller.mm",
183       "cocoa/apps_search_results_controller.h",
184       "cocoa/apps_search_results_controller.mm",
185       "cocoa/apps_search_results_model_bridge.h",
186       "cocoa/apps_search_results_model_bridge.mm",
187       "cocoa/item_drag_controller.h",
188       "cocoa/item_drag_controller.mm",
189       "cocoa/scroll_view_with_no_scrollbars.h",
190       "cocoa/scroll_view_with_no_scrollbars.mm",
191     ]
192     deps += [
193       "//third_party/google_toolbox_for_mac",
194     ]
195     libs = [ "QuartzCore.framework" ]
196   }
199 static_library("test_support") {
200   sources = [
201     "test/app_list_test_model.cc",
202     "test/app_list_test_model.h",
203     "test/app_list_test_view_delegate.cc",
204     "test/app_list_test_view_delegate.h",
205     "test/test_search_result.cc",
206     "test/test_search_result.h",
207   ]
209   deps = [
210     ":app_list",
211     "//base",
212     "//ui/gfx",
213     "//ui/gfx/geometry",
214     "//ui/resources",
215   ]
218 test("app_list_unittests") {
219   sources = [
220     "app_list_item_list_unittest.cc",
221     "app_list_model_unittest.cc",
222     "folder_image_unittest.cc",
223     "pagination_model_unittest.cc",
224     "search/history_data_store_unittest.cc",
225     "search/mixer_unittest.cc",
226     "search/term_break_iterator_unittest.cc",
227     "search/tokenized_string_char_iterator_unittest.cc",
228     "search/tokenized_string_match_unittest.cc",
229     "search/tokenized_string_unittest.cc",
230     "test/run_all_unittests.cc",
231   ]
233   deps = [
234     ":app_list",
235     ":test_support",
236     "//base",
237     "//base/test:test_support",
238     "//skia",
239     "//testing/gtest",
240     "//ui/base",
241     "//ui/compositor",
242     "//ui/events",
243     "//ui/gl",
244     "//ui/resources",
245     "//ui/resources:ui_test_pak",
246   ]
248   if (toolkit_views) {
249     sources += [
250       "views/app_list_main_view_unittest.cc",
251       "views/app_list_view_unittest.cc",
252       "views/apps_grid_view_unittest.cc",
253       "views/folder_header_view_unittest.cc",
254       "views/search_box_view_unittest.cc",
255       "views/search_result_list_view_unittest.cc",
256       "views/speech_view_unittest.cc",
257       "views/test/apps_grid_view_test_api.cc",
258       "views/test/apps_grid_view_test_api.h",
259     ]
260     deps += [
261       "//ui/views",
262       "//ui/views:test_support",
263     ]
264   }
266   if (is_mac) {
267     sources += [
268       "cocoa/app_list_view_controller_unittest.mm",
269       "cocoa/app_list_window_controller_unittest.mm",
270       "cocoa/apps_grid_controller_unittest.mm",
271       "cocoa/apps_search_box_controller_unittest.mm",
272       "cocoa/apps_search_results_controller_unittest.mm",
273       "cocoa/test/apps_grid_controller_test_helper.h",
274       "cocoa/test/apps_grid_controller_test_helper.mm",
275     ]
276   }