Update metrics verification for dev-proxy.
[chromium-blink-merge.git] / ui / app_list / BUILD.gn
blob886eeeec1702997294077c9f182c3e5ded1c1495
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     "pagination_controller.cc",
30     "pagination_controller.h",
31     "pagination_model.cc",
32     "pagination_model.h",
33     "pagination_model_observer.h",
34     "search_box_model.cc",
35     "search_box_model.h",
36     "search_box_model_observer.h",
37     "search_provider.cc",
38     "search_provider.h",
39     "search_result.cc",
40     "search_result.h",
41     "search/term_break_iterator.cc",
42     "search/term_break_iterator.h",
43     "search/tokenized_string.cc",
44     "search/tokenized_string.h",
45     "search/tokenized_string_char_iterator.cc",
46     "search/tokenized_string_char_iterator.h",
47     "search/tokenized_string_match.cc",
48     "search/tokenized_string_match.h",
49     "speech_ui_model.cc",
50     "speech_ui_model.h",
51     "speech_ui_model_observer.h",
52   ]
54   defines = [ "APP_LIST_IMPLEMENTATION" ]
56   deps = [
57     "//base",
58     "//base:i18n",
59     "//base/third_party/dynamic_annotations",
60     "//skia",
61     "//sync",
62     "//third_party/icu",
63     "//ui/accessibility",
64     "//ui/base",
65     "//ui/compositor",
66     "//ui/events:events_base",
67     "//ui/gfx",
68     "//ui/gfx/geometry",
69     "//ui/resources",
70     "//ui/strings",
71   ]
73   if (use_aura) {
74     deps += [
75       "//ui/aura",
76       "//ui/wm",
77     ]
78   }
80   if (toolkit_views) {
81     sources += [
82       "views/apps_container_view.cc",
83       "views/apps_container_view.h",
84       "views/app_list_background.cc",
85       "views/app_list_background.h",
86       "views/app_list_drag_and_drop_host.h",
87       "views/app_list_folder_view.cc",
88       "views/app_list_folder_view.h",
89       "views/app_list_item_view.cc",
90       "views/app_list_item_view.h",
91       "views/app_list_main_view.cc",
92       "views/app_list_main_view.h",
93       "views/app_list_menu_views.cc",
94       "views/app_list_menu_views.h",
95       "views/app_list_view.cc",
96       "views/app_list_view.h",
97       "views/app_list_view_observer.h",
98       "views/apps_grid_view.cc",
99       "views/apps_grid_view.h",
100       "views/apps_grid_view_delegate.h",
101       "views/apps_grid_view_folder_delegate.h",
102       "views/cached_label.cc",
103       "views/cached_label.h",
104       "views/contents_switcher_view.cc",
105       "views/contents_switcher_view.h",
106       "views/contents_view.cc",
107       "views/contents_view.h",
108       "views/folder_background_view.cc",
109       "views/folder_background_view.h",
110       "views/folder_header_view.cc",
111       "views/folder_header_view.h",
112       "views/folder_header_view_delegate.h",
113       "views/page_switcher.cc",
114       "views/page_switcher.h",
115       "views/progress_bar_view.cc",
116       "views/progress_bar_view.h",
117       "views/pulsing_block_view.cc",
118       "views/pulsing_block_view.h",
119       "views/search_box_view.cc",
120       "views/search_box_view.h",
121       "views/search_box_view_delegate.h",
122       "views/search_result_actions_view.cc",
123       "views/search_result_actions_view.h",
124       "views/search_result_list_view.cc",
125       "views/search_result_list_view.h",
126       "views/search_result_list_view_delegate.h",
127       "views/search_result_view.cc",
128       "views/search_result_view.h",
129       "views/speech_view.cc",
130       "views/speech_view.h",
131       "views/start_page_view.cc",
132       "views/start_page_view.h",
133       "views/tile_item_view.cc",
134       "views/tile_item_view.h",
135       "views/top_icon_animation_view.cc",
136       "views/top_icon_animation_view.h",
137     ]
138     deps += [
139       "//ui/events",
140       "//ui/views",
141     ]
142   }
144   if (is_mac) {
145     sources += [
146       "cocoa/app_list_pager_view.h",
147       "cocoa/app_list_pager_view.mm",
148       "cocoa/app_list_view_controller.h",
149       "cocoa/app_list_view_controller.mm",
150       "cocoa/app_list_window_controller.h",
151       "cocoa/app_list_window_controller.mm",
152       "cocoa/apps_collection_view_drag_manager.h",
153       "cocoa/apps_collection_view_drag_manager.mm",
154       "cocoa/apps_grid_controller.h",
155       "cocoa/apps_grid_controller.mm",
156       "cocoa/apps_grid_view_item.h",
157       "cocoa/apps_grid_view_item.mm",
158       "cocoa/apps_pagination_model_observer.h",
159       "cocoa/apps_search_box_controller.h",
160       "cocoa/apps_search_box_controller.mm",
161       "cocoa/apps_search_results_controller.h",
162       "cocoa/apps_search_results_controller.mm",
163       "cocoa/apps_search_results_model_bridge.h",
164       "cocoa/apps_search_results_model_bridge.mm",
165       "cocoa/item_drag_controller.h",
166       "cocoa/item_drag_controller.mm",
167       "cocoa/scroll_view_with_no_scrollbars.h",
168       "cocoa/scroll_view_with_no_scrollbars.mm",
169     ]
170     deps += [
171       #"../../third_party/google_toolbox_for_mac/google_toolbox_for_mac.gyp:google_toolbox_for_mac",  TODO(GYP)
172     ]
173     libs = [ "QuartzCore.framework" ]
174   }
177 static_library("test_support") {
178   sources = [
179     "test/app_list_test_model.cc",
180     "test/app_list_test_model.h",
181     "test/app_list_test_view_delegate.cc",
182     "test/app_list_test_view_delegate.h",
183   ]
185   deps = [
186     ":app_list",
187     "//base",
188     "//ui/gfx",
189     "//ui/gfx/geometry",
190     "//ui/resources",
191   ]
194 test("app_list_unittests") {
195   sources = [
196     "app_list_item_list_unittest.cc",
197     "app_list_model_unittest.cc",
198     "pagination_model_unittest.cc",
199     "search/term_break_iterator_unittest.cc",
200     "search/tokenized_string_char_iterator_unittest.cc",
201     "search/tokenized_string_match_unittest.cc",
202     "search/tokenized_string_unittest.cc",
203     "test/run_all_unittests.cc",
204   ]
206   deps = [
207     ":app_list",
208     ":test_support",
209     "//base",
210     "//base/test:test_support",
211     "//skia",
212     "//testing/gtest",
213     "//ui/base",
214     "//ui/compositor",
215     "//ui/events",
216     "//ui/gl",
217     "//ui/resources",
218     "//ui/resources:ui_test_pak",
219   ]
221   if (toolkit_views) {
222     sources += [
223       "views/app_list_main_view_unittest.cc",
224       "views/app_list_view_unittest.cc",
225       "views/apps_grid_view_unittest.cc",
226       "views/folder_header_view_unittest.cc",
227       "views/search_box_view_unittest.cc",
228       "views/search_result_list_view_unittest.cc",
229       "views/speech_view_unittest.cc",
230       "views/test/apps_grid_view_test_api.cc",
231       "views/test/apps_grid_view_test_api.h",
232     ]
233     deps += [
234       "//ui/views",
235       "//ui/views:test_support",
236     ]
237   }
239   if (is_mac) {
240     sources += [
241       "cocoa/app_list_view_controller_unittest.mm",
242       "cocoa/app_list_window_controller_unittest.mm",
243       "cocoa/apps_grid_controller_unittest.mm",
244       "cocoa/apps_search_box_controller_unittest.mm",
245       "cocoa/apps_search_results_controller_unittest.mm",
246       "cocoa/test/apps_grid_controller_test_helper.h",
247       "cocoa/test/apps_grid_controller_test_helper.mm",
248     ]
249   }