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_tray.cc',
61 'message_center_tray.h',
62 'message_center_tray_delegate.h',
63 'message_center_types.h',
66 'notification_blocker.cc',
67 'notification_blocker.h',
68 'notification_list.cc',
69 'notification_list.h',
70 'notification_types.cc',
71 'notification_types.h',
72 'notifier_settings.cc',
73 'notifier_settings.h',
74 'views/bounded_label.cc',
75 'views/bounded_label.h',
77 'views/desktop_popup_alignment_delegate.cc',
78 'views/desktop_popup_alignment_delegate.h',
79 'views/message_bubble_base.cc',
80 'views/message_bubble_base.h',
81 'views/message_center_controller.h',
82 'views/message_center_bubble.cc',
83 'views/message_center_bubble.h',
84 'views/message_center_button_bar.cc',
85 'views/message_center_button_bar.h',
86 'views/message_center_view.cc',
87 'views/message_center_view.h',
88 'views/message_popup_collection.cc',
89 'views/message_popup_collection.h',
90 'views/message_view.cc',
91 'views/message_view.h',
92 'views/message_view_context_menu_controller.cc',
93 'views/message_view_context_menu_controller.h',
94 'views/notifier_settings_view.cc',
95 'views/notifier_settings_view.h',
96 'views/notification_button.cc',
97 'views/notification_button.h',
98 'views/notification_view.cc',
99 'views/notification_view.h',
100 'views/padded_button.cc',
101 'views/padded_button.h',
102 'views/popup_alignment_delegate.cc',
103 'views/popup_alignment_delegate.h',
104 'views/proportional_image_view.cc',
105 'views/proportional_image_view.h',
106 'views/toast_contents_view.cc',
107 'views/toast_contents_view.h',
109 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
110 'msvs_disabled_warnings': [ 4267, ],
112 # This condition is for Windows 8 Metro mode support. We need to
113 # specify a particular desktop during widget creation in that case.
114 # This is done using the desktop aura native widget framework.
117 '../aura/aura.gyp:aura',
120 ['toolkit_views==1', {
122 '../events/events.gyp:events',
123 '../views/views.gyp:views',
124 '../compositor/compositor.gyp:compositor',
128 ['exclude', 'views/'],
133 'views/message_bubble_base.cc',
134 'views/message_bubble_base.h',
135 'views/message_center_bubble.cc',
136 'views/message_center_bubble.h',
139 # iOS disables notifications altogether, Android implements its own
140 # notification UI manager instead of deferring to the message center.
141 ['notifications==0 or OS=="android"', {
143 # Exclude everything except dummy impl.
144 ['exclude', '\\.(cc|mm)$'],
145 ['include', '^dummy_message_center\\.cc$'],
146 ['include', '^notification_delegate\\.cc$'],
148 }, { # notifications==1
149 'sources!': [ 'dummy_message_center.cc' ],
151 # Include a minimal set of files required for notifications on Android.
154 ['include', '^notification\\.cc$'],
155 ['include', '^notifier_settings\\.cc$'],
159 }, # target_name: message_center
161 # GN version: //ui/message_center:test_support
162 'target_name': 'message_center_test_support',
163 'type': 'static_library',
165 '../../base/base.gyp:base',
166 '../../base/base.gyp:test_support_base',
167 '../../skia/skia.gyp:skia',
168 '../base/ui_base.gyp:ui_base',
169 '../gfx/gfx.gyp:gfx',
170 '../gfx/gfx.gyp:gfx_geometry',
174 # Note: sources list duplicated in GN build.
175 'fake_message_center.h',
176 'fake_message_center.cc',
177 'fake_message_center_tray_delegate.h',
178 'fake_message_center_tray_delegate.cc',
179 'fake_notifier_settings_provider.h',
180 'fake_notifier_settings_provider.cc',
182 }, # target_name: message_center_test_support
184 # GN version: //ui/message_center:message_center_unittests
185 'target_name': 'message_center_unittests',
186 'type': 'executable',
188 '../../base/base.gyp:base',
189 '../../base/base.gyp:test_support_base',
190 '../../skia/skia.gyp:skia',
191 '../../testing/gtest.gyp:gtest',
192 '../../url/url.gyp:url_lib',
193 '../base/ui_base.gyp:ui_base',
194 '../gfx/gfx.gyp:gfx',
195 '../gfx/gfx.gyp:gfx_geometry',
196 '../resources/ui_resources.gyp:ui_resources',
197 '../resources/ui_resources.gyp:ui_test_pak',
199 'message_center_test_support',
202 # Note: file list duplicated in GN build.
203 'cocoa/notification_controller_unittest.mm',
204 'cocoa/popup_collection_unittest.mm',
205 'cocoa/popup_controller_unittest.mm',
206 'cocoa/settings_controller_unittest.mm',
207 'cocoa/status_item_view_unittest.mm',
208 'cocoa/tray_controller_unittest.mm',
209 'cocoa/tray_view_controller_unittest.mm',
210 'message_center_tray_unittest.cc',
211 'message_center_impl_unittest.cc',
212 'notification_delegate_unittest.cc',
213 'notification_list_unittest.cc',
214 'test/run_all_unittests.cc',
219 '../gfx/gfx.gyp:gfx_test_support',
222 ['toolkit_views==1', {
224 # Compositor is needed by message_center_view_unittest.cc
225 # and for the fonts used by bounded_label_unittest.cc.
226 '../compositor/compositor.gyp:compositor',
227 '../views/views.gyp:views',
228 '../views/views.gyp:views_test_support',
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 ['notifications==0', { # Android and iOS.
240 # Exclude everything except main().
241 ['exclude', '\\.(cc|mm)$'],
242 ['include', '^test/run_all_unittests\\.cc$'],
245 # See http://crbug.com/162998#c4 for why this is needed.
246 ['OS=="linux" and use_allocator!="none"', {
248 '../../base/allocator/allocator.gyp:allocator',
252 }, # target_name: message_center_unittests