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 'dummy_message_center.cc',
43 'message_center_export.h',
44 'message_center_impl.cc',
45 'message_center_impl.h',
46 'message_center_observer.h',
47 'message_center_style.cc',
48 'message_center_style.h',
49 'message_center_switches.cc',
50 'message_center_switches.h',
51 'message_center_tray.cc',
52 'message_center_tray.h',
53 'message_center_tray_delegate.h',
54 'message_center_types.h',
57 'notification_blocker.cc',
58 'notification_blocker.h',
59 'notification_delegate.cc',
60 'notification_delegate.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',
67 'views/bounded_label.cc',
68 'views/bounded_label.h',
70 'views/desktop_popup_alignment_delegate.cc',
71 'views/desktop_popup_alignment_delegate.h',
72 'views/message_bubble_base.cc',
73 'views/message_bubble_base.h',
74 'views/message_center_bubble.cc',
75 'views/message_center_bubble.h',
76 'views/message_center_button_bar.cc',
77 'views/message_center_button_bar.h',
78 'views/message_center_controller.h',
79 'views/message_center_view.cc',
80 'views/message_center_view.h',
81 'views/message_list_view.cc',
82 'views/message_list_view.h',
83 'views/message_popup_collection.cc',
84 'views/message_popup_collection.h',
85 'views/message_view.cc',
86 'views/message_view.h',
87 'views/message_view_context_menu_controller.cc',
88 'views/message_view_context_menu_controller.h',
89 'views/notification_button.cc',
90 'views/notification_button.h',
91 'views/notification_view.cc',
92 'views/notification_view.h',
93 'views/notifier_settings_view.cc',
94 'views/notifier_settings_view.h',
95 'views/padded_button.cc',
96 'views/padded_button.h',
97 'views/popup_alignment_delegate.cc',
98 'views/popup_alignment_delegate.h',
99 'views/proportional_image_view.cc',
100 'views/proportional_image_view.h',
101 'views/toast_contents_view.cc',
102 'views/toast_contents_view.h',
104 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
105 'msvs_disabled_warnings': [ 4267, ],
107 # This condition is for Windows 8 Metro mode support. We need to
108 # specify a particular desktop during widget creation in that case.
109 # This is done using the desktop aura native widget framework.
112 '../aura/aura.gyp:aura',
115 # On Mac, toolkit-views builds still use the Cocoa UI. Keep this in sync
116 # with message_center_unittests below.
117 ['toolkit_views==1 and OS!="mac"', {
119 '../events/events.gyp:events',
120 '../views/views.gyp:views',
121 '../compositor/compositor.gyp:compositor',
125 ['exclude', 'views/'],
130 'views/message_bubble_base.cc',
131 'views/message_bubble_base.h',
132 'views/message_center_bubble.cc',
133 'views/message_center_bubble.h',
136 # iOS disables notifications altogether, Android implements its own
137 # notification UI manager instead of deferring to the message center.
138 ['notifications==0 or OS=="android"', {
140 # Exclude everything except dummy impl.
141 ['exclude', '\\.(cc|mm)$'],
142 ['include', '^dummy_message_center\\.cc$'],
143 ['include', '^notification_delegate\\.cc$'],
145 }, { # notifications==1
146 'sources!': [ 'dummy_message_center.cc' ],
148 # Include a minimal set of files required for notifications on Android.
151 ['include', '^notification\\.cc$'],
152 ['include', '^notifier_settings\\.cc$'],
156 }, # target_name: message_center
158 # GN version: //ui/message_center:test_support
159 'target_name': 'message_center_test_support',
160 'type': 'static_library',
162 '../../base/base.gyp:base',
163 '../../base/base.gyp:test_support_base',
164 '../../skia/skia.gyp:skia',
165 '../base/ui_base.gyp:ui_base',
166 '../gfx/gfx.gyp:gfx',
167 '../gfx/gfx.gyp:gfx_geometry',
171 # Note: sources list duplicated in GN build.
172 'fake_message_center.cc',
173 'fake_message_center.h',
174 'fake_message_center_tray_delegate.cc',
175 'fake_message_center_tray_delegate.h',
176 'fake_notifier_settings_provider.cc',
177 'fake_notifier_settings_provider.h',
179 }, # target_name: message_center_test_support
181 # GN version: //ui/message_center:message_center_unittests
182 'target_name': 'message_center_unittests',
183 'type': 'executable',
185 '../../base/base.gyp:base',
186 '../../base/base.gyp:test_support_base',
187 '../../skia/skia.gyp:skia',
188 '../../testing/gtest.gyp:gtest',
189 '../../url/url.gyp:url_lib',
190 '../base/ui_base.gyp:ui_base',
191 '../gfx/gfx.gyp:gfx',
192 '../gfx/gfx.gyp:gfx_geometry',
193 '../resources/ui_resources.gyp:ui_resources',
194 '../resources/ui_resources.gyp:ui_test_pak',
196 'message_center_test_support',
199 # Note: file list duplicated in GN build.
200 'cocoa/notification_controller_unittest.mm',
201 'cocoa/popup_collection_unittest.mm',
202 'cocoa/popup_controller_unittest.mm',
203 'message_center_impl_unittest.cc',
204 'message_center_tray_unittest.cc',
205 'notification_delegate_unittest.cc',
206 'notification_list_unittest.cc',
207 'test/run_all_unittests.cc',
212 '../gfx/gfx.gyp:gfx_test_support',
215 ['toolkit_views==1 and OS!="mac"', {
217 # Compositor is needed by message_center_view_unittest.cc
218 # and for the fonts used by bounded_label_unittest.cc.
219 '../compositor/compositor.gyp:compositor',
220 '../views/views.gyp:views',
221 '../views/views.gyp:views_test_support',
224 'views/bounded_label_unittest.cc',
225 'views/message_center_view_unittest.cc',
226 'views/message_popup_collection_unittest.cc',
227 'views/notification_view_unittest.cc',
228 'views/notifier_settings_view_unittest.cc',
231 ['notifications==0', { # Android and iOS.
233 # Exclude everything except main().
234 ['exclude', '\\.(cc|mm)$'],
235 ['include', '^test/run_all_unittests\\.cc$'],
238 # See http://crbug.com/162998#c4 for why this is needed.
239 ['OS=="linux" and use_allocator!="none"', {
241 '../../base/allocator/allocator.gyp:allocator',
245 }, # target_name: message_center_unittests
248 ['test_isolation_mode != "noop"', {
251 'target_name': 'message_center_unittests_run',
254 'message_center_unittests',
257 '../../build/isolate.gypi',
260 'message_center_unittests.isolate',
265 '../../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',