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",
14 "//components/url_formatter",
28 "//build/config:precompiled_headers",
30 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
31 "//build/config/compiler:no_size_t_to_int_warning",
34 defines = [ "MESSAGE_CENTER_IMPLEMENTATION" ]
36 if (enable_notifications && !is_android) {
38 "cocoa/notification_controller.h",
39 "cocoa/notification_controller.mm",
40 "cocoa/opaque_views.h",
41 "cocoa/opaque_views.mm",
42 "cocoa/popup_collection.h",
43 "cocoa/popup_collection.mm",
44 "cocoa/popup_controller.h",
45 "cocoa/popup_controller.mm",
46 "cocoa/settings_controller.h",
47 "cocoa/settings_controller.mm",
48 "cocoa/settings_entry_view.h",
49 "cocoa/settings_entry_view.mm",
50 "cocoa/status_item_view.h",
51 "cocoa/status_item_view.mm",
52 "cocoa/tray_controller.h",
53 "cocoa/tray_controller.mm",
54 "cocoa/tray_view_controller.h",
55 "cocoa/tray_view_controller.mm",
58 "message_center_export.h",
59 "message_center_impl.cc",
60 "message_center_impl.h",
61 "message_center_observer.h",
62 "message_center_style.cc",
63 "message_center_style.h",
64 "message_center_switches.cc",
65 "message_center_switches.h",
66 "message_center_tray.cc",
67 "message_center_tray.h",
68 "message_center_tray_delegate.h",
69 "message_center_types.h",
72 "notification_blocker.cc",
73 "notification_blocker.h",
74 "notification_delegate.cc",
75 "notification_delegate.h",
76 "notification_list.cc",
77 "notification_list.h",
78 "notification_types.cc",
79 "notification_types.h",
80 "notifier_settings.cc",
81 "notifier_settings.h",
85 deps += [ "//ui/aura" ]
88 # On Mac, toolkit-views builds still use the Cocoa UI. Keep this in sync
89 # with message_center_unittests below.
90 if (toolkit_views && !is_mac) {
92 "views/bounded_label.cc",
93 "views/bounded_label.h",
95 "views/desktop_popup_alignment_delegate.cc",
96 "views/desktop_popup_alignment_delegate.h",
97 "views/message_center_button_bar.cc",
98 "views/message_center_button_bar.h",
99 "views/message_center_controller.h",
100 "views/message_center_view.cc",
101 "views/message_center_view.h",
102 "views/message_list_view.cc",
103 "views/message_list_view.h",
104 "views/message_popup_collection.cc",
105 "views/message_popup_collection.h",
106 "views/message_view.cc",
107 "views/message_view.h",
108 "views/message_view_context_menu_controller.cc",
109 "views/message_view_context_menu_controller.h",
110 "views/notification_button.cc",
111 "views/notification_button.h",
112 "views/notification_view.cc",
113 "views/notification_view.h",
114 "views/notifier_settings_view.cc",
115 "views/notifier_settings_view.h",
116 "views/padded_button.cc",
117 "views/padded_button.h",
118 "views/popup_alignment_delegate.cc",
119 "views/popup_alignment_delegate.h",
120 "views/proportional_image_view.cc",
121 "views/proportional_image_view.h",
122 "views/toast_contents_view.cc",
123 "views/toast_contents_view.h",
134 "views/message_bubble_base.cc",
135 "views/message_bubble_base.h",
136 "views/message_center_bubble.cc",
137 "views/message_center_bubble.h",
141 # Notification service disabled.
143 "dummy_message_center.cc",
144 "notification_delegate.cc",
145 "notification_delegate.h",
148 # Android implements its own notification UI manager instead of deferring to
149 # the message center (when notifications are enabled). Include a minimal
150 # set of files required for notifications on Android.
155 "notifier_settings.cc",
156 "notifier_settings.h",
162 static_library("test_support") {
165 "fake_message_center.cc",
166 "fake_message_center.h",
167 "fake_message_center_tray_delegate.cc",
168 "fake_message_center_tray_delegate.h",
169 "fake_notifier_settings_provider.cc",
170 "fake_notifier_settings_provider.h",
179 "//base/test:test_support",
186 test("message_center_unittests") {
188 "test/run_all_unittests.cc",
196 "//base/test:test_support",
204 "//ui/gl:test_support",
206 "//ui/resources:ui_test_pak",
210 if (enable_notifications && !is_android) {
212 "cocoa/notification_controller_unittest.mm",
213 "cocoa/popup_collection_unittest.mm",
214 "cocoa/popup_controller_unittest.mm",
215 "cocoa/settings_controller_unittest.mm",
216 "cocoa/status_item_view_unittest.mm",
217 "cocoa/tray_controller_unittest.mm",
218 "cocoa/tray_view_controller_unittest.mm",
219 "message_center_impl_unittest.cc",
220 "message_center_tray_unittest.cc",
221 "notification_delegate_unittest.cc",
222 "notification_list_unittest.cc",
226 deps += [ "//ui/gfx:test_support" ]
229 if (toolkit_views && !is_mac) {
231 "views/bounded_label_unittest.cc",
232 "views/message_center_view_unittest.cc",
233 "views/message_popup_collection_unittest.cc",
234 "views/notification_view_unittest.cc",
235 "views/notifier_settings_view_unittest.cc",
238 # Compositor is needed by message_center_view_unittest.cc and for the
239 # fonts used by bounded_label_unittest.cc.
242 "//ui/views:test_support",
245 } # enable_notifications && !is_android