9db4e5a7e27a59c3b556ad9d7481246ab0630279
[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         '../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       ],
25       'defines': [
26         'MESSAGE_CENTER_IMPLEMENTATION',
27       ],
28       'sources': [
29         'cocoa/notification_controller.h',
30         'cocoa/notification_controller.mm',
31         'cocoa/opaque_views.h',
32         'cocoa/opaque_views.mm',
33         'cocoa/popup_collection.h',
34         'cocoa/popup_collection.mm',
35         'cocoa/popup_controller.h',
36         'cocoa/popup_controller.mm',
37         'cocoa/settings_controller.h',
38         'cocoa/settings_controller.mm',
39         'cocoa/settings_entry_view.h',
40         'cocoa/settings_entry_view.mm',
41         'cocoa/status_item_view.h',
42         'cocoa/status_item_view.mm',
43         'cocoa/tray_controller.h',
44         'cocoa/tray_controller.mm',
45         'cocoa/tray_view_controller.h',
46         'cocoa/tray_view_controller.mm',
47         'dummy_message_center.cc',
48         'message_center.cc',
49         'message_center.h',
50         'message_center_export.h',
51         'notification_delegate.cc',
52         'notification_delegate.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         'message_center_util.cc',
65         'message_center_util.h',
66         'notification.cc',
67         'notification.h',
68         'notification_blocker.cc',
69         'notification_blocker.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/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/proportional_image_view.cc',
103         'views/proportional_image_view.h',
104         'views/toast_contents_view.cc',
105         'views/toast_contents_view.h',
106       ],
107       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
108       'msvs_disabled_warnings': [ 4267, ],
109       'conditions': [
110         # This condition is for Windows 8 Metro mode support.  We need to
111         # specify a particular desktop during widget creation in that case.
112         # This is done using the desktop aura native widget framework.
113         ['use_ash==1 and OS=="win"', {
114           'dependencies': [
115             '../aura/aura.gyp:aura',
116           ],
117         }],
118         ['toolkit_views==1', {
119           'dependencies': [
120             '../events/events.gyp:events',
121             '../views/views.gyp:views',
122             '../compositor/compositor.gyp:compositor',
123           ],
124         }, {
125           'sources/': [
126             ['exclude', 'views/'],
127           ],
128         }],
129         ['use_ash==0', {
130           'sources!': [
131             'views/message_bubble_base.cc',
132             'views/message_bubble_base.h',
133             'views/message_center_bubble.cc',
134             'views/message_center_bubble.h',
135             'views/message_popup_bubble.cc',
136             'views/message_popup_bubble.h',
137           ],
138         }],
139         ['notifications==0', {  # Android and iOS.
140           'sources/': [
141             # Exclude everything except dummy impl.
142             ['exclude', '\\.(cc|mm)$'],
143             ['include', '^dummy_message_center\\.cc$'],
144             ['include', '^message_center_switches\\.cc$'],
145           ],
146         }, {  # notifications==1
147           'sources!': [ 'dummy_message_center.cc' ],
148         }],
149       ],
150     },  # target_name: message_center
151     {
152       'target_name': 'message_center_test_support',
153       'type': 'static_library',
154       'dependencies': [
155         '../../base/base.gyp:base',
156         '../../base/base.gyp:test_support_base',
157         '../../skia/skia.gyp:skia',
158         '../base/ui_base.gyp:ui_base',
159         '../gfx/gfx.gyp:gfx',
160         '../gfx/gfx.gyp:gfx_geometry',
161         'message_center',
162       ],
163       'sources': [
164         'fake_message_center.h',
165         'fake_message_center.cc',
166         'fake_message_center_tray_delegate.h',
167         'fake_message_center_tray_delegate.cc',
168         'fake_notifier_settings_provider.h',
169         'fake_notifier_settings_provider.cc',
170       ],
171     },  # target_name: message_center_test_support
172     {
173       'target_name': 'message_center_unittests',
174       'type': 'executable',
175       'dependencies': [
176         '../../base/base.gyp:base',
177         '../../base/base.gyp:test_support_base',
178         '../../skia/skia.gyp:skia',
179         '../../testing/gtest.gyp:gtest',
180         '../../url/url.gyp:url_lib',
181         '../base/ui_base.gyp:ui_base',
182         '../gfx/gfx.gyp:gfx',
183         '../gfx/gfx.gyp:gfx_geometry',
184         '../resources/ui_resources.gyp:ui_resources',
185         '../resources/ui_resources.gyp:ui_test_pak',
186         'message_center',
187         'message_center_test_support',
188       ],
189       'sources': [
190         'cocoa/notification_controller_unittest.mm',
191         'cocoa/popup_collection_unittest.mm',
192         'cocoa/popup_controller_unittest.mm',
193         'cocoa/settings_controller_unittest.mm',
194         'cocoa/status_item_view_unittest.mm',
195         'cocoa/tray_controller_unittest.mm',
196         'cocoa/tray_view_controller_unittest.mm',
197         'message_center_tray_unittest.cc',
198         'message_center_impl_unittest.cc',
199         'notification_delegate_unittest.cc',
200         'notification_list_unittest.cc',
201         'test/run_all_unittests.cc',
202       ],
203       'conditions': [
204         ['OS=="mac"', {
205           'dependencies': [
206             '../gfx/gfx.gyp:gfx_test_support',
207           ],
208         }],
209         ['toolkit_views==1', {
210           'dependencies': [
211             # Compositor is needed by message_center_view_unittest.cc
212             # and for the fonts used by bounded_label_unittest.cc.
213             '../compositor/compositor.gyp:compositor',
214             '../views/views.gyp:views',
215             '../views/views.gyp:views_test_support',
216           ],
217           'sources': [
218             'views/bounded_label_unittest.cc',
219             'views/message_center_view_unittest.cc',
220             'views/message_popup_collection_unittest.cc',
221             'views/notifier_settings_view_unittest.cc',
222           ],
223         }],
224         ['notifications==0', {  # Android and iOS.
225           'sources/': [
226             # Exclude everything except main().
227             ['exclude', '\\.(cc|mm)$'],
228             ['include', '^test/run_all_unittests\\.cc$'],
229           ],
230         }],
231         # See http://crbug.com/162998#c4 for why this is needed.
232         # TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
233         ['OS=="linux" and ((use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and linux_use_tcmalloc==1))', {
234           'dependencies': [
235             '../../base/allocator/allocator.gyp:allocator',
236           ],
237         }],
238       ],
239     },  # target_name: message_center_unittests
240   ],
241 }