Roll src/third_party/skia d32087a:1052f51
[chromium-blink-merge.git] / ui / message_center / message_center.gyp
blob2b50442f384d0fac96120a0749bf0ff26340daf0
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         '../../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',
22         '../gfx/gfx.gyp:gfx',
23         '../gfx/gfx.gyp:gfx_geometry',
24         '../resources/ui_resources.gyp:ui_resources',
25         '../strings/ui_strings.gyp:ui_strings',
26       ],
27       'defines': [
28         'MESSAGE_CENTER_IMPLEMENTATION',
29       ],
30       'sources': [
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',
41         'message_center.cc',
42         'message_center.h',
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',
55         'notification.cc',
56         'notification.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',
69         'views/constants.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',
103       ],
104       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
105       'msvs_disabled_warnings': [ 4267, ],
106       'conditions': [
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.
110         ['OS=="win"', {
111           'dependencies': [
112             '../aura/aura.gyp:aura',
113           ],
114         }],
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"', {
118           'dependencies': [
119             '../events/events.gyp:events',
120             '../views/views.gyp:views',
121             '../compositor/compositor.gyp:compositor',
122           ],
123         }, {
124           'sources/': [
125             ['exclude', 'views/'],
126           ],
127         }],
128         ['use_ash==0', {
129           'sources!': [
130             'views/message_bubble_base.cc',
131             'views/message_bubble_base.h',
132             'views/message_center_bubble.cc',
133             'views/message_center_bubble.h',
134           ],
135         }],
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"', {
139           'sources/': [
140             # Exclude everything except dummy impl.
141             ['exclude', '\\.(cc|mm)$'],
142             ['include', '^dummy_message_center\\.cc$'],
143             ['include', '^notification_delegate\\.cc$'],
144           ],
145         }, {  # notifications==1
146           'sources!': [ 'dummy_message_center.cc' ],
147         }],
148         # Include a minimal set of files required for notifications on Android.
149         ['OS=="android"', {
150           'sources/': [
151             ['include', '^notification\\.cc$'],
152             ['include', '^notifier_settings\\.cc$'],
153           ],
154         }],
155       ],
156     },  # target_name: message_center
157     {
158       # GN version: //ui/message_center:test_support
159       'target_name': 'message_center_test_support',
160       'type': 'static_library',
161       'dependencies': [
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',
168         'message_center',
169       ],
170       'sources': [
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',
178       ],
179     },  # target_name: message_center_test_support
180     {
181       # GN version: //ui/message_center:message_center_unittests
182       'target_name': 'message_center_unittests',
183       'type': 'executable',
184       'dependencies': [
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',
195         'message_center',
196         'message_center_test_support',
197       ],
198       'sources': [
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',
208       ],
209       'conditions': [
210         ['OS=="mac"', {
211           'dependencies': [
212             '../gfx/gfx.gyp:gfx_test_support',
213           ],
214         }],
215         ['toolkit_views==1 and OS!="mac"', {
216           'dependencies': [
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',
222           ],
223           'sources': [
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',
229           ],
230         }],
231         ['notifications==0', {  # Android and iOS.
232           'sources/': [
233             # Exclude everything except main().
234             ['exclude', '\\.(cc|mm)$'],
235             ['include', '^test/run_all_unittests\\.cc$'],
236           ],
237         }],
238         # See http://crbug.com/162998#c4 for why this is needed.
239         ['OS=="linux" and use_allocator!="none"', {
240           'dependencies': [
241             '../../base/allocator/allocator.gyp:allocator',
242           ],
243         }],
244       ],
245     },  # target_name: message_center_unittests
246   ],
247   'conditions': [
248     ['test_isolation_mode != "noop"', {
249       'targets': [
250         {
251           'target_name': 'message_center_unittests_run',
252           'type': 'none',
253           'dependencies': [
254             'message_center_unittests',
255           ],
256           'includes': [
257             '../../build/isolate.gypi',
258           ],
259           'sources': [
260             'message_center_unittests.isolate',
261           ],
262           'conditions': [
263             ['use_x11 == 1', {
264               'dependencies': [
265                 '../../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
266               ],
267             }],
268           ],
269         },
270       ],
271     }],
272   ],