Supervised user whitelists: Cleanup
[chromium-blink-merge.git] / ui / base / BUILD.gn
blob1d8047faf903707df40f5c4e2ccfbeeb87dc4f28
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 if (is_android) {
9   import("//build/config/android/config.gni")
10   import("//build/config/android/rules.gni")
13 build_ime = !is_ios
15 component("base") {
16   output_name = "ui_base"
17   sources = [
18     "accelerators/accelerator.cc",
19     "accelerators/accelerator.h",
20     "accelerators/accelerator_history.cc",
21     "accelerators/accelerator_history.h",
22     "accelerators/accelerator_manager.cc",
23     "accelerators/accelerator_manager.h",
24     "accelerators/menu_label_accelerator_util_linux.cc",
25     "accelerators/menu_label_accelerator_util_linux.h",
26     "accelerators/platform_accelerator.h",
27     "accelerators/platform_accelerator_cocoa.h",
28     "accelerators/platform_accelerator_cocoa.mm",
29     "android/ui_base_jni_registrar.cc",
30     "android/ui_base_jni_registrar.h",
31     "base_window.cc",
32     "base_window.h",
33     "clipboard/clipboard.cc",
34     "clipboard/clipboard.h",
35     "clipboard/clipboard_android.cc",
36     "clipboard/clipboard_android.h",
37     "clipboard/clipboard_constants.cc",
38     "clipboard/clipboard_mac.h",
39     "clipboard/clipboard_mac.mm",
40     "clipboard/clipboard_types.h",
41     "clipboard/clipboard_util_win.cc",
42     "clipboard/clipboard_util_win.h",
43     "clipboard/clipboard_win.cc",
44     "clipboard/clipboard_win.h",
45     "clipboard/custom_data_helper.cc",
46     "clipboard/custom_data_helper.h",
47     "clipboard/custom_data_helper_linux.cc",
48     "clipboard/custom_data_helper_mac.mm",
49     "clipboard/scoped_clipboard_writer.cc",
50     "clipboard/scoped_clipboard_writer.h",
51     "cocoa/animation_utils.h",
52     "cocoa/appkit_utils.h",
53     "cocoa/appkit_utils.mm",
54     "cocoa/base_view.h",
55     "cocoa/base_view.mm",
56     "cocoa/cocoa_base_utils.h",
57     "cocoa/cocoa_base_utils.mm",
58     "cocoa/controls/blue_label_button.h",
59     "cocoa/controls/blue_label_button.mm",
60     "cocoa/controls/hover_image_menu_button.h",
61     "cocoa/controls/hover_image_menu_button.mm",
62     "cocoa/controls/hover_image_menu_button_cell.h",
63     "cocoa/controls/hover_image_menu_button_cell.mm",
64     "cocoa/controls/hyperlink_button_cell.h",
65     "cocoa/controls/hyperlink_button_cell.mm",
66     "cocoa/controls/hyperlink_text_view.h",
67     "cocoa/controls/hyperlink_text_view.mm",
68     "cocoa/find_pasteboard.h",
69     "cocoa/find_pasteboard.mm",
70     "cocoa/flipped_view.h",
71     "cocoa/flipped_view.mm",
72     "cocoa/focus_tracker.h",
73     "cocoa/focus_tracker.mm",
74     "cocoa/focus_window_set.h",
75     "cocoa/focus_window_set.mm",
76     "cocoa/fullscreen_window_manager.h",
77     "cocoa/fullscreen_window_manager.mm",
78     "cocoa/hover_button.h",
79     "cocoa/hover_button.mm",
80     "cocoa/hover_image_button.h",
81     "cocoa/hover_image_button.mm",
82     "cocoa/menu_controller.h",
83     "cocoa/menu_controller.mm",
84     "cocoa/nib_loading.h",
85     "cocoa/nib_loading.mm",
86     "cocoa/nsgraphics_context_additions.h",
87     "cocoa/nsgraphics_context_additions.mm",
88     "cocoa/nsview_additions.h",
89     "cocoa/nsview_additions.mm",
90     "cocoa/remote_layer_api.h",
91     "cocoa/remote_layer_api.mm",
92     "cocoa/three_part_image.h",
93     "cocoa/three_part_image.mm",
94     "cocoa/tracking_area.h",
95     "cocoa/tracking_area.mm",
96     "cocoa/underlay_opengl_hosting_window.h",
97     "cocoa/underlay_opengl_hosting_window.mm",
98     "cocoa/view_description.h",
99     "cocoa/view_description.mm",
100     "cocoa/window_size_constants.h",
101     "cocoa/window_size_constants.mm",
102     "cursor/cursor.cc",
103     "cursor/cursor.h",
104     "cursor/cursor_android.cc",
105     "cursor/cursor_loader.h",
106     "cursor/cursor_util.cc",
107     "cursor/cursor_util.h",
108     "cursor/cursor_win.cc",
109     "cursor/cursors_aura.cc",
110     "cursor/cursors_aura.h",
111     "cursor/image_cursors.cc",
112     "cursor/image_cursors.h",
113     "default_theme_provider.cc",
114     "default_theme_provider.h",
115     "default_theme_provider_mac.mm",
116     "device_form_factor.h",
117     "device_form_factor_android.cc",
118     "device_form_factor_android.h",
119     "device_form_factor_desktop.cc",
120     "device_form_factor_ios.mm",
121     "dragdrop/cocoa_dnd_util.h",
122     "dragdrop/cocoa_dnd_util.mm",
123     "dragdrop/drag_drop_types.h",
124     "dragdrop/drag_drop_types_win.cc",
125     "dragdrop/drag_source_win.cc",
126     "dragdrop/drag_source_win.h",
127     "dragdrop/drag_utils.cc",
128     "dragdrop/drag_utils.h",
129     "dragdrop/drag_utils_aura.cc",
130     "dragdrop/drag_utils_mac.mm",
131     "dragdrop/drag_utils_win.cc",
132     "dragdrop/drop_target_event.cc",
133     "dragdrop/drop_target_event.h",
134     "dragdrop/drop_target_win.cc",
135     "dragdrop/drop_target_win.h",
136     "dragdrop/file_info.cc",
137     "dragdrop/file_info.h",
138     "dragdrop/os_exchange_data.cc",
139     "dragdrop/os_exchange_data.h",
140     "dragdrop/os_exchange_data_provider_mac.h",
141     "dragdrop/os_exchange_data_provider_mac.mm",
142     "dragdrop/os_exchange_data_provider_win.cc",
143     "dragdrop/os_exchange_data_provider_win.h",
144     "font_helper_chromeos.cc",
145     "font_helper_chromeos.h",
146     "hit_test.h",
147     "idle/idle.cc",
148     "idle/idle.h",
149     "idle/idle_chromeos.cc",
150     "idle/idle_linux.cc",
151     "idle/idle_mac.mm",
152     "idle/idle_win.cc",
153     "ios/cru_context_menu_controller.h",
154     "ios/cru_context_menu_controller.mm",
155     "ios/cru_context_menu_holder.h",
156     "ios/cru_context_menu_holder.mm",
157     "l10n/formatter.cc",
158     "l10n/formatter.h",
159     "l10n/l10n_font_util.cc",
160     "l10n/l10n_font_util.h",
161     "l10n/l10n_util.cc",
162     "l10n/l10n_util.h",
163     "l10n/l10n_util_android.cc",
164     "l10n/l10n_util_android.h",
165     "l10n/l10n_util_collator.h",
166     "l10n/l10n_util_mac.h",
167     "l10n/l10n_util_mac.mm",
168     "l10n/l10n_util_plurals.cc",
169     "l10n/l10n_util_plurals.h",
170     "l10n/l10n_util_posix.cc",
171     "l10n/l10n_util_win.cc",
172     "l10n/l10n_util_win.h",
173     "l10n/time_format.cc",
174     "l10n/time_format.h",
175     "layout.cc",
176     "layout.h",
177     "layout_mac.mm",
178     "models/button_menu_item_model.cc",
179     "models/button_menu_item_model.h",
180     "models/combobox_model.cc",
181     "models/combobox_model.h",
182     "models/combobox_model_observer.h",
183     "models/dialog_model.cc",
184     "models/dialog_model.h",
185     "models/list_model.h",
186     "models/list_model_observer.h",
187     "models/list_selection_model.cc",
188     "models/list_selection_model.h",
189     "models/menu_model.cc",
190     "models/menu_model.h",
191     "models/menu_model_delegate.h",
192     "models/menu_separator_types.h",
193     "models/simple_combobox_model.cc",
194     "models/simple_combobox_model.h",
195     "models/simple_menu_model.cc",
196     "models/simple_menu_model.h",
197     "models/table_model.cc",
198     "models/table_model.h",
199     "models/table_model_observer.h",
200     "models/tree_model.cc",
201     "models/tree_model.h",
202     "models/tree_node_iterator.h",
203     "models/tree_node_model.h",
204     "nine_image_painter_factory.cc",
205     "nine_image_painter_factory.h",
206     "page_transition_types.cc",
207     "page_transition_types.h",
208     "resource/data_pack.cc",
209     "resource/data_pack.h",
210     "resource/resource_bundle.cc",
211     "resource/resource_bundle.h",
212     "resource/resource_bundle_android.cc",
213     "resource/resource_bundle_auralinux.cc",
214     "resource/resource_bundle_ios.mm",
215     "resource/resource_bundle_mac.mm",
216     "resource/resource_bundle_win.cc",
217     "resource/resource_bundle_win.h",
218     "resource/resource_data_dll_win.cc",
219     "resource/resource_data_dll_win.h",
220     "resource/resource_handle.h",
221     "text/bytes_formatting.cc",
222     "text/bytes_formatting.h",
223     "theme_provider.cc",
224     "theme_provider.h",
225     "touch/selection_bound.cc",
226     "touch/selection_bound.h",
227     "touch/touch_device.h",
228     "touch/touch_editing_controller.cc",
229     "touch/touch_editing_controller.h",
230     "touch/touch_enabled.cc",
231     "touch/touch_enabled.h",
232     "ui_base_export.h",
233     "ui_base_exports.cc",
234     "ui_base_paths.cc",
235     "ui_base_paths.h",
236     "ui_base_switches.cc",
237     "ui_base_switches.h",
238     "ui_base_switches_util.cc",
239     "ui_base_switches_util.h",
240     "ui_base_types.cc",
241     "ui_base_types.h",
242     "user_activity/user_activity_detector.cc",
243     "user_activity/user_activity_detector.h",
244     "user_activity/user_activity_observer.h",
245     "view_prop.cc",
246     "view_prop.h",
247     "webui/jstemplate_builder.cc",
248     "webui/jstemplate_builder.h",
249     "webui/web_ui_util.cc",
250     "webui/web_ui_util.h",
251     "win/accessibility_ids_win.h",
252     "win/accessibility_misc_utils.cc",
253     "win/accessibility_misc_utils.h",
254     "win/atl_module.h",
255     "win/foreground_helper.cc",
256     "win/foreground_helper.h",
257     "win/hidden_window.cc",
258     "win/hidden_window.h",
259     "win/hwnd_subclass.cc",
260     "win/hwnd_subclass.h",
261     "win/internal_constants.cc",
262     "win/internal_constants.h",
263     "win/lock_state.cc",
264     "win/lock_state.h",
265     "win/message_box_win.cc",
266     "win/message_box_win.h",
267     "win/mouse_wheel_util.cc",
268     "win/mouse_wheel_util.h",
269     "win/open_file_name_win.cc",
270     "win/open_file_name_win.h",
271     "win/scoped_ole_initializer.cc",
272     "win/scoped_ole_initializer.h",
273     "win/shell.cc",
274     "win/shell.h",
275     "win/touch_input.cc",
276     "win/touch_input.h",
277     "win/window_event_target.cc",
278     "win/window_event_target.h",
279     "window_open_disposition.cc",
280     "window_open_disposition.h",
281     "work_area_watcher_observer.h",
282   ]
284   if (is_win) {
285     sources += [ "touch/touch_device_win.cc" ]
286   } else if (is_android) {
287     sources += [ "touch/touch_device_android.cc" ]
288   } else if (is_linux) {
289     sources += [ "touch/touch_device_linux.cc" ]
290   } else {
291     # Empty implementation for all other cases.
292     sources += [ "touch/touch_device.cc" ]
293   }
295   # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
296   configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
298   defines = [ "UI_BASE_IMPLEMENTATION" ]
300   public_deps = [
301     "//base",
302     "//skia",
303     "//ui/events/platform",
304     "//ui/events:events_base",
305     "//ui/gfx",
306     "//ui/gfx/geometry",
307   ]
308   deps = [
309     "//base/third_party/dynamic_annotations",
310     "//base:base_static",
311     "//base:i18n",
312     "//net",
313     "//third_party/icu",
314     "//ui/events",
315     "//ui/events/devices",
316     "//ui/resources",
317     "//ui/strings",
318     "//url",
319   ]
321   if (is_ios) {
322     sources += [
323       "l10n/l10n_util_mac.h",
324       "l10n/l10n_util_mac.mm",
325     ]
326   }
328   if (toolkit_views) {
329     deps += [ "//ui/events" ]
330   }
332   if (use_x11 && use_aura) {
333     sources += [
334       "x/selection_owner.cc",
335       "x/selection_owner.h",
336       "x/selection_requestor.cc",
337       "x/selection_requestor.h",
338       "x/selection_utils.cc",
339       "x/selection_utils.h",
340     ]
341   }
343   if (use_aura) {
344     deps += [ "//ui/events" ]
345   } else {
346     sources -= [
347       "cursor/cursor.cc",
348       "cursor/cursor.h",
349       "dragdrop/drag_utils_aura.cc",
350     ]
351   }
352   if (use_x11) {
353     sources += [
354       "x/x11_foreign_window_manager.cc",
355       "x/x11_foreign_window_manager.h",
356       "x/x11_menu_list.cc",
357       "x/x11_menu_list.h",
358       "x/x11_util.cc",
359       "x/x11_util.h",
360       "x/x11_util_internal.h",
361     ]
362     if (!is_chromeos) {
363       sources += [
364         "idle/idle_query_x11.cc",
365         "idle/idle_query_x11.h",
366         "idle/screensaver_window_finder_x11.cc",
367         "idle/screensaver_window_finder_x11.h",
368       ]
369       configs += [ "//build/config/linux:xscrnsaver" ]
370     }
371     deps += [ "//ui/gfx/x" ]
372   }
374   if (!use_aura || !is_linux) {
375     sources -= [ "resource/resource_bundle_auralinux.cc" ]
376   }
378   if (use_aura && is_win) {
379     sources -= [ "dragdrop/drag_utils_aura.cc" ]
380   }
382   if (is_linux) {
383     configs += [
384       "//build/config/linux:fontconfig",
385       "//build/config/linux:glib",
386     ]
387   }
389   if ((is_linux && !is_chromeos) || is_chromeos) {
390     if (!toolkit_views && !use_aura) {
391       sources -= [
392         "dragdrop/drag_utils.cc",
393         "dragdrop/drag_utils.h",
394       ]
395     }
396   }
398   if (is_chromeos) {
399     deps += [ "//chromeos" ]
400     sources -= [ "idle/idle_linux.cc" ]
401   }
403   if (is_chromeos || (use_aura && is_linux && !use_x11)) {
404     sources += [
405       "dragdrop/os_exchange_data_provider_aura.cc",
406       "dragdrop/os_exchange_data_provider_aura.h",
407     ]
408   }
410   libs = []
411   if (is_win) {
412     sources += [
413       "cursor/cursor_loader_win.cc",
414       "cursor/cursor_loader_win.h",
415     ]
416     deps += [ "//third_party/wtl" ]
417     cflags = [ "/wd4324" ]  # Structure was padded due to __declspec(align()), which is
418                             # uninteresting.
420     ldflags = [
421       "/DELAYLOAD:d2d1.dll",
422       "/DELAYLOAD:d3d10_1.dll",
423       "/DELAYLOAD:dwmapi.dll",
424     ]
425     libs += [
426       "d2d1.lib",
427       "d3d10_1.lib",
428       "dwmapi.lib",
429       "d2d1.lib",
430       "dwmapi.lib",
431       "oleacc.lib",
432     ]
433   } else {
434     if (!use_aura) {
435       sources -= [
436         "view_prop.cc",
437         "view_prop.h",
438       ]
439     }
440   }
442   if (is_mac) {
443     deps += [ "//third_party/mozilla" ]
445     sources -= [
446       "cursor/image_cursors.cc",
447       "cursor/image_cursors.h",
448       "dragdrop/drag_utils.cc",
449       "dragdrop/drag_utils.h",
450     ]
452     libs += [
453       "Accelerate.framework",
454       "AudioUnit.framework",
455       "CoreVideo.framework",
456     ]
457   }
459   if (use_x11) {
460     #'all_dependent_settings': {
461     #'ldflags': [
462     #'-L<(PRODUCT_DIR)',
463     #],
464     #},
465     configs += [ "//build/config/linux:x11" ]
466   }
468   if (use_aura) {
469     if (use_x11) {
470       sources += [
471         "cursor/cursor_loader_x11.cc",
472         "cursor/cursor_loader_x11.h",
473         "cursor/cursor_x11.cc",
474       ]
475       if (!is_chromeos) {
476         # These Aura X11 files aren't used on ChromeOS.
477         sources += [
478           "dragdrop/os_exchange_data_provider_aurax11.cc",
479           "dragdrop/os_exchange_data_provider_aurax11.h",
480         ]
481       }
482     }
483   }
484   if (use_ozone) {
485     sources += [
486       "cursor/cursor_loader_ozone.cc",
487       "cursor/cursor_loader_ozone.h",
488       "cursor/cursor_ozone.cc",
489       "cursor/ozone/bitmap_cursor_factory_ozone.cc",
490       "cursor/ozone/bitmap_cursor_factory_ozone.h",
491     ]
493     deps += [
494       "//ui/events/ozone:events_ozone_layout",
495       "//ui/ozone:ozone_base",
496     ]
497   }
499   if (!toolkit_views) {
500     sources -= [
501       "dragdrop/drag_drop_types.h",
502       "dragdrop/drop_target_event.cc",
503       "dragdrop/drop_target_event.h",
504     ]
505   }
507   if (!toolkit_views && !use_aura) {
508     sources -= [
509       "dragdrop/os_exchange_data.cc",
510       "dragdrop/os_exchange_data.h",
511       "nine_image_painter_factory.cc",
512       "nine_image_painter_factory.h",
513     ]
514   }
516   if (is_android) {
517     sources -= [
518       "cursor/image_cursors.cc",
519       "cursor/image_cursors.h",
520       "default_theme_provider.cc",
521       "dragdrop/drag_utils.cc",
522       "dragdrop/drag_utils.h",
523       "l10n/l10n_font_util.cc",
524       "models/button_menu_item_model.cc",
525       "models/dialog_model.cc",
526       "theme_provider.cc",
527       "touch/touch_editing_controller.cc",
528       "ui_base_types.cc",
529     ]
531     deps += [
532       "//cc",
533       ":ui_base_jni_headers",
534       "//ui/android:ui_java",
535     ]
537     libs += [ "jnigraphics" ]
538   }
540   if (is_android && !use_aura) {
541     sources -= [ "cursor/cursor_android.cc" ]
542   }
544   # Aura clipboard.
545   if (use_aura) {
546     if (use_x11) {
547       sources += [ "clipboard/clipboard_aurax11.cc" ]
548     } else if (!is_win) {
549       # This file is used for all non-X11, non-Windows aura Builds.
550       sources += [ "clipboard/clipboard_aura.cc" ]
551     }
552   }
554   if (is_android || is_ios) {
555     sources -= [
556       "device_form_factor_desktop.cc",
557       "idle/idle.cc",
558       "idle/idle.h",
559     ]
560   }
563 source_set("test_support") {
564   testonly = true
565   sources = [
566     "test/test_clipboard.cc",
567     "test/test_clipboard.h",
568     "test/ui_controls.h",
569     "test/ui_controls_aura.cc",
570     "test/ui_controls_internal_win.cc",
571     "test/ui_controls_internal_win.h",
572     "test/ui_controls_mac.mm",
573     "test/ui_controls_win.cc",
574   ]
576   public_deps = [
577     ":base",
578   ]
579   deps = [
580     "//base",
581     "//skia",
582     "//testing/gtest",
583     "//ui/events:events_base",
584     "//ui/gfx",
585     "//ui/gfx/geometry",
586   ]
588   if (build_ime) {
589     sources += [
590       "ime/dummy_input_method.cc",
591       "ime/dummy_input_method.h",
592       "ime/dummy_text_input_client.cc",
593       "ime/dummy_text_input_client.h",
594     ]
596     deps += [ "//ui/base/ime" ]
597   }
599   if (!use_aura) {
600     sources -= [ "test/ui_controls_aura.cc" ]
601   } else if (is_win) {
602     sources -= [ "test/ui_controls_win.cc" ]
603   }
606 if (is_android) {
607   generate_jni("ui_base_jni_headers") {
608     sources = [
609       "../android/java/src/org/chromium/ui/base/Clipboard.java",
610       "../android/java/src/org/chromium/ui/base/DeviceFormFactor.java",
611       "../android/java/src/org/chromium/ui/base/LocalizationUtils.java",
612       "../android/java/src/org/chromium/ui/base/ResourceBundle.java",
613       "../android/java/src/org/chromium/ui/base/SelectFileDialog.java",
614       "../android/java/src/org/chromium/ui/base/TouchDevice.java",
615     ]
616     jni_package = "base"
617   }
620 # GYP version: ui/base/ui_base_tests.gyp:ui_base_unittests
621 test("ui_base_unittests") {
622   sources = [
623     "ios/cru_context_menu_controller_unittest.mm",
624     "l10n/l10n_util_mac_unittest.mm",
625     "l10n/l10n_util_unittest.cc",
626     "l10n/l10n_util_win_unittest.cc",
627     "l10n/time_format_unittest.cc",
628     "layout_unittest.cc",
629     "models/tree_node_iterator_unittest.cc",
630     "resource/data_pack_literal.cc",
631     "resource/data_pack_unittest.cc",
632     "resource/resource_bundle_unittest.cc",
633     "test/run_all_unittests.cc",
634     "test/test_clipboard_unittest.cc",
635     "user_activity/user_activity_detector_unittest.cc",
636   ]
638   if (is_android) {
639     sources -= [ "user_activity/user_activity_detector_unittest.cc" ]
640   }
642   if (is_ios) {
643     # Compile this Mac file on iOS as well.
644     set_sources_assignment_filter([])
645     sources += [ "l10n/l10n_util_mac_unittest.mm" ]
646     set_sources_assignment_filter(sources_assignment_filter)
647   } else {  # !is_ios
648     sources += [
649       "accelerators/accelerator_manager_unittest.cc",
650       "accelerators/menu_label_accelerator_util_linux_unittest.cc",
651       "clipboard/custom_data_helper_unittest.cc",
652       "cocoa/base_view_unittest.mm",
653       "cocoa/cocoa_base_utils_unittest.mm",
654       "cocoa/controls/blue_label_button_unittest.mm",
655       "cocoa/controls/hover_image_menu_button_unittest.mm",
656       "cocoa/controls/hyperlink_button_cell_unittest.mm",
657       "cocoa/controls/hyperlink_text_view_unittest.mm",
658       "cocoa/focus_tracker_unittest.mm",
659       "cocoa/fullscreen_window_manager_unittest.mm",
660       "cocoa/hover_image_button_unittest.mm",
661       "cocoa/menu_controller_unittest.mm",
662       "cocoa/nsgraphics_context_additions_unittest.mm",
663       "cocoa/nsview_additions_unittest.mm",
664       "cocoa/three_part_image_unittest.mm",
665       "cocoa/tracking_area_unittest.mm",
666       "models/list_model_unittest.cc",
667       "models/list_selection_model_unittest.cc",
668       "models/tree_node_model_unittest.cc",
669       "test/data/resource.h",
670       "text/bytes_formatting_unittest.cc",
671       "touch/selection_bound_unittest.cc",
672       "view_prop_unittest.cc",
673       "webui/web_ui_util_unittest.cc",
674     ]
675   }
677   if (build_ime) {
678     sources += [
679       "ime/candidate_window_unittest.cc",
680       "ime/chromeos/character_composer_unittest.cc",
681       "ime/input_method_base_unittest.cc",
682       "ime/input_method_chromeos_unittest.cc",
683       "ime/remote_input_method_win_unittest.cc",
684       "ime/win/imm32_manager_unittest.cc",
685       "ime/win/tsf_input_scope_unittest.cc",
686     ]
687     if (is_linux && use_aura && !is_chromeos) {
688       sources += [ "ime/input_method_auralinux_unittest.cc" ]
689     }
690     if (use_x11) {
691       sources += [ "ime/composition_text_util_pango_unittest.cc" ]
692     }
693     if (!use_x11 && is_chromeos) {
694       # These were already removed in the non-chromeos case.
695       sources -= [
696         "ime/chromeos/character_composer_unittest.cc",
697         "ime/input_method_chromeos_unittest.cc",
698       ]
699     }
700   }
702   # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
703   configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
705   deps = [
706     "//base",
707     "//base/allocator",
708     "//base/test:test_support",
709     "//net",
710     "//skia",
711     "//testing/gmock",
712     "//testing/gtest",
713     "//third_party/icu",
714     "//ui/base",
715     "//ui/base:test_support",
716     "//ui/events:events_base",
717     "//ui/events:test_support",
718     "//ui/gfx:test_support",
719     "//ui/resources",
720     "//ui/resources:ui_test_pak",
721     "//ui/strings",
722     "//url",
723   ]
725   if (is_ios) {
726     # TODO(GYP) lots of iOS-only steps for ui_base_unittests
727   }
729   if (build_ime) {
730     deps += [ "//ui/base/ime" ]
731   }
733   if (is_win) {
734     sources += [
735       "dragdrop/os_exchange_data_win_unittest.cc",
736       "win/hwnd_subclass_unittest.cc",
737       "win/open_file_name_win_unittest.cc",
738     ]
740     ldflags = [
741       "/DELAYLOAD:d2d1.dll",
742       "/DELAYLOAD:d3d10_1.dll",
743     ]
744     libs = [
745       "d2d1.lib",
746       "d3d10_1.lib",
747       "imm32.lib",
748       "oleacc.lib",
749     ]
750   }
752   if (!is_win || !use_aura) {
753     sources -= [ "view_prop_unittest.cc" ]
754   }
756   if (is_android) {
757     apk_deps = [ "//chrome:resources" ]
758   }
760   if (use_pango) {
761     configs += [ "//build/config/linux:pangocairo" ]
762   }
764   if (use_x11) {
765     sources += [ "cursor/cursor_loader_x11_unittest.cc" ]
767     configs += [ "//build/config/linux:x11" ]
769     deps += [
770       "//ui/events/platform/x11",
771       "//ui/gfx/x",
772     ]
774     datadeps = [
775       "//tools/xdisplaycheck",
776     ]
777   }
779   if (is_mac) {
780     deps += [
781       "//third_party/mozilla",
782       #'ui_base_tests_bundle',  TODO(GYP)
783     ]
784   }
786   if (use_aura || toolkit_views) {
787     sources += [ "dragdrop/os_exchange_data_unittest.cc" ]
789     deps += [
790       "//ui/events",
791       "//ui/events/platform",
792     ]
793   }
795   if (use_x11 && !is_chromeos) {
796     sources += [
797       "dragdrop/os_exchange_data_provider_aurax11_unittest.cc",
798       "x/selection_requestor_unittest.cc",
799     ]
800   }
802   if (is_chromeos) {
803     deps += [
804       "//chromeos",
805       "//ui/events:dom4_keycode_converter",
806     ]
807   }
809 # TODO(GYP) Mac (ui_base_tests_bundle)