- add sources.
[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       'target_name': 'message_center',
12       'type': '<(component)',
13       'dependencies': [
14         '../../base/base.gyp:base',
15         '../../base/base.gyp:base_i18n',
16         '../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
17         '../../skia/skia.gyp:skia',
18         '../../url/url.gyp:url_lib',
19         '../base/strings/ui_strings.gyp:ui_strings',
20         '../events/events.gyp:events',
21         '../gfx/gfx.gyp:gfx',
22         '../ui.gyp:ui',
23         '../ui.gyp:ui_resources',
24       ],
25       'defines': [
26         'MESSAGE_CENTER_IMPLEMENTATION',
27       ],
28       'sources': [
29         'cocoa/notification_controller.h',
30         'cocoa/notification_controller.mm',
31         'cocoa/popup_collection.h',
32         'cocoa/popup_collection.mm',
33         'cocoa/popup_controller.h',
34         'cocoa/popup_controller.mm',
35         'cocoa/settings_controller.h',
36         'cocoa/settings_controller.mm',
37         'cocoa/settings_entry_view.h',
38         'cocoa/settings_entry_view.mm',
39         'cocoa/status_item_view.h',
40         'cocoa/status_item_view.mm',
41         'cocoa/tray_controller.h',
42         'cocoa/tray_controller.mm',
43         'cocoa/tray_view_controller.h',
44         'cocoa/tray_view_controller.mm',
45         'dummy_message_center.cc',
46         'message_center.cc',
47         'message_center.h',
48         'message_center_export.h',
49         'notification_delegate.cc',
50         'notification_delegate.h',
51         'message_center_impl.cc',
52         'message_center_impl.h',
53         'message_center_observer.h',
54         'message_center_style.cc',
55         'message_center_style.h',
56         'message_center_switches.cc',
57         'message_center_switches.h',
58         'message_center_tray.cc',
59         'message_center_tray.h',
60         'message_center_tray_delegate.h',
61         'message_center_types.h',
62         'message_center_util.cc',
63         'message_center_util.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/message_bubble_base.cc',
77         'views/message_bubble_base.h',
78         'views/message_center_bubble.cc',
79         'views/message_center_bubble.h',
80         'views/message_center_button_bar.cc',
81         'views/message_center_button_bar.h',
82         'views/message_center_focus_border.h',
83         'views/message_center_focus_border.cc',
84         'views/message_center_view.cc',
85         'views/message_center_view.h',
86         'views/message_popup_collection.cc',
87         'views/message_popup_collection.h',
88         'views/message_view.cc',
89         'views/message_view.h',
90         'views/notifier_settings_view.cc',
91         'views/notifier_settings_view.h',
92         'views/notification_view.cc',
93         'views/notification_view.h',
94         'views/toast_contents_view.cc',
95         'views/toast_contents_view.h',
96       ],
97       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
98       'msvs_disabled_warnings': [ 4267, ],
99       'conditions': [
100         ['toolkit_views==1', {
101           'dependencies': [
102             '../views/views.gyp:views',
103           ],
104         }, {
105           'sources/': [
106             ['exclude', 'views/'],
107           ],
108         }],
109         ['use_ash==0', {
110           'sources!': [
111             'views/message_bubble_base.cc',
112             'views/message_bubble_base.h',
113             'views/message_center_bubble.cc',
114             'views/message_center_bubble.h',
115             'views/message_popup_bubble.cc',
116             'views/message_popup_bubble.h',
117           ],
118         }],
119         ['OS=="mac"', {
120           'dependencies': [
121             '../ui.gyp:ui_cocoa_third_party_toolkits',
122           ],
123           'include_dirs': [
124             '../../third_party/GTM',
125           ],
126         }],
127         ['toolkit_views==1', {
128           'dependencies': [
129             '../compositor/compositor.gyp:compositor',
130           ],
131         }],
132         ['notifications==0', {  # Android and iOS.
133           'sources/': [
134             # Exclude everything except dummy impl.
135             ['exclude', '\\.(cc|mm)$'],
136             ['include', '^dummy_message_center\\.cc$'],
137             ['include', '^message_center_switches\\.cc$'],
138           ],
139         }, {  # notifications==1
140           'sources!': [ 'dummy_message_center.cc' ],
141         }],
142       ],
143     },  # target_name: message_center
144     {
145       'target_name': 'message_center_test_support',
146       'type': 'static_library',
147       'dependencies': [
148         '../../base/base.gyp:base',
149         '../../base/base.gyp:test_support_base',
150         '../../skia/skia.gyp:skia',
151         '../events/events.gyp:events',
152         '../gfx/gfx.gyp:gfx',
153         '../ui.gyp:ui',
154         'message_center',
155       ],
156       'sources': [
157         'fake_message_center.h',
158         'fake_message_center.cc',
159         'fake_notifier_settings_provider.h',
160         'fake_notifier_settings_provider.cc',
161       ],
162     },  # target_name: message_center_test_support
163     {
164       'target_name': 'message_center_unittests',
165       'type': 'executable',
166       'dependencies': [
167         '../../base/base.gyp:base',
168         '../../base/base.gyp:test_support_base',
169         '../../chrome/chrome_resources.gyp:packed_resources',
170         '../../skia/skia.gyp:skia',
171         '../../testing/gtest.gyp:gtest',
172         '../../url/url.gyp:url_lib',
173         '../events/events.gyp:events',
174         '../gfx/gfx.gyp:gfx',
175         '../ui.gyp:ui',
176         '../ui_unittests.gyp:run_ui_unittests',
177         '../ui.gyp:ui_resources',
178         '../../url/url.gyp:url_lib',
179         'message_center',
180         'message_center_test_support',
181       ],
182       'sources': [
183         'cocoa/notification_controller_unittest.mm',
184         'cocoa/popup_collection_unittest.mm',
185         'cocoa/popup_controller_unittest.mm',
186         'cocoa/settings_controller_unittest.mm',
187         'cocoa/status_item_view_unittest.mm',
188         'cocoa/tray_controller_unittest.mm',
189         'cocoa/tray_view_controller_unittest.mm',
190         'message_center_tray_unittest.cc',
191         'message_center_impl_unittest.cc',
192         'notification_list_unittest.cc',
193         'test/run_all_unittests.cc',
194       ],
195       'conditions': [
196         ['use_glib == 1 or OS == "ios"', {
197          'dependencies': [
198            '../base/strings/ui_strings.gyp:ui_unittest_strings',
199          ],
200         }],
201         ['OS=="mac"', {
202           'dependencies': [
203             '../ui_unittests.gyp:ui_test_support',
204           ],
205         }],
206         ['toolkit_views==1', {
207           'dependencies': [
208             # Compositor is needed by message_center_view_unittest.cc
209             # and for the fonts used by bounded_label_unittest.cc.
210             '../compositor/compositor.gyp:compositor',
211             '../views/views.gyp:views',
212             '../views/views.gyp:views_test_support',
213           ],
214           'sources': [
215             'views/bounded_label_unittest.cc',
216             'views/message_center_view_unittest.cc',
217             'views/message_popup_collection_unittest.cc',
218             'views/notifier_settings_view_unittest.cc',
219           ],
220         }],
221         ['notifications==0', {  # Android and iOS.
222           'sources/': [
223             # Exclude everything except main().
224             ['exclude', '\\.(cc|mm)$'],
225             ['include', '^test/run_all_unittests\\.cc$'],
226           ],
227         }],
228         # See http://crbug.com/162998#c4 for why this is needed.
229         ['OS=="linux" and linux_use_tcmalloc==1', {
230           'dependencies': [
231             '../../base/allocator/allocator.gyp:allocator',
232           ],
233         }],
234       ],
235     },  # target_name: message_center_unittests
236   ],
237 }