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/features.gni")
6 import("//build/config/ui.gni")
7 import("//testing/test.gni")
9 component("message_center") {
13 "//base/third_party/dynamic_annotations",
27 "//build/config:precompiled_headers",
29 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
30 "//build/config/compiler:no_size_t_to_int_warning",
33 defines = [ "MESSAGE_CENTER_IMPLEMENTATION" ]
35 if (enable_notifications && !is_android) {
37 "cocoa/notification_controller.h",
38 "cocoa/notification_controller.mm",
39 "cocoa/opaque_views.h",
40 "cocoa/opaque_views.mm",
41 "cocoa/popup_collection.h",
42 "cocoa/popup_collection.mm",
43 "cocoa/popup_controller.h",
44 "cocoa/popup_controller.mm",
45 "cocoa/settings_controller.h",
46 "cocoa/settings_controller.mm",
47 "cocoa/settings_entry_view.h",
48 "cocoa/settings_entry_view.mm",
49 "cocoa/status_item_view.h",
50 "cocoa/status_item_view.mm",
51 "cocoa/tray_controller.h",
52 "cocoa/tray_controller.mm",
53 "cocoa/tray_view_controller.h",
54 "cocoa/tray_view_controller.mm",
57 "message_center_export.h",
58 "message_center_impl.cc",
59 "message_center_impl.h",
60 "message_center_observer.h",
61 "message_center_style.cc",
62 "message_center_style.h",
63 "message_center_switches.cc",
64 "message_center_switches.h",
65 "message_center_tray.cc",
66 "message_center_tray.h",
67 "message_center_tray_delegate.h",
68 "message_center_types.h",
71 "notification_blocker.cc",
72 "notification_blocker.h",
73 "notification_delegate.cc",
74 "notification_delegate.h",
75 "notification_list.cc",
76 "notification_list.h",
77 "notification_types.cc",
78 "notification_types.h",
79 "notifier_settings.cc",
80 "notifier_settings.h",
84 deps += [ "//ui/aura" ]
87 # On Mac, toolkit-views builds still use the Cocoa UI. Keep this in sync
88 # with message_center_unittests below.
89 if (toolkit_views && !is_mac) {
91 "views/bounded_label.cc",
92 "views/bounded_label.h",
94 "views/desktop_popup_alignment_delegate.cc",
95 "views/desktop_popup_alignment_delegate.h",
96 "views/message_center_button_bar.cc",
97 "views/message_center_button_bar.h",
98 "views/message_center_controller.h",
99 "views/message_center_view.cc",
100 "views/message_center_view.h",
101 "views/message_list_view.cc",
102 "views/message_list_view.h",
103 "views/message_popup_collection.cc",
104 "views/message_popup_collection.h",
105 "views/message_view.cc",
106 "views/message_view.h",
107 "views/message_view_context_menu_controller.cc",
108 "views/message_view_context_menu_controller.h",
109 "views/notification_button.cc",
110 "views/notification_button.h",
111 "views/notification_view.cc",
112 "views/notification_view.h",
113 "views/notifier_settings_view.cc",
114 "views/notifier_settings_view.h",
115 "views/padded_button.cc",
116 "views/padded_button.h",
117 "views/popup_alignment_delegate.cc",
118 "views/popup_alignment_delegate.h",
119 "views/proportional_image_view.cc",
120 "views/proportional_image_view.h",
121 "views/toast_contents_view.cc",
122 "views/toast_contents_view.h",
133 "views/message_bubble_base.cc",
134 "views/message_bubble_base.h",
135 "views/message_center_bubble.cc",
136 "views/message_center_bubble.h",
140 # Notification service disabled.
142 "dummy_message_center.cc",
143 "notification_delegate.cc",
144 "notification_delegate.h",
147 # Android implements its own notification UI manager instead of deferring to
148 # the message center (when notifications are enabled). Include a minimal
149 # set of files required for notifications on Android.
154 "notifier_settings.cc",
155 "notifier_settings.h",
161 static_library("test_support") {
164 "fake_message_center.cc",
165 "fake_message_center.h",
166 "fake_message_center_tray_delegate.cc",
167 "fake_message_center_tray_delegate.h",
168 "fake_notifier_settings_provider.cc",
169 "fake_notifier_settings_provider.h",
178 "//base/test:test_support",
185 test("message_center_unittests") {
187 "test/run_all_unittests.cc",
195 "//base/test:test_support",
203 "//ui/gl:test_support",
205 "//ui/resources:ui_test_pak",
209 if (enable_notifications && !is_android) {
211 "cocoa/notification_controller_unittest.mm",
212 "cocoa/popup_collection_unittest.mm",
213 "cocoa/popup_controller_unittest.mm",
214 "cocoa/settings_controller_unittest.mm",
215 "cocoa/status_item_view_unittest.mm",
216 "cocoa/tray_controller_unittest.mm",
217 "cocoa/tray_view_controller_unittest.mm",
218 "message_center_impl_unittest.cc",
219 "message_center_tray_unittest.cc",
220 "notification_delegate_unittest.cc",
221 "notification_list_unittest.cc",
225 deps += [ "//ui/gfx:test_support" ]
228 if (toolkit_views && !is_mac) {
230 "views/bounded_label_unittest.cc",
231 "views/message_center_view_unittest.cc",
232 "views/message_popup_collection_unittest.cc",
233 "views/notification_view_unittest.cc",
234 "views/notifier_settings_view_unittest.cc",
237 # Compositor is needed by message_center_view_unittest.cc and for the
238 # fonts used by bounded_label_unittest.cc.
241 "//ui/views:test_support",
244 } # enable_notifications && !is_android