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