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")
8 component("message_center") {
9 defines = [ "MESSAGE_CENTER_IMPLEMENTATION" ]
14 "//base/third_party/dynamic_annotations",
23 if (enable_notifications) {
25 "cocoa/notification_controller.h",
26 "cocoa/notification_controller.mm",
27 "cocoa/opaque_views.h",
28 "cocoa/opaque_views.mm",
29 "cocoa/popup_collection.h",
30 "cocoa/popup_collection.mm",
31 "cocoa/popup_controller.h",
32 "cocoa/popup_controller.mm",
33 "cocoa/settings_controller.h",
34 "cocoa/settings_controller.mm",
35 "cocoa/settings_entry_view.h",
36 "cocoa/settings_entry_view.mm",
37 "cocoa/status_item_view.h",
38 "cocoa/status_item_view.mm",
39 "cocoa/tray_controller.h",
40 "cocoa/tray_controller.mm",
41 "cocoa/tray_view_controller.h",
42 "cocoa/tray_view_controller.mm",
45 "message_center_export.h",
46 "notification_delegate.cc",
47 "notification_delegate.h",
48 "message_center_impl.cc",
49 "message_center_impl.h",
50 "message_center_observer.h",
51 "message_center_style.cc",
52 "message_center_style.h",
53 "message_center_tray.cc",
54 "message_center_tray.h",
55 "message_center_tray_delegate.h",
56 "message_center_types.h",
59 "notification_blocker.cc",
60 "notification_blocker.h",
61 "notification_list.cc",
62 "notification_list.h",
63 "notification_types.cc",
64 "notification_types.h",
65 "notifier_settings.cc",
66 "notifier_settings.h",
70 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
71 cflags = [ "/wd4267" ]
72 deps += [ "//ui/aura" ]
77 "views/bounded_label.cc",
78 "views/bounded_label.h",
80 "views/desktop_popup_alignment_delegate.cc",
81 "views/desktop_popup_alignment_delegate.h",
82 "views/message_center_controller.h",
83 "views/message_center_button_bar.cc",
84 "views/message_center_button_bar.h",
85 "views/message_center_view.cc",
86 "views/message_center_view.h",
87 "views/message_popup_collection.cc",
88 "views/message_popup_collection.h",
89 "views/message_view.cc",
90 "views/message_view.h",
91 "views/message_view_context_menu_controller.cc",
92 "views/message_view_context_menu_controller.h",
93 "views/notifier_settings_view.cc",
94 "views/notifier_settings_view.h",
95 "views/notification_button.cc",
96 "views/notification_button.h",
97 "views/notification_view.cc",
98 "views/notification_view.h",
99 "views/padded_button.cc",
100 "views/padded_button.h",
101 "views/popup_alignment_delegate.cc",
102 "views/popup_alignment_delegate.h",
103 "views/proportional_image_view.cc",
104 "views/proportional_image_view.h",
105 "views/toast_contents_view.cc",
106 "views/toast_contents_view.h",
117 "views/message_bubble_base.cc",
118 "views/message_bubble_base.h",
119 "views/message_center_bubble.cc",
120 "views/message_center_bubble.h",
125 # Notification service disabled.
127 "dummy_message_center.cc",
128 "notification_delegate.cc",
129 "notification_delegate.h",
131 # Android implements its own notification UI manager instead of deferring to
132 # the message center (when notifications are enabled). Include a minimal
133 # set of files required for notifications on Android.
138 "notifier_settings.cc",
139 "notifier_settings.h",
145 static_library("test_support") {
147 "fake_message_center.h",
148 "fake_message_center.cc",
149 "fake_message_center_tray_delegate.h",
150 "fake_message_center_tray_delegate.cc",
151 "fake_notifier_settings_provider.h",
152 "fake_notifier_settings_provider.cc",
158 "//base/test:test_support",
165 test("message_center_unittests") {
167 "test/run_all_unittests.cc",
175 "//base/test:test_support",
182 "//ui/resources:ui_test_pak",
186 if (enable_notifications) {
188 "cocoa/notification_controller_unittest.mm",
189 "cocoa/popup_collection_unittest.mm",
190 "cocoa/popup_controller_unittest.mm",
191 "cocoa/settings_controller_unittest.mm",
192 "cocoa/status_item_view_unittest.mm",
193 "cocoa/tray_controller_unittest.mm",
194 "cocoa/tray_view_controller_unittest.mm",
195 "message_center_tray_unittest.cc",
196 "message_center_impl_unittest.cc",
197 "notification_delegate_unittest.cc",
198 "notification_list_unittest.cc",
202 deps += [ "//ui/gfx:test_support" ]
207 "views/bounded_label_unittest.cc",
208 "views/message_center_view_unittest.cc",
209 "views/message_popup_collection_unittest.cc",
210 "views/notification_view_unittest.cc",
211 "views/notifier_settings_view_unittest.cc",
214 # Compositor is needed by message_center_view_unittest.cc and for the
215 # fonts used by bounded_label_unittest.cc.
218 "//ui/views:test_support",
221 } # enable_notifications