Add ICU message format support
[chromium-blink-merge.git] / ui / message_center / message_center.gyp
blob245d8ba3aae83c50be9f977fbf91d0f82f77a91a
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.
6   'variables': {
7     'chromium_code': 1,
8   },
9   'targets': [
10     {
11       # GN version: //ui/message_center
12       'target_name': 'message_center',
13       'type': '<(component)',
14       'dependencies': [
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',
21         '../gfx/gfx.gyp:gfx',
22         '../gfx/gfx.gyp:gfx_geometry',
23         '../resources/ui_resources.gyp:ui_resources',
24         '../strings/ui_strings.gyp:ui_strings',
25       ],
26       'defines': [
27         'MESSAGE_CENTER_IMPLEMENTATION',
28       ],
29       'sources': [
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',
50         'message_center.cc',
51         'message_center.h',
52         'message_center_export.h',
53         'message_center_impl.cc',
54         'message_center_impl.h',
55         'message_center_observer.h',
56         'message_center_style.cc',
57         'message_center_style.h',
58         'message_center_switches.cc',
59         'message_center_switches.h',
60         'message_center_tray.cc',
61         'message_center_tray.h',
62         'message_center_tray_delegate.h',
63         'message_center_types.h',
64         'notification.cc',
65         'notification.h',
66         'notification_blocker.cc',
67         'notification_blocker.h',
68         'notification_delegate.cc',
69         'notification_delegate.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',
78         'views/constants.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_bubble.cc',
84         'views/message_center_bubble.h',
85         'views/message_center_button_bar.cc',
86         'views/message_center_button_bar.h',
87         'views/message_center_controller.h',
88         'views/message_center_view.cc',
89         'views/message_center_view.h',
90         'views/message_list_view.cc',
91         'views/message_list_view.h',
92         'views/message_popup_collection.cc',
93         'views/message_popup_collection.h',
94         'views/message_view.cc',
95         'views/message_view.h',
96         'views/message_view_context_menu_controller.cc',
97         'views/message_view_context_menu_controller.h',
98         'views/notification_button.cc',
99         'views/notification_button.h',
100         'views/notification_view.cc',
101         'views/notification_view.h',
102         'views/notifier_settings_view.cc',
103         'views/notifier_settings_view.h',
104         'views/padded_button.cc',
105         'views/padded_button.h',
106         'views/popup_alignment_delegate.cc',
107         'views/popup_alignment_delegate.h',
108         'views/proportional_image_view.cc',
109         'views/proportional_image_view.h',
110         'views/toast_contents_view.cc',
111         'views/toast_contents_view.h',
112       ],
113       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
114       'msvs_disabled_warnings': [ 4267, ],
115       'conditions': [
116         # This condition is for Windows 8 Metro mode support.  We need to
117         # specify a particular desktop during widget creation in that case.
118         # This is done using the desktop aura native widget framework.
119         ['OS=="win"', {
120           'dependencies': [
121             '../aura/aura.gyp:aura',
122           ],
123         }],
124         # On Mac, toolkit-views builds still use the Cocoa UI. Keep this in sync
125         # with message_center_unittests below.
126         ['toolkit_views==1 and OS!="mac"', {
127           'dependencies': [
128             '../events/events.gyp:events',
129             '../views/views.gyp:views',
130             '../compositor/compositor.gyp:compositor',
131           ],
132         }, {
133           'sources/': [
134             ['exclude', 'views/'],
135           ],
136         }],
137         ['use_ash==0', {
138           'sources!': [
139             'views/message_bubble_base.cc',
140             'views/message_bubble_base.h',
141             'views/message_center_bubble.cc',
142             'views/message_center_bubble.h',
143           ],
144         }],
145         # iOS disables notifications altogether, Android implements its own
146         # notification UI manager instead of deferring to the message center.
147         ['notifications==0 or OS=="android"', {
148           'sources/': [
149             # Exclude everything except dummy impl.
150             ['exclude', '\\.(cc|mm)$'],
151             ['include', '^dummy_message_center\\.cc$'],
152             ['include', '^notification_delegate\\.cc$'],
153           ],
154         }, {  # notifications==1
155           'sources!': [ 'dummy_message_center.cc' ],
156         }],
157         # Include a minimal set of files required for notifications on Android.
158         ['OS=="android"', {
159           'sources/': [
160             ['include', '^notification\\.cc$'],
161             ['include', '^notifier_settings\\.cc$'],
162           ],
163         }],
164       ],
165     },  # target_name: message_center
166     {
167       # GN version: //ui/message_center:test_support
168       'target_name': 'message_center_test_support',
169       'type': 'static_library',
170       'dependencies': [
171         '../../base/base.gyp:base',
172         '../../base/base.gyp:test_support_base',
173         '../../skia/skia.gyp:skia',
174         '../base/ui_base.gyp:ui_base',
175         '../gfx/gfx.gyp:gfx',
176         '../gfx/gfx.gyp:gfx_geometry',
177         'message_center',
178       ],
179       'sources': [
180         # Note: sources list duplicated in GN build.
181         'fake_message_center.cc',
182         'fake_message_center.h',
183         'fake_message_center_tray_delegate.cc',
184         'fake_message_center_tray_delegate.h',
185         'fake_notifier_settings_provider.cc',
186         'fake_notifier_settings_provider.h',
187       ],
188     },  # target_name: message_center_test_support
189     {
190       # GN version: //ui/message_center:message_center_unittests
191       'target_name': 'message_center_unittests',
192       'type': 'executable',
193       'dependencies': [
194         '../../base/base.gyp:base',
195         '../../base/base.gyp:test_support_base',
196         '../../skia/skia.gyp:skia',
197         '../../testing/gtest.gyp:gtest',
198         '../../url/url.gyp:url_lib',
199         '../base/ui_base.gyp:ui_base',
200         '../gfx/gfx.gyp:gfx',
201         '../gfx/gfx.gyp:gfx_geometry',
202         '../resources/ui_resources.gyp:ui_resources',
203         '../resources/ui_resources.gyp:ui_test_pak',
204         'message_center',
205         'message_center_test_support',
206       ],
207       'sources': [
208         # Note: file list duplicated in GN build.
209         'cocoa/notification_controller_unittest.mm',
210         'cocoa/popup_collection_unittest.mm',
211         'cocoa/popup_controller_unittest.mm',
212         'cocoa/settings_controller_unittest.mm',
213         'cocoa/status_item_view_unittest.mm',
214         'cocoa/tray_controller_unittest.mm',
215         'cocoa/tray_view_controller_unittest.mm',
216         'message_center_impl_unittest.cc',
217         'message_center_tray_unittest.cc',
218         'notification_delegate_unittest.cc',
219         'notification_list_unittest.cc',
220         'test/run_all_unittests.cc',
221       ],
222       'conditions': [
223         ['OS=="mac"', {
224           'dependencies': [
225             '../gfx/gfx.gyp:gfx_test_support',
226           ],
227         }],
228         ['toolkit_views==1 and OS!="mac"', {
229           'dependencies': [
230             # Compositor is needed by message_center_view_unittest.cc
231             # and for the fonts used by bounded_label_unittest.cc.
232             '../compositor/compositor.gyp:compositor',
233             '../views/views.gyp:views',
234             '../views/views.gyp:views_test_support',
235           ],
236           'sources': [
237             'views/bounded_label_unittest.cc',
238             'views/message_center_view_unittest.cc',
239             'views/message_popup_collection_unittest.cc',
240             'views/notification_view_unittest.cc',
241             'views/notifier_settings_view_unittest.cc',
242           ],
243         }],
244         ['notifications==0', {  # Android and iOS.
245           'sources/': [
246             # Exclude everything except main().
247             ['exclude', '\\.(cc|mm)$'],
248             ['include', '^test/run_all_unittests\\.cc$'],
249           ],
250         }],
251         # See http://crbug.com/162998#c4 for why this is needed.
252         ['OS=="linux" and use_allocator!="none"', {
253           'dependencies': [
254             '../../base/allocator/allocator.gyp:allocator',
255           ],
256         }],
257       ],
258     },  # target_name: message_center_unittests
259   ],
260   'conditions': [
261     ['test_isolation_mode != "noop"', {
262       'targets': [
263         {
264           'target_name': 'message_center_unittests_run',
265           'type': 'none',
266           'dependencies': [
267             'message_center_unittests',
268           ],
269           'includes': [
270             '../../build/isolate.gypi',
271           ],
272           'sources': [
273             'message_center_unittests.isolate',
274           ],
275           'conditions': [
276             ['use_x11 == 1', {
277               'dependencies': [
278                 '../../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
279               ],
280             }],
281           ],
282         },
283       ],
284     }],
285   ],