platformKeys: Add per-extension sign permissions.
[chromium-blink-merge.git] / ui / app_list / BUILD.gn
blob7e05648694df243a5473c05a1e325c7965d27306
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/base",
82     "//ui/compositor",
83     "//ui/events:events_base",
84     "//ui/gfx",
85     "//ui/gfx/geometry",
86     "//ui/resources",
87     "//ui/strings",
88   ]
90   if (use_aura) {
91     deps += [
92       "//ui/aura",
93       "//ui/wm",
94     ]
95   }
97   if (toolkit_views) {
98     sources += [
99       "views/all_apps_tile_item_view.cc",
100       "views/all_apps_tile_item_view.h",
101       "views/app_list_background.cc",
102       "views/app_list_background.h",
103       "views/app_list_drag_and_drop_host.h",
104       "views/app_list_folder_view.cc",
105       "views/app_list_folder_view.h",
106       "views/app_list_item_view.cc",
107       "views/app_list_item_view.h",
108       "views/app_list_main_view.cc",
109       "views/app_list_main_view.h",
110       "views/app_list_menu_views.cc",
111       "views/app_list_menu_views.h",
112       "views/app_list_view.cc",
113       "views/app_list_view.h",
114       "views/app_list_view_observer.h",
115       "views/apps_container_view.cc",
116       "views/apps_container_view.h",
117       "views/apps_grid_view.cc",
118       "views/apps_grid_view.h",
119       "views/apps_grid_view_delegate.h",
120       "views/apps_grid_view_folder_delegate.h",
121       "views/cached_label.cc",
122       "views/cached_label.h",
123       "views/contents_animator.cc",
124       "views/contents_animator.h",
125       "views/contents_view.cc",
126       "views/contents_view.h",
127       "views/folder_background_view.cc",
128       "views/folder_background_view.h",
129       "views/folder_header_view.cc",
130       "views/folder_header_view.h",
131       "views/folder_header_view_delegate.h",
132       "views/page_switcher.cc",
133       "views/page_switcher.h",
134       "views/progress_bar_view.cc",
135       "views/progress_bar_view.h",
136       "views/pulsing_block_view.cc",
137       "views/pulsing_block_view.h",
138       "views/search_box_view.cc",
139       "views/search_box_view.h",
140       "views/search_box_view_delegate.h",
141       "views/search_result_actions_view.cc",
142       "views/search_result_actions_view.h",
143       "views/search_result_container_view.cc",
144       "views/search_result_container_view.h",
145       "views/search_result_list_view.cc",
146       "views/search_result_list_view.h",
147       "views/search_result_list_view_delegate.h",
148       "views/search_result_page_view.cc",
149       "views/search_result_page_view.h",
150       "views/search_result_tile_item_list_view.cc",
151       "views/search_result_tile_item_list_view.h",
152       "views/search_result_tile_item_view.cc",
153       "views/search_result_tile_item_view.h",
154       "views/search_result_view.cc",
155       "views/search_result_view.h",
156       "views/speech_view.cc",
157       "views/speech_view.h",
158       "views/start_page_view.cc",
159       "views/start_page_view.h",
160       "views/tile_item_view.cc",
161       "views/tile_item_view.h",
162       "views/top_icon_animation_view.cc",
163       "views/top_icon_animation_view.h",
164     ]
165     deps += [
166       "//ui/events",
167       "//ui/views",
168     ]
169   }
171   if (is_mac) {
172     sources += [
173       "cocoa/app_list_pager_view.h",
174       "cocoa/app_list_pager_view.mm",
175       "cocoa/app_list_view_controller.h",
176       "cocoa/app_list_view_controller.mm",
177       "cocoa/app_list_window_controller.h",
178       "cocoa/app_list_window_controller.mm",
179       "cocoa/apps_collection_view_drag_manager.h",
180       "cocoa/apps_collection_view_drag_manager.mm",
181       "cocoa/apps_grid_controller.h",
182       "cocoa/apps_grid_controller.mm",
183       "cocoa/apps_grid_view_item.h",
184       "cocoa/apps_grid_view_item.mm",
185       "cocoa/apps_pagination_model_observer.h",
186       "cocoa/apps_search_box_controller.h",
187       "cocoa/apps_search_box_controller.mm",
188       "cocoa/apps_search_results_controller.h",
189       "cocoa/apps_search_results_controller.mm",
190       "cocoa/apps_search_results_model_bridge.h",
191       "cocoa/apps_search_results_model_bridge.mm",
192       "cocoa/item_drag_controller.h",
193       "cocoa/item_drag_controller.mm",
194       "cocoa/scroll_view_with_no_scrollbars.h",
195       "cocoa/scroll_view_with_no_scrollbars.mm",
196     ]
197     deps += [ "//third_party/google_toolbox_for_mac" ]
198     libs = [ "QuartzCore.framework" ]
199   }
202 static_library("test_support") {
203   sources = [
204     "test/app_list_test_model.cc",
205     "test/app_list_test_model.h",
206     "test/app_list_test_view_delegate.cc",
207     "test/app_list_test_view_delegate.h",
208     "test/test_search_result.cc",
209     "test/test_search_result.h",
210   ]
212   deps = [
213     ":app_list",
214     "//base",
215     "//ui/gfx",
216     "//ui/gfx/geometry",
217     "//ui/resources",
218   ]
221 if (!is_win || link_chrome_on_windows) {
222   test("app_list_unittests") {
223     sources = [
224       "app_list_item_list_unittest.cc",
225       "app_list_model_unittest.cc",
226       "folder_image_unittest.cc",
227       "pagination_model_unittest.cc",
228       "search/history_data_store_unittest.cc",
229       "search/mixer_unittest.cc",
230       "search/term_break_iterator_unittest.cc",
231       "search/tokenized_string_char_iterator_unittest.cc",
232       "search/tokenized_string_match_unittest.cc",
233       "search/tokenized_string_unittest.cc",
234       "test/run_all_unittests.cc",
235     ]
237     deps = [
238       ":app_list",
239       ":test_support",
240       "//base",
241       "//base/test:test_support",
242       "//skia",
243       "//testing/gtest",
244       "//ui/base",
245       "//ui/compositor",
246       "//ui/events",
247       "//ui/events:test_support",
248       "//ui/gl",
249       "//ui/resources",
250       "//ui/resources:ui_test_pak",
251     ]
253     if (toolkit_views) {
254       sources += [
255         "views/app_list_main_view_unittest.cc",
256         "views/app_list_view_unittest.cc",
257         "views/apps_grid_view_unittest.cc",
258         "views/contents_view_unittest.cc",
259         "views/folder_header_view_unittest.cc",
260         "views/search_box_view_unittest.cc",
261         "views/search_result_list_view_unittest.cc",
262         "views/speech_view_unittest.cc",
263         "views/test/apps_grid_view_test_api.cc",
264         "views/test/apps_grid_view_test_api.h",
265       ]
266       deps += [
267         "//ui/views",
268         "//ui/views:test_support",
269       ]
270     }
272     if (is_mac) {
273       sources += [
274         "cocoa/app_list_view_controller_unittest.mm",
275         "cocoa/app_list_window_controller_unittest.mm",
276         "cocoa/apps_grid_controller_unittest.mm",
277         "cocoa/apps_search_box_controller_unittest.mm",
278         "cocoa/apps_search_results_controller_unittest.mm",
279         "cocoa/test/apps_grid_controller_test_helper.h",
280         "cocoa/test/apps_grid_controller_test_helper.mm",
281       ]
282     }
283   }