disable two ClientCertStoreChromeOSTest.* unit_tests on Valgrind bots
[chromium-blink-merge.git] / ui / app_list / BUILD.gn
blob02e612633b24c6c41d73b8f29c7f13d6e2031a3f
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")
6 import("//testing/test.gni")
8 component("app_list") {
9   sources = [
10     "app_list_constants.cc",
11     "app_list_constants.h",
12     "app_list_export.h",
13     "app_list_folder_item.cc",
14     "app_list_folder_item.h",
15     "app_list_item.cc",
16     "app_list_item.h",
17     "app_list_item_list.cc",
18     "app_list_item_list.h",
19     "app_list_item_list_observer.h",
20     "app_list_item_observer.h",
21     "app_list_menu.cc",
22     "app_list_menu.h",
23     "app_list_model.cc",
24     "app_list_model.h",
25     "app_list_model_observer.h",
26     "app_list_switches.cc",
27     "app_list_switches.h",
28     "app_list_view_delegate.cc",
29     "app_list_view_delegate.h",
30     "folder_image.cc",
31     "folder_image.h",
32     "pagination_controller.cc",
33     "pagination_controller.h",
34     "pagination_model.cc",
35     "pagination_model.h",
36     "pagination_model_observer.h",
37     "search/dictionary_data_store.cc",
38     "search/dictionary_data_store.h",
39     "search/history.cc",
40     "search/history.h",
41     "search/history_data.cc",
42     "search/history_data.h",
43     "search/history_data_store.cc",
44     "search/history_data_store.h",
45     "search/history_types.h",
46     "search/mixer.cc",
47     "search/mixer.h",
48     "search/term_break_iterator.cc",
49     "search/term_break_iterator.h",
50     "search/tokenized_string.cc",
51     "search/tokenized_string.h",
52     "search/tokenized_string_char_iterator.cc",
53     "search/tokenized_string_char_iterator.h",
54     "search/tokenized_string_match.cc",
55     "search/tokenized_string_match.h",
56     "search_box_model.cc",
57     "search_box_model.h",
58     "search_box_model_observer.h",
59     "search_controller.cc",
60     "search_controller.h",
61     "search_provider.cc",
62     "search_provider.h",
63     "search_result.cc",
64     "search_result.h",
65     "speech_ui_model.cc",
66     "speech_ui_model.h",
67     "speech_ui_model_observer.h",
68   ]
70   defines = [ "APP_LIST_IMPLEMENTATION" ]
72   deps = [
73     "//base",
74     "//base:i18n",
75     "//base/third_party/dynamic_annotations",
76     "//components/keyed_service/core",
77     "//skia",
78     "//sync",
79     "//third_party/icu",
80     "//ui/accessibility",
81     "//ui/app_list/resources",
82     "//ui/base",
83     "//ui/base/ime",
84     "//ui/compositor",
85     "//ui/events:events_base",
86     "//ui/gfx",
87     "//ui/gfx/geometry",
88     "//ui/resources",
89     "//ui/strings",
90   ]
92   if (use_aura) {
93     deps += [
94       "//ui/aura",
95       "//ui/wm",
96     ]
97   }
99   if (toolkit_views) {
100     sources += [
101       "views/all_apps_tile_item_view.cc",
102       "views/all_apps_tile_item_view.h",
103       "views/app_list_background.cc",
104       "views/app_list_background.h",
105       "views/app_list_drag_and_drop_host.h",
106       "views/app_list_folder_view.cc",
107       "views/app_list_folder_view.h",
108       "views/app_list_item_view.cc",
109       "views/app_list_item_view.h",
110       "views/app_list_main_view.cc",
111       "views/app_list_main_view.h",
112       "views/app_list_menu_views.cc",
113       "views/app_list_menu_views.h",
114       "views/app_list_page.cc",
115       "views/app_list_page.h",
116       "views/app_list_view.cc",
117       "views/app_list_view.h",
118       "views/app_list_view_observer.h",
119       "views/apps_container_view.cc",
120       "views/apps_container_view.h",
121       "views/apps_grid_view.cc",
122       "views/apps_grid_view.h",
123       "views/apps_grid_view_delegate.h",
124       "views/apps_grid_view_folder_delegate.h",
125       "views/cached_label.cc",
126       "views/cached_label.h",
127       "views/contents_view.cc",
128       "views/contents_view.h",
129       "views/custom_launcher_page_view.cc",
130       "views/custom_launcher_page_view.h",
131       "views/folder_background_view.cc",
132       "views/folder_background_view.h",
133       "views/folder_header_view.cc",
134       "views/folder_header_view.h",
135       "views/folder_header_view_delegate.h",
136       "views/image_shadow_animator.cc",
137       "views/image_shadow_animator.h",
138       "views/page_switcher.cc",
139       "views/page_switcher.h",
140       "views/progress_bar_view.cc",
141       "views/progress_bar_view.h",
142       "views/pulsing_block_view.cc",
143       "views/pulsing_block_view.h",
144       "views/search_box_view.cc",
145       "views/search_box_view.h",
146       "views/search_box_view_delegate.h",
147       "views/search_result_actions_view.cc",
148       "views/search_result_actions_view.h",
149       "views/search_result_container_view.cc",
150       "views/search_result_container_view.h",
151       "views/search_result_list_view.cc",
152       "views/search_result_list_view.h",
153       "views/search_result_list_view_delegate.h",
154       "views/search_result_page_view.cc",
155       "views/search_result_page_view.h",
156       "views/search_result_tile_item_list_view.cc",
157       "views/search_result_tile_item_list_view.h",
158       "views/search_result_tile_item_view.cc",
159       "views/search_result_tile_item_view.h",
160       "views/search_result_view.cc",
161       "views/search_result_view.h",
162       "views/speech_view.cc",
163       "views/speech_view.h",
164       "views/start_page_view.cc",
165       "views/start_page_view.h",
166       "views/tile_item_view.cc",
167       "views/tile_item_view.h",
168       "views/top_icon_animation_view.cc",
169       "views/top_icon_animation_view.h",
170     ]
171     deps += [
172       "//ui/events",
173       "//ui/views",
174     ]
176     public_deps = [
177       "//ui/views",
178     ]
179   }
181   if (is_mac) {
182     sources += [
183       "cocoa/app_list_pager_view.h",
184       "cocoa/app_list_pager_view.mm",
185       "cocoa/app_list_view_controller.h",
186       "cocoa/app_list_view_controller.mm",
187       "cocoa/app_list_window_controller.h",
188       "cocoa/app_list_window_controller.mm",
189       "cocoa/apps_collection_view_drag_manager.h",
190       "cocoa/apps_collection_view_drag_manager.mm",
191       "cocoa/apps_grid_controller.h",
192       "cocoa/apps_grid_controller.mm",
193       "cocoa/apps_grid_view_item.h",
194       "cocoa/apps_grid_view_item.mm",
195       "cocoa/apps_pagination_model_observer.h",
196       "cocoa/apps_search_box_controller.h",
197       "cocoa/apps_search_box_controller.mm",
198       "cocoa/apps_search_results_controller.h",
199       "cocoa/apps_search_results_controller.mm",
200       "cocoa/apps_search_results_model_bridge.h",
201       "cocoa/apps_search_results_model_bridge.mm",
202       "cocoa/item_drag_controller.h",
203       "cocoa/item_drag_controller.mm",
204       "cocoa/scroll_view_with_no_scrollbars.h",
205       "cocoa/scroll_view_with_no_scrollbars.mm",
206     ]
207     deps += [ "//third_party/google_toolbox_for_mac" ]
208     libs = [ "QuartzCore.framework" ]
209   }
212 static_library("test_support") {
213   sources = [
214     "test/app_list_test_model.cc",
215     "test/app_list_test_model.h",
216     "test/app_list_test_view_delegate.cc",
217     "test/app_list_test_view_delegate.h",
218     "test/test_search_result.cc",
219     "test/test_search_result.h",
220   ]
222   deps = [
223     ":app_list",
224     "//base",
225     "//ui/gfx",
226     "//ui/gfx/geometry",
227   ]
230 if (is_linux && !is_chromeos) {
231   # TODO(GYP): Figure out which of these work and are needed on other platforms.
232   if (toolkit_views) {
233     executable("app_list_demo") {
234       testonly = true
236       sources = [
237         "demo/app_list_demo_views.cc",
238       ]
240       deps = [
241         ":app_list",
242         ":test_support",
243         "//base",
244         "//content",
245         "//content/public/browser",
246         "//skia",
247         "//url",
248         "//ui/base",
249         "//ui/events",
250         "//ui/resources",
251         "//ui/resources:ui_test_pak",
252         "//ui/views",
253         "//ui/views_content_client",
254         "//ui/views/controls/webview",
255       ]
256       if (is_win) {
257         configs -= [ "//build/config/win:console" ]
258         configs += [ "//build/config/win:windowed" ]
260         deps += [
261           "//sandbox",
262           "//content:content_startup_helper_win",
263         ]
264       }
265     }
266   }
269 # TODO(GYP): Delete this after we've converted everything to GN.
270 # The _run targets exist only for compatibility w/ GYP.
271 group("app_list_unittests_run") {
272   testonly = true
273   deps = [
274     ":app_list_unittests",
275   ]
278 test("app_list_unittests") {
279   sources = [
280     "app_list_item_list_unittest.cc",
281     "app_list_model_unittest.cc",
282     "folder_image_unittest.cc",
283     "pagination_model_unittest.cc",
284     "search/history_data_store_unittest.cc",
285     "search/mixer_unittest.cc",
286     "search/term_break_iterator_unittest.cc",
287     "search/tokenized_string_char_iterator_unittest.cc",
288     "search/tokenized_string_match_unittest.cc",
289     "search/tokenized_string_unittest.cc",
290     "test/run_all_unittests.cc",
291   ]
293   # TODO: Add to data_deps instead once GN has rolled past #339778.
294   data = [
295     "$root_out_dir/ui_test.pak",
296   ]
298   configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
300   deps = [
301     ":app_list",
302     ":test_support",
303     "//base",
304     "//base/test:test_support",
305     "//skia",
306     "//testing/gtest",
307     "//ui/base",
308     "//ui/compositor",
309     "//ui/events",
310     "//ui/events:test_support",
311     "//ui/gl",
312     "//ui/resources",
313     "//ui/resources:ui_test_pak",
314   ]
316   data_deps = [ "//third_party/mesa:osmesa" ]
318   if (toolkit_views) {
319     sources += [
320       "views/app_list_main_view_unittest.cc",
321       "views/app_list_view_unittest.cc",
322       "views/apps_grid_view_unittest.cc",
323       "views/folder_header_view_unittest.cc",
324       "views/image_shadow_animator_unittest.cc",
325       "views/search_box_view_unittest.cc",
326       "views/search_result_list_view_unittest.cc",
327       "views/search_result_page_view_unittest.cc",
328       "views/speech_view_unittest.cc",
329       "views/test/apps_grid_view_test_api.cc",
330       "views/test/apps_grid_view_test_api.h",
331     ]
332     deps += [
333       "//ui/views",
334       "//ui/views:test_support",
335     ]
336   }
338   if (is_mac) {
339     sources += [
340       "cocoa/app_list_view_controller_unittest.mm",
341       "cocoa/app_list_window_controller_unittest.mm",
342       "cocoa/apps_grid_controller_unittest.mm",
343       "cocoa/apps_search_box_controller_unittest.mm",
344       "cocoa/apps_search_results_controller_unittest.mm",
345       "cocoa/test/apps_grid_controller_test_helper.h",
346       "cocoa/test/apps_grid_controller_test_helper.mm",
347     ]
348   }