8fc29a6209f54e1465fc6277a6dba791077796c6
[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/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/constants.h',
77         'views/message_bubble_base.cc',
78         'views/message_bubble_base.h',
79         'views/message_center_controller.h',
80         'views/message_center_bubble.cc',
81         'views/message_center_bubble.h',
82         'views/message_center_button_bar.cc',
83         'views/message_center_button_bar.h',
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/message_view_context_menu_controller.cc',
91         'views/message_view_context_menu_controller.h',
92         'views/notifier_settings_view.cc',
93         'views/notifier_settings_view.h',
94         'views/notification_button.cc',
95         'views/notification_button.h',
96         'views/notification_view.cc',
97         'views/notification_view.h',
98         'views/padded_button.cc',
99         'views/padded_button.h',
100         'views/proportional_image_view.cc',
101         'views/proportional_image_view.h',
102         'views/toast_contents_view.cc',
103         'views/toast_contents_view.h',
104       ],
105       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
106       'msvs_disabled_warnings': [ 4267, ],
107       'conditions': [
108         # This condition is for Windows 8 Metro mode support.  We need to
109         # specify a particular desktop during widget creation in that case.
110         # This is done using the desktop aura native widget framework.
111         ['use_ash==1 and OS=="win"', {
112           'dependencies': [
113             '../aura/aura.gyp:aura',
114           ],
115         }],
116         ['toolkit_views==1', {
117           'dependencies': [
118             '../events/events.gyp:events',
119             '../views/views.gyp:views',
120             '../compositor/compositor.gyp:compositor',
121           ],
122         }, {
123           'sources/': [
124             ['exclude', 'views/'],
125           ],
126         }],
127         ['use_ash==0', {
128           'sources!': [
129             'views/message_bubble_base.cc',
130             'views/message_bubble_base.h',
131             'views/message_center_bubble.cc',
132             'views/message_center_bubble.h',
133             'views/message_popup_bubble.cc',
134             'views/message_popup_bubble.h',
135           ],
136         }],
137         ['notifications==0', {  # Android and iOS.
138           'sources/': [
139             # Exclude everything except dummy impl.
140             ['exclude', '\\.(cc|mm)$'],
141             ['include', '^dummy_message_center\\.cc$'],
142             ['include', '^message_center_switches\\.cc$'],
143           ],
144         }, {  # notifications==1
145           'sources!': [ 'dummy_message_center.cc' ],
146         }],
147       ],
148     },  # target_name: message_center
149     {
150       'target_name': 'message_center_test_support',
151       'type': 'static_library',
152       'dependencies': [
153         '../../base/base.gyp:base',
154         '../../base/base.gyp:test_support_base',
155         '../../skia/skia.gyp:skia',
156         '../base/ui_base.gyp:ui_base',
157         '../gfx/gfx.gyp:gfx',
158         '../gfx/gfx.gyp:gfx_geometry',
159         'message_center',
160       ],
161       'sources': [
162         'fake_message_center.h',
163         'fake_message_center.cc',
164         'fake_message_center_tray_delegate.h',
165         'fake_message_center_tray_delegate.cc',
166         'fake_notifier_settings_provider.h',
167         'fake_notifier_settings_provider.cc',
168       ],
169     },  # target_name: message_center_test_support
170     {
171       'target_name': 'message_center_unittests',
172       'type': 'executable',
173       'dependencies': [
174         '../../base/base.gyp:base',
175         '../../base/base.gyp:test_support_base',
176         '../../skia/skia.gyp:skia',
177         '../../testing/gtest.gyp:gtest',
178         '../../url/url.gyp:url_lib',
179         '../base/ui_base.gyp:ui_base',
180         '../gfx/gfx.gyp:gfx',
181         '../gfx/gfx.gyp:gfx_geometry',
182         '../resources/ui_resources.gyp:ui_resources',
183         '../resources/ui_resources.gyp:ui_test_pak',
184         'message_center',
185         'message_center_test_support',
186       ],
187       'sources': [
188         'cocoa/notification_controller_unittest.mm',
189         'cocoa/popup_collection_unittest.mm',
190         'cocoa/popup_controller_unittest.mm',
191         'cocoa/settings_controller_unittest.mm',
192         'cocoa/status_item_view_unittest.mm',
193         'cocoa/tray_controller_unittest.mm',
194         'cocoa/tray_view_controller_unittest.mm',
195         'message_center_tray_unittest.cc',
196         'message_center_impl_unittest.cc',
197         'notification_delegate_unittest.cc',
198         'notification_list_unittest.cc',
199         'test/run_all_unittests.cc',
200       ],
201       'conditions': [
202         ['OS=="mac"', {
203           'dependencies': [
204             '../gfx/gfx.gyp:gfx_test_support',
205           ],
206         }],
207         ['toolkit_views==1', {
208           'dependencies': [
209             # Compositor is needed by message_center_view_unittest.cc
210             # and for the fonts used by bounded_label_unittest.cc.
211             '../compositor/compositor.gyp:compositor',
212             '../views/views.gyp:views',
213             '../views/views.gyp:views_test_support',
214           ],
215           'sources': [
216             'views/bounded_label_unittest.cc',
217             'views/message_center_view_unittest.cc',
218             'views/message_popup_collection_unittest.cc',
219             'views/notifier_settings_view_unittest.cc',
220           ],
221         }],
222         ['notifications==0', {  # Android and iOS.
223           'sources/': [
224             # Exclude everything except main().
225             ['exclude', '\\.(cc|mm)$'],
226             ['include', '^test/run_all_unittests\\.cc$'],
227           ],
228         }],
229         # See http://crbug.com/162998#c4 for why this is needed.
230         # TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
231         ['OS=="linux" and ((use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and linux_use_tcmalloc==1))', {
232           'dependencies': [
233             '../../base/allocator/allocator.gyp:allocator',
234           ],
235         }],
236       ],
237     },  # target_name: message_center_unittests
238   ],
239 }