blob: dc1f1ab6feadf8ea81d2acd05282cf3364cf1c06 [file] [log] [blame]
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001# 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',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +000015 '../../base/base.gyp:base_i18n',
16 '../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
Torne (Richard Coles)58218062012-11-14 11:43:16 +000017 '../../skia/skia.gyp:skia',
Torne (Richard Coles)868fa2f2013-06-11 10:57:03 +010018 '../../url/url.gyp:url_lib',
Torne (Richard Coles)58218062012-11-14 11:43:16 +000019 '../base/strings/ui_strings.gyp:ui_strings',
Torne (Richard Coles)58218062012-11-14 11:43:16 +000020 '../ui.gyp:ui',
21 '../ui.gyp:ui_resources',
Torne (Richard Coles)58218062012-11-14 11:43:16 +000022 ],
23 'defines': [
24 'MESSAGE_CENTER_IMPLEMENTATION',
25 ],
26 'sources': [
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +010027 'cocoa/notification_controller.h',
28 'cocoa/notification_controller.mm',
29 'cocoa/popup_collection.h',
30 'cocoa/popup_collection.mm',
31 'cocoa/popup_controller.h',
32 'cocoa/popup_controller.mm',
Torne (Richard Coles)868fa2f2013-06-11 10:57:03 +010033 'cocoa/settings_controller.h',
34 'cocoa/settings_controller.mm',
Torne (Richard Coles)90dce4d2013-05-29 14:40:03 +010035 'cocoa/status_item_view.h',
36 'cocoa/status_item_view.mm',
37 'cocoa/tray_controller.h',
38 'cocoa/tray_controller.mm',
39 'cocoa/tray_view_controller.h',
40 'cocoa/tray_view_controller.mm',
Torne (Richard Coles)a93a17c2013-05-15 11:34:50 +010041 'dummy_message_center.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +000042 'message_center.cc',
43 'message_center.h',
Torne (Richard Coles)58218062012-11-14 11:43:16 +000044 'message_center_export.h',
Torne (Richard Coles)90dce4d2013-05-29 14:40:03 +010045 'notification_delegate.cc',
46 'notification_delegate.h',
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +010047 'message_center_impl.cc',
48 'message_center_impl.h',
49 'message_center_observer.h',
Torne (Richard Coles)90dce4d2013-05-29 14:40:03 +010050 'message_center_style.cc',
51 'message_center_style.h',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +000052 'message_center_switches.cc',
53 'message_center_switches.h',
54 'message_center_tray.cc',
55 'message_center_tray.h',
56 'message_center_tray_delegate.h',
57 'message_center_util.cc',
58 'message_center_util.h',
59 'notification.cc',
60 'notification.h',
Torne (Richard Coles)58218062012-11-14 11:43:16 +000061 'notification_list.cc',
62 'notification_list.h',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +000063 'notification_types.cc',
64 'notification_types.h',
65 'notifier_settings.cc',
66 'notifier_settings.h',
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +010067 'views/bounded_label.cc',
68 'views/bounded_label.h',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +000069 'views/message_bubble_base.cc',
70 'views/message_bubble_base.h',
71 'views/message_center_bubble.cc',
72 'views/message_center_bubble.h',
Ben Murdochbb1529c2013-08-08 10:24:53 +010073 'views/message_center_button_bar.cc',
74 'views/message_center_button_bar.h',
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +010075 'views/message_center_view.cc',
76 'views/message_center_view.h',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +000077 'views/message_popup_collection.cc',
78 'views/message_popup_collection.h',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +000079 'views/message_view.cc',
80 'views/message_view.h',
81 'views/notifier_settings_view.cc',
82 'views/notifier_settings_view.h',
83 'views/notification_view.cc',
84 'views/notification_view.h',
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +010085 'views/toast_contents_view.cc',
86 'views/toast_contents_view.h',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +000087 ],
88 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
89 'msvs_disabled_warnings': [ 4267, ],
90 'conditions': [
91 ['toolkit_views==1', {
92 'dependencies': [
93 '../views/views.gyp:views',
94 ],
95 }, {
96 'sources/': [
97 ['exclude', 'views/'],
98 ],
99 }],
Ben Murdoch7dbb3d52013-07-17 14:55:54 +0100100 ['use_ash==0', {
101 'sources!': [
102 'views/message_bubble_base.cc',
103 'views/message_bubble_base.h',
104 'views/message_center_bubble.cc',
105 'views/message_center_bubble.h',
106 'views/message_popup_bubble.cc',
107 'views/message_popup_bubble.h',
108 ],
109 }],
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100110 ['OS=="mac"', {
111 'dependencies': [
112 '../ui.gyp:ui_cocoa_third_party_toolkits',
113 ],
114 'include_dirs': [
115 '../../third_party/GTM',
116 ],
117 }],
Ben Murdocheb525c52013-07-10 11:40:50 +0100118 ['toolkit_views==1', {
Torne (Richard Coles)a93a17c2013-05-15 11:34:50 +0100119 'dependencies': [
120 '../compositor/compositor.gyp:compositor',
121 ],
122 }],
123 ['notifications==0', { # Android and iOS.
124 'sources/': [
125 # Exclude everything except dummy impl.
126 ['exclude', '\\.(cc|mm)$'],
127 ['include', '^dummy_message_center\\.cc$'],
128 ['include', '^message_center_switches\\.cc$'],
129 ],
Torne (Richard Coles)90dce4d2013-05-29 14:40:03 +0100130 }, { # notifications==1
Torne (Richard Coles)a93a17c2013-05-15 11:34:50 +0100131 'sources!': [ 'dummy_message_center.cc' ],
132 }],
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000133 ],
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100134 }, # target_name: message_center
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000135 {
Ben Murdocheb525c52013-07-10 11:40:50 +0100136 'target_name': 'message_center_test_support',
137 'type': 'static_library',
138 'dependencies': [
139 '../../base/base.gyp:base',
140 '../../base/base.gyp:test_support_base',
141 '../../skia/skia.gyp:skia',
142 '../ui.gyp:ui',
143 'message_center',
144 ],
145 'sources': [
146 'fake_message_center.h',
147 'fake_message_center.cc',
148 'fake_notifier_settings_provider.h',
149 'fake_notifier_settings_provider.cc',
150 ],
151 }, # target_name: message_center_test_support
152 {
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000153 'target_name': 'message_center_unittests',
154 'type': 'executable',
155 'dependencies': [
156 '../../base/base.gyp:base',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000157 '../../base/base.gyp:test_support_base',
158 '../../skia/skia.gyp:skia',
159 '../../testing/gtest.gyp:gtest',
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100160 '../ui.gyp:run_ui_unittests',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000161 '../ui.gyp:ui',
Ben Murdocheb525c52013-07-10 11:40:50 +0100162 '../../url/url.gyp:url_lib',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000163 'message_center',
Ben Murdocheb525c52013-07-10 11:40:50 +0100164 'message_center_test_support',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000165 ],
166 'sources': [
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100167 'cocoa/notification_controller_unittest.mm',
168 'cocoa/popup_collection_unittest.mm',
169 'cocoa/popup_controller_unittest.mm',
Torne (Richard Coles)868fa2f2013-06-11 10:57:03 +0100170 'cocoa/settings_controller_unittest.mm',
Torne (Richard Coles)90dce4d2013-05-29 14:40:03 +0100171 'cocoa/status_item_view_unittest.mm',
Torne (Richard Coles)868fa2f2013-06-11 10:57:03 +0100172 'cocoa/tray_controller_unittest.mm',
Torne (Richard Coles)90dce4d2013-05-29 14:40:03 +0100173 'cocoa/tray_view_controller_unittest.mm',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000174 'message_center_tray_unittest.cc',
Torne (Richard Coles)868fa2f2013-06-11 10:57:03 +0100175 'message_center_impl_unittest.cc',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000176 'notification_list_unittest.cc',
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100177 'test/run_all_unittests.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000178 ],
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100179 'conditions': [
180 ['OS=="mac"', {
181 'dependencies': [
182 '../ui.gyp:ui_test_support',
183 ],
184 }],
185 ['toolkit_views==1', {
186 'dependencies': [
187 # Compositor is needed by message_center_view_unittest.cc
188 # and for the fonts used by bounded_label_unittest.cc.
189 '../compositor/compositor.gyp:compositor',
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100190 '../views/views.gyp:views',
191 '../views/views.gyp:views_test_support',
192 ],
193 'sources': [
194 'views/bounded_label_unittest.cc',
195 'views/message_center_view_unittest.cc',
196 'views/message_popup_collection_unittest.cc',
197 ],
198 }],
Torne (Richard Coles)a93a17c2013-05-15 11:34:50 +0100199 ['notifications==0', { # Android and iOS.
200 'sources/': [
201 # Exclude everything except main().
202 ['exclude', '\\.(cc|mm)$'],
203 ['include', '^test/run_all_unittests\\.cc$'],
204 ],
205 }],
Ben Murdocheb525c52013-07-10 11:40:50 +0100206 # See http://crbug.com/162998#c4 for why this is needed.
207 ['OS=="linux" and linux_use_tcmalloc==1', {
208 'dependencies': [
209 '../../base/allocator/allocator.gyp:allocator',
210 ],
211 }],
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100212 ],
213 }, # target_name: message_center_unittests
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000214 ],
215}