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 '../../components/url_formatter/url_formatter.gyp:url_formatter',
19 '../../skia/skia.gyp:skia',
20 '../../url/url.gyp:url_lib',
21 '../base/ui_base.gyp:ui_base',
23 '../gfx/gfx.gyp:gfx_geometry',
24 '../resources/ui_resources.gyp:ui_resources',
25 '../strings/ui_strings.gyp:ui_strings',
28 'MESSAGE_CENTER_IMPLEMENTATION',
31 # Note: file list duplicated in GN build.
32 'cocoa/notification_controller.h',
33 'cocoa/notification_controller.mm',
34 'cocoa/opaque_views.h',
35 'cocoa/opaque_views.mm',
36 'cocoa/popup_collection.h',
37 'cocoa/popup_collection.mm',
38 'cocoa/popup_controller.h',
39 'cocoa/popup_controller.mm',
40 'cocoa/settings_controller.h',
41 'cocoa/settings_controller.mm',
42 'cocoa/settings_entry_view.h',
43 'cocoa/settings_entry_view.mm',
44 'cocoa/status_item_view.h',
45 'cocoa/status_item_view.mm',
46 'cocoa/tray_controller.h',
47 'cocoa/tray_controller.mm',
48 'cocoa/tray_view_controller.h',
49 'cocoa/tray_view_controller.mm',
50 'dummy_message_center.cc',
53 'message_center_export.h',
54 'message_center_impl.cc',
55 'message_center_impl.h',
56 'message_center_observer.h',
57 'message_center_style.cc',
58 'message_center_style.h',
59 'message_center_switches.cc',
60 'message_center_switches.h',
61 'message_center_tray.cc',
62 'message_center_tray.h',
63 'message_center_tray_delegate.h',
64 'message_center_types.h',
67 'notification_blocker.cc',
68 'notification_blocker.h',
69 'notification_delegate.cc',
70 'notification_delegate.h',
71 'notification_list.cc',
72 'notification_list.h',
73 'notification_types.cc',
74 'notification_types.h',
75 'notifier_settings.cc',
76 'notifier_settings.h',
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_bubble_base.cc',
83 'views/message_bubble_base.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_controller.h',
89 'views/message_center_view.cc',
90 'views/message_center_view.h',
91 'views/message_list_view.cc',
92 'views/message_list_view.h',
93 'views/message_popup_collection.cc',
94 'views/message_popup_collection.h',
95 'views/message_view.cc',
96 'views/message_view.h',
97 'views/message_view_context_menu_controller.cc',
98 'views/message_view_context_menu_controller.h',
99 'views/notification_button.cc',
100 'views/notification_button.h',
101 'views/notification_view.cc',
102 'views/notification_view.h',
103 'views/notifier_settings_view.cc',
104 'views/notifier_settings_view.h',
105 'views/padded_button.cc',
106 'views/padded_button.h',
107 'views/popup_alignment_delegate.cc',
108 'views/popup_alignment_delegate.h',
109 'views/proportional_image_view.cc',
110 'views/proportional_image_view.h',
111 'views/toast_contents_view.cc',
112 'views/toast_contents_view.h',
114 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
115 'msvs_disabled_warnings': [ 4267, ],
117 # This condition is for Windows 8 Metro mode support. We need to
118 # specify a particular desktop during widget creation in that case.
119 # This is done using the desktop aura native widget framework.
122 '../aura/aura.gyp:aura',
125 # On Mac, toolkit-views builds still use the Cocoa UI. Keep this in sync
126 # with message_center_unittests below.
127 ['toolkit_views==1 and OS!="mac"', {
129 '../events/events.gyp:events',
130 '../views/views.gyp:views',
131 '../compositor/compositor.gyp:compositor',
135 ['exclude', 'views/'],
140 'views/message_bubble_base.cc',
141 'views/message_bubble_base.h',
142 'views/message_center_bubble.cc',
143 'views/message_center_bubble.h',
146 # iOS disables notifications altogether, Android implements its own
147 # notification UI manager instead of deferring to the message center.
148 ['notifications==0 or OS=="android"', {
150 # Exclude everything except dummy impl.
151 ['exclude', '\\.(cc|mm)$'],
152 ['include', '^dummy_message_center\\.cc$'],
153 ['include', '^notification_delegate\\.cc$'],
155 }, { # notifications==1
156 'sources!': [ 'dummy_message_center.cc' ],
158 # Include a minimal set of files required for notifications on Android.
161 ['include', '^notification\\.cc$'],
162 ['include', '^notifier_settings\\.cc$'],
166 }, # target_name: message_center
168 # GN version: //ui/message_center:test_support
169 'target_name': 'message_center_test_support',
170 'type': 'static_library',
172 '../../base/base.gyp:base',
173 '../../base/base.gyp:test_support_base',
174 '../../skia/skia.gyp:skia',
175 '../base/ui_base.gyp:ui_base',
176 '../gfx/gfx.gyp:gfx',
177 '../gfx/gfx.gyp:gfx_geometry',
181 # Note: sources list duplicated in GN build.
182 'fake_message_center.cc',
183 'fake_message_center.h',
184 'fake_message_center_tray_delegate.cc',
185 'fake_message_center_tray_delegate.h',
186 'fake_notifier_settings_provider.cc',
187 'fake_notifier_settings_provider.h',
189 }, # target_name: message_center_test_support
191 # GN version: //ui/message_center:message_center_unittests
192 'target_name': 'message_center_unittests',
193 'type': 'executable',
195 '../../base/base.gyp:base',
196 '../../base/base.gyp:test_support_base',
197 '../../skia/skia.gyp:skia',
198 '../../testing/gtest.gyp:gtest',
199 '../../url/url.gyp:url_lib',
200 '../base/ui_base.gyp:ui_base',
201 '../gfx/gfx.gyp:gfx',
202 '../gfx/gfx.gyp:gfx_geometry',
203 '../resources/ui_resources.gyp:ui_resources',
204 '../resources/ui_resources.gyp:ui_test_pak',
206 'message_center_test_support',
209 # Note: file list duplicated in GN build.
210 'cocoa/notification_controller_unittest.mm',
211 'cocoa/popup_collection_unittest.mm',
212 'cocoa/popup_controller_unittest.mm',
213 'cocoa/settings_controller_unittest.mm',
214 'cocoa/status_item_view_unittest.mm',
215 'cocoa/tray_controller_unittest.mm',
216 'cocoa/tray_view_controller_unittest.mm',
217 'message_center_impl_unittest.cc',
218 'message_center_tray_unittest.cc',
219 'notification_delegate_unittest.cc',
220 'notification_list_unittest.cc',
221 'test/run_all_unittests.cc',
226 '../gfx/gfx.gyp:gfx_test_support',
229 ['toolkit_views==1 and OS!="mac"', {
231 # Compositor is needed by message_center_view_unittest.cc
232 # and for the fonts used by bounded_label_unittest.cc.
233 '../compositor/compositor.gyp:compositor',
234 '../views/views.gyp:views',
235 '../views/views.gyp:views_test_support',
238 'views/bounded_label_unittest.cc',
239 'views/message_center_view_unittest.cc',
240 'views/message_popup_collection_unittest.cc',
241 'views/notification_view_unittest.cc',
242 'views/notifier_settings_view_unittest.cc',
245 ['notifications==0', { # Android and iOS.
247 # Exclude everything except main().
248 ['exclude', '\\.(cc|mm)$'],
249 ['include', '^test/run_all_unittests\\.cc$'],
252 # See http://crbug.com/162998#c4 for why this is needed.
253 ['OS=="linux" and use_allocator!="none"', {
255 '../../base/allocator/allocator.gyp:allocator',
259 }, # target_name: message_center_unittests
262 ['test_isolation_mode != "noop"', {
265 'target_name': 'message_center_unittests_run',
268 'message_center_unittests',
271 '../../build/isolate.gypi',
274 'message_center_unittests.isolate',
279 '../../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',