Get foreground tab on Android
[chromium-blink-merge.git] / ui / message_center / message_center.gyp
blob42d0aef9ab02fbcc182281b4a8dda021ac007b7c
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       '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         '../gfx/gfx.gyp:gfx',
21         '../resources/ui_resources.gyp:ui_resources',
22         '../ui.gyp:ui',
23       ],
24       'defines': [
25         'MESSAGE_CENTER_IMPLEMENTATION',
26       ],
27       'sources': [
28         'cocoa/notification_controller.h',
29         'cocoa/notification_controller.mm',
30         'cocoa/popup_collection.h',
31         'cocoa/popup_collection.mm',
32         'cocoa/popup_controller.h',
33         'cocoa/popup_controller.mm',
34         'cocoa/settings_controller.h',
35         'cocoa/settings_controller.mm',
36         'cocoa/settings_entry_view.h',
37         'cocoa/settings_entry_view.mm',
38         'cocoa/status_item_view.h',
39         'cocoa/status_item_view.mm',
40         'cocoa/tray_controller.h',
41         'cocoa/tray_controller.mm',
42         'cocoa/tray_view_controller.h',
43         'cocoa/tray_view_controller.mm',
44         'dummy_message_center.cc',
45         'message_center.cc',
46         'message_center.h',
47         'message_center_export.h',
48         'notification_delegate.cc',
49         'notification_delegate.h',
50         'message_center_impl.cc',
51         'message_center_impl.h',
52         'message_center_observer.h',
53         'message_center_style.cc',
54         'message_center_style.h',
55         'message_center_switches.cc',
56         'message_center_switches.h',
57         'message_center_tray.cc',
58         'message_center_tray.h',
59         'message_center_tray_delegate.h',
60         'message_center_types.h',
61         'message_center_util.cc',
62         'message_center_util.h',
63         'notification.cc',
64         'notification.h',
65         'notification_blocker.cc',
66         'notification_blocker.h',
67         'notification_list.cc',
68         'notification_list.h',
69         'notification_types.cc',
70         'notification_types.h',
71         'notifier_settings.cc',
72         'notifier_settings.h',
73         'views/bounded_label.cc',
74         'views/bounded_label.h',
75         'views/message_bubble_base.cc',
76         'views/message_bubble_base.h',
77         'views/message_center_bubble.cc',
78         'views/message_center_bubble.h',
79         'views/message_center_button_bar.cc',
80         'views/message_center_button_bar.h',
81         'views/message_center_focus_border.h',
82         'views/message_center_focus_border.cc',
83         'views/message_center_view.cc',
84         'views/message_center_view.h',
85         'views/message_popup_collection.cc',
86         'views/message_popup_collection.h',
87         'views/message_view.cc',
88         'views/message_view.h',
89         'views/notifier_settings_view.cc',
90         'views/notifier_settings_view.h',
91         'views/notification_view.cc',
92         'views/notification_view.h',
93         'views/padded_button.cc',
94         'views/padded_button.h',
95         'views/toast_contents_view.cc',
96         'views/toast_contents_view.h',
97       ],
98       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
99       'msvs_disabled_warnings': [ 4267, ],
100       'conditions': [
101         ['toolkit_views==1', {
102           'dependencies': [
103             '../events/events.gyp:events',
104             '../views/views.gyp:views',
105           ],
106         }, {
107           'sources/': [
108             ['exclude', 'views/'],
109           ],
110         }],
111         ['use_ash==0', {
112           'sources!': [
113             'views/message_bubble_base.cc',
114             'views/message_bubble_base.h',
115             'views/message_center_bubble.cc',
116             'views/message_center_bubble.h',
117             'views/message_popup_bubble.cc',
118             'views/message_popup_bubble.h',
119           ],
120         }],
121         ['OS=="mac"', {
122           'dependencies': [
123             '../ui.gyp:ui_cocoa_third_party_toolkits',
124           ],
125           'include_dirs': [
126             '../../third_party/GTM',
127           ],
128         }],
129         ['toolkit_views==1', {
130           'dependencies': [
131             '../compositor/compositor.gyp:compositor',
132           ],
133         }],
134         ['notifications==0', {  # Android and iOS.
135           'sources/': [
136             # Exclude everything except dummy impl.
137             ['exclude', '\\.(cc|mm)$'],
138             ['include', '^dummy_message_center\\.cc$'],
139             ['include', '^message_center_switches\\.cc$'],
140           ],
141         }, {  # notifications==1
142           'sources!': [ 'dummy_message_center.cc' ],
143         }],
144       ],
145     },  # target_name: message_center
146     {
147       'target_name': 'message_center_test_support',
148       'type': 'static_library',
149       'dependencies': [
150         '../../base/base.gyp:base',
151         '../../base/base.gyp:test_support_base',
152         '../../skia/skia.gyp:skia',
153         '../gfx/gfx.gyp:gfx',
154         '../ui.gyp:ui',
155         'message_center',
156       ],
157       'sources': [
158         'fake_message_center.h',
159         'fake_message_center.cc',
160         'fake_notifier_settings_provider.h',
161         'fake_notifier_settings_provider.cc',
162       ],
163     },  # target_name: message_center_test_support
164     {
165       'target_name': 'message_center_unittests',
166       'type': 'executable',
167       'dependencies': [
168         '../../base/base.gyp:base',
169         '../../base/base.gyp:test_support_base',
170         '../../chrome/chrome_resources.gyp:packed_resources',
171         '../../skia/skia.gyp:skia',
172         '../../testing/gtest.gyp:gtest',
173         '../../url/url.gyp:url_lib',
174         '../../url/url.gyp:url_lib',
175         '../gfx/gfx.gyp:gfx',
176         '../resources/ui_resources.gyp:ui_resources',
177         '../ui.gyp:ui',
178         '../ui_unittests.gyp:run_ui_unittests',
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         ['desktop_linux == 1 or chromeos == 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   ],