1 # Copyright (c) 2012 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.
11 # GN version: //ui/message_center
12 'target_name': 'message_center',
13 'type': '<(component)',
15 '../../base/base.gyp:base',
16 '../../base/base.gyp:base_i18n',
17 '../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
18 '../../skia/skia.gyp:skia',
19 '../../url/url.gyp:url_lib',
20 '../base/ui_base.gyp:ui_base',
22 '../gfx/gfx.gyp:gfx_geometry',
23 '../resources/ui_resources.gyp:ui_resources',
24 '../strings/ui_strings.gyp:ui_strings',
27 'MESSAGE_CENTER_IMPLEMENTATION',
30 # Note: file list duplicated in GN build.
31 'cocoa/notification_controller.h',
32 'cocoa/notification_controller.mm',
33 'cocoa/opaque_views.h',
34 'cocoa/opaque_views.mm',
35 'cocoa/popup_collection.h',
36 'cocoa/popup_collection.mm',
37 'cocoa/popup_controller.h',
38 'cocoa/popup_controller.mm',
39 'cocoa/settings_controller.h',
40 'cocoa/settings_controller.mm',
41 'cocoa/settings_entry_view.h',
42 'cocoa/settings_entry_view.mm',
43 'cocoa/status_item_view.h',
44 'cocoa/status_item_view.mm',
45 'cocoa/tray_controller.h',
46 'cocoa/tray_controller.mm',
47 'cocoa/tray_view_controller.h',
48 'cocoa/tray_view_controller.mm',
49 'dummy_message_center.cc',
52 'message_center_export.h',
53 'notification_delegate.cc',
54 'notification_delegate.h',
55 'message_center_impl.cc',
56 'message_center_impl.h',
57 'message_center_observer.h',
58 'message_center_style.cc',
59 'message_center_style.h',
60 'message_center_switches.cc',
61 'message_center_switches.h',
62 'message_center_tray.cc',
63 'message_center_tray.h',
64 'message_center_tray_delegate.h',
65 'message_center_types.h',
68 'notification_blocker.cc',
69 'notification_blocker.h',
70 'notification_list.cc',
71 'notification_list.h',
72 'notification_types.cc',
73 'notification_types.h',
74 'notifier_settings.cc',
75 'notifier_settings.h',
76 'views/bounded_label.cc',
77 'views/bounded_label.h',
79 'views/desktop_popup_alignment_delegate.cc',
80 'views/desktop_popup_alignment_delegate.h',
81 'views/message_bubble_base.cc',
82 'views/message_bubble_base.h',
83 'views/message_center_controller.h',
84 'views/message_center_bubble.cc',
85 'views/message_center_bubble.h',
86 'views/message_center_button_bar.cc',
87 'views/message_center_button_bar.h',
88 'views/message_center_view.cc',
89 'views/message_center_view.h',
90 'views/message_popup_collection.cc',
91 'views/message_popup_collection.h',
92 'views/message_view.cc',
93 'views/message_view.h',
94 'views/message_view_context_menu_controller.cc',
95 'views/message_view_context_menu_controller.h',
96 'views/notifier_settings_view.cc',
97 'views/notifier_settings_view.h',
98 'views/notification_button.cc',
99 'views/notification_button.h',
100 'views/notification_view.cc',
101 'views/notification_view.h',
102 'views/padded_button.cc',
103 'views/padded_button.h',
104 'views/popup_alignment_delegate.cc',
105 'views/popup_alignment_delegate.h',
106 'views/proportional_image_view.cc',
107 'views/proportional_image_view.h',
108 'views/toast_contents_view.cc',
109 'views/toast_contents_view.h',
111 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
112 'msvs_disabled_warnings': [ 4267, ],
114 # This condition is for Windows 8 Metro mode support. We need to
115 # specify a particular desktop during widget creation in that case.
116 # This is done using the desktop aura native widget framework.
119 '../aura/aura.gyp:aura',
122 ['toolkit_views==1', {
124 '../events/events.gyp:events',
125 '../views/views.gyp:views',
126 '../compositor/compositor.gyp:compositor',
130 ['exclude', 'views/'],
135 'views/message_bubble_base.cc',
136 'views/message_bubble_base.h',
137 'views/message_center_bubble.cc',
138 'views/message_center_bubble.h',
141 # iOS disables notifications altogether, Android implements its own
142 # notification UI manager instead of deferring to the message center.
143 ['notifications==0 or OS=="android"', {
145 # Exclude everything except dummy impl.
146 ['exclude', '\\.(cc|mm)$'],
147 ['include', '^dummy_message_center\\.cc$'],
148 ['include', '^notification_delegate\\.cc$'],
150 }, { # notifications==1
151 'sources!': [ 'dummy_message_center.cc' ],
153 # Include a minimal set of files required for notifications on Android.
156 ['include', '^notification\\.cc$'],
157 ['include', '^notifier_settings\\.cc$'],
161 }, # target_name: message_center
163 # GN version: //ui/message_center:test_support
164 'target_name': 'message_center_test_support',
165 'type': 'static_library',
167 '../../base/base.gyp:base',
168 '../../base/base.gyp:test_support_base',
169 '../../skia/skia.gyp:skia',
170 '../base/ui_base.gyp:ui_base',
171 '../gfx/gfx.gyp:gfx',
172 '../gfx/gfx.gyp:gfx_geometry',
176 # Note: sources list duplicated in GN build.
177 'fake_message_center.h',
178 'fake_message_center.cc',
179 'fake_message_center_tray_delegate.h',
180 'fake_message_center_tray_delegate.cc',
181 'fake_notifier_settings_provider.h',
182 'fake_notifier_settings_provider.cc',
184 }, # target_name: message_center_test_support
186 # GN version: //ui/message_center:message_center_unittests
187 'target_name': 'message_center_unittests',
188 'type': 'executable',
190 '../../base/base.gyp:base',
191 '../../base/base.gyp:test_support_base',
192 '../../skia/skia.gyp:skia',
193 '../../testing/gtest.gyp:gtest',
194 '../../url/url.gyp:url_lib',
195 '../base/ui_base.gyp:ui_base',
196 '../gfx/gfx.gyp:gfx',
197 '../gfx/gfx.gyp:gfx_geometry',
198 '../resources/ui_resources.gyp:ui_resources',
199 '../resources/ui_resources.gyp:ui_test_pak',
201 'message_center_test_support',
204 # Note: file list duplicated in GN build.
205 'cocoa/notification_controller_unittest.mm',
206 'cocoa/popup_collection_unittest.mm',
207 'cocoa/popup_controller_unittest.mm',
208 'cocoa/settings_controller_unittest.mm',
209 'cocoa/status_item_view_unittest.mm',
210 'cocoa/tray_controller_unittest.mm',
211 'cocoa/tray_view_controller_unittest.mm',
212 'message_center_tray_unittest.cc',
213 'message_center_impl_unittest.cc',
214 'notification_delegate_unittest.cc',
215 'notification_list_unittest.cc',
216 'test/run_all_unittests.cc',
221 '../gfx/gfx.gyp:gfx_test_support',
224 ['toolkit_views==1', {
226 # Compositor is needed by message_center_view_unittest.cc
227 # and for the fonts used by bounded_label_unittest.cc.
228 '../compositor/compositor.gyp:compositor',
229 '../views/views.gyp:views',
230 '../views/views.gyp:views_test_support',
233 'views/bounded_label_unittest.cc',
234 'views/message_center_view_unittest.cc',
235 'views/message_popup_collection_unittest.cc',
236 'views/notification_view_unittest.cc',
237 'views/notifier_settings_view_unittest.cc',
240 ['notifications==0', { # Android and iOS.
242 # Exclude everything except main().
243 ['exclude', '\\.(cc|mm)$'],
244 ['include', '^test/run_all_unittests\\.cc$'],
247 # See http://crbug.com/162998#c4 for why this is needed.
248 ['OS=="linux" and use_allocator!="none"', {
250 '../../base/allocator/allocator.gyp:allocator',
254 }, # target_name: message_center_unittests