Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / ui / message_center / message_center.gyp
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.
4
5 {
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         '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',
64         'notification.cc',
65         'notification.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',
76         'views/constants.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',
108       ],
109       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
110       'msvs_disabled_warnings': [ 4267, ],
111       'conditions': [
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.
115         ['OS=="win"', {
116           'dependencies': [
117             '../aura/aura.gyp:aura',
118           ],
119         }],
120         ['toolkit_views==1', {
121           'dependencies': [
122             '../events/events.gyp:events',
123             '../views/views.gyp:views',
124             '../compositor/compositor.gyp:compositor',
125           ],
126         }, {
127           'sources/': [
128             ['exclude', 'views/'],
129           ],
130         }],
131         ['use_ash==0', {
132           'sources!': [
133             'views/message_bubble_base.cc',
134             'views/message_bubble_base.h',
135             'views/message_center_bubble.cc',
136             'views/message_center_bubble.h',
137           ],
138         }],
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"', {
142           'sources/': [
143             # Exclude everything except dummy impl.
144             ['exclude', '\\.(cc|mm)$'],
145             ['include', '^dummy_message_center\\.cc$'],
146             ['include', '^notification_delegate\\.cc$'],
147           ],
148         }, {  # notifications==1
149           'sources!': [ 'dummy_message_center.cc' ],
150         }],
151         # Include a minimal set of files required for notifications on Android.
152         ['OS=="android"', {
153           'sources/': [
154             ['include', '^notification\\.cc$'],
155             ['include', '^notifier_settings\\.cc$'],
156           ],
157         }],
158       ],
159     },  # target_name: message_center
160     {
161       # GN version: //ui/message_center:test_support
162       'target_name': 'message_center_test_support',
163       'type': 'static_library',
164       'dependencies': [
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',
171         'message_center',
172       ],
173       'sources': [
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',
181       ],
182     },  # target_name: message_center_test_support
183     {
184       # GN version: //ui/message_center:message_center_unittests
185       'target_name': 'message_center_unittests',
186       'type': 'executable',
187       'dependencies': [
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',
198         'message_center',
199         'message_center_test_support',
200       ],
201       'sources': [
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',
215       ],
216       'conditions': [
217         ['OS=="mac"', {
218           'dependencies': [
219             '../gfx/gfx.gyp:gfx_test_support',
220           ],
221         }],
222         ['toolkit_views==1', {
223           'dependencies': [
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',
229           ],
230           'sources': [
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',
236           ],
237         }],
238         ['notifications==0', {  # Android and iOS.
239           'sources/': [
240             # Exclude everything except main().
241             ['exclude', '\\.(cc|mm)$'],
242             ['include', '^test/run_all_unittests\\.cc$'],
243           ],
244         }],
245         # See http://crbug.com/162998#c4 for why this is needed.
246         ['OS=="linux" and use_allocator!="none"', {
247           'dependencies': [
248             '../../base/allocator/allocator.gyp:allocator',
249           ],
250         }],
251       ],
252     },  # target_name: message_center_unittests
253   ],
254 }