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",
57 "message_center_switches.h",
58 "message_center_switches.cc",
61 "notification_blocker.cc",
62 "notification_blocker.h",
63 "notification_list.cc",
64 "notification_list.h",
65 "notification_types.cc",
66 "notification_types.h",
67 "notifier_settings.cc",
68 "notifier_settings.h",
72 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
73 cflags = [ "/wd4267" ]
74 deps += [ "//ui/aura" ]
79 "views/bounded_label.cc",
80 "views/bounded_label.h",
82 "views/desktop_popup_alignment_delegate.cc",
83 "views/desktop_popup_alignment_delegate.h",
84 "views/message_center_controller.h",
85 "views/message_center_button_bar.cc",
86 "views/message_center_button_bar.h",
87 "views/message_center_view.cc",
88 "views/message_center_view.h",
89 "views/message_popup_collection.cc",
90 "views/message_popup_collection.h",
91 "views/message_view.cc",
92 "views/message_view.h",
93 "views/message_view_context_menu_controller.cc",
94 "views/message_view_context_menu_controller.h",
95 "views/notifier_settings_view.cc",
96 "views/notifier_settings_view.h",
97 "views/notification_button.cc",
98 "views/notification_button.h",
99 "views/notification_view.cc",
100 "views/notification_view.h",
101 "views/padded_button.cc",
102 "views/padded_button.h",
103 "views/popup_alignment_delegate.cc",
104 "views/popup_alignment_delegate.h",
105 "views/proportional_image_view.cc",
106 "views/proportional_image_view.h",
107 "views/toast_contents_view.cc",
108 "views/toast_contents_view.h",
119 "views/message_bubble_base.cc",
120 "views/message_bubble_base.h",
121 "views/message_center_bubble.cc",
122 "views/message_center_bubble.h",
127 # Notification service disabled.
129 "dummy_message_center.cc",
130 "notification_delegate.cc",
131 "notification_delegate.h",
133 # Android implements its own notification UI manager instead of deferring to
134 # the message center (when notifications are enabled). Include a minimal
135 # set of files required for notifications on Android.
140 "notifier_settings.cc",
141 "notifier_settings.h",
147 static_library("test_support") {
149 "fake_message_center.h",
150 "fake_message_center.cc",
151 "fake_message_center_tray_delegate.h",
152 "fake_message_center_tray_delegate.cc",
153 "fake_notifier_settings_provider.h",
154 "fake_notifier_settings_provider.cc",
160 "//base/test:test_support",
167 test("message_center_unittests") {
169 "test/run_all_unittests.cc",
177 "//base/test:test_support",
184 "//ui/resources:ui_test_pak",
188 if (enable_notifications) {
190 "cocoa/notification_controller_unittest.mm",
191 "cocoa/popup_collection_unittest.mm",
192 "cocoa/popup_controller_unittest.mm",
193 "cocoa/settings_controller_unittest.mm",
194 "cocoa/status_item_view_unittest.mm",
195 "cocoa/tray_controller_unittest.mm",
196 "cocoa/tray_view_controller_unittest.mm",
197 "message_center_tray_unittest.cc",
198 "message_center_impl_unittest.cc",
199 "notification_delegate_unittest.cc",
200 "notification_list_unittest.cc",
204 deps += [ "//ui/gfx:test_support" ]
209 "views/bounded_label_unittest.cc",
210 "views/message_center_view_unittest.cc",
211 "views/message_popup_collection_unittest.cc",
212 "views/notification_view_unittest.cc",
213 "views/notifier_settings_view_unittest.cc",
216 # Compositor is needed by message_center_view_unittest.cc and for the
217 # fonts used by bounded_label_unittest.cc.
220 "//ui/views:test_support",
223 } # enable_notifications