Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 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', |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 15 | '../../base/base.gyp:base_i18n', |
| 16 | '../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 17 | '../../skia/skia.gyp:skia', |
Torne (Richard Coles) | 868fa2f | 2013-06-11 10:57:03 +0100 | [diff] [blame] | 18 | '../../url/url.gyp:url_lib', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 19 | '../base/strings/ui_strings.gyp:ui_strings', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 20 | '../ui.gyp:ui', |
| 21 | '../ui.gyp:ui_resources', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 22 | ], |
| 23 | 'defines': [ |
| 24 | 'MESSAGE_CENTER_IMPLEMENTATION', |
| 25 | ], |
| 26 | 'sources': [ |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 27 | '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) | 868fa2f | 2013-06-11 10:57:03 +0100 | [diff] [blame] | 33 | 'cocoa/settings_controller.h', |
| 34 | 'cocoa/settings_controller.mm', |
Torne (Richard Coles) | 90dce4d | 2013-05-29 14:40:03 +0100 | [diff] [blame] | 35 | '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) | a93a17c | 2013-05-15 11:34:50 +0100 | [diff] [blame] | 41 | 'dummy_message_center.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 42 | 'message_center.cc', |
| 43 | 'message_center.h', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 44 | 'message_center_export.h', |
Torne (Richard Coles) | 90dce4d | 2013-05-29 14:40:03 +0100 | [diff] [blame] | 45 | 'notification_delegate.cc', |
| 46 | 'notification_delegate.h', |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 47 | 'message_center_impl.cc', |
| 48 | 'message_center_impl.h', |
| 49 | 'message_center_observer.h', |
Torne (Richard Coles) | 90dce4d | 2013-05-29 14:40:03 +0100 | [diff] [blame] | 50 | 'message_center_style.cc', |
| 51 | 'message_center_style.h', |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 52 | '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) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 61 | 'notification_list.cc', |
| 62 | 'notification_list.h', |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 63 | 'notification_types.cc', |
| 64 | 'notification_types.h', |
| 65 | 'notifier_settings.cc', |
| 66 | 'notifier_settings.h', |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 67 | 'views/bounded_label.cc', |
| 68 | 'views/bounded_label.h', |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 69 | 'views/message_bubble_base.cc', |
| 70 | 'views/message_bubble_base.h', |
| 71 | 'views/message_center_bubble.cc', |
| 72 | 'views/message_center_bubble.h', |
Ben Murdoch | bb1529c | 2013-08-08 10:24:53 +0100 | [diff] [blame^] | 73 | 'views/message_center_button_bar.cc', |
| 74 | 'views/message_center_button_bar.h', |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 75 | 'views/message_center_view.cc', |
| 76 | 'views/message_center_view.h', |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 77 | 'views/message_popup_collection.cc', |
| 78 | 'views/message_popup_collection.h', |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 79 | '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) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 85 | 'views/toast_contents_view.cc', |
| 86 | 'views/toast_contents_view.h', |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 87 | ], |
| 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 Murdoch | 7dbb3d5 | 2013-07-17 14:55:54 +0100 | [diff] [blame] | 100 | ['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) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 110 | ['OS=="mac"', { |
| 111 | 'dependencies': [ |
| 112 | '../ui.gyp:ui_cocoa_third_party_toolkits', |
| 113 | ], |
| 114 | 'include_dirs': [ |
| 115 | '../../third_party/GTM', |
| 116 | ], |
| 117 | }], |
Ben Murdoch | eb525c5 | 2013-07-10 11:40:50 +0100 | [diff] [blame] | 118 | ['toolkit_views==1', { |
Torne (Richard Coles) | a93a17c | 2013-05-15 11:34:50 +0100 | [diff] [blame] | 119 | '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) | 90dce4d | 2013-05-29 14:40:03 +0100 | [diff] [blame] | 130 | }, { # notifications==1 |
Torne (Richard Coles) | a93a17c | 2013-05-15 11:34:50 +0100 | [diff] [blame] | 131 | 'sources!': [ 'dummy_message_center.cc' ], |
| 132 | }], |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 133 | ], |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 134 | }, # target_name: message_center |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 135 | { |
Ben Murdoch | eb525c5 | 2013-07-10 11:40:50 +0100 | [diff] [blame] | 136 | '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) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 153 | 'target_name': 'message_center_unittests', |
| 154 | 'type': 'executable', |
| 155 | 'dependencies': [ |
| 156 | '../../base/base.gyp:base', |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 157 | '../../base/base.gyp:test_support_base', |
| 158 | '../../skia/skia.gyp:skia', |
| 159 | '../../testing/gtest.gyp:gtest', |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 160 | '../ui.gyp:run_ui_unittests', |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 161 | '../ui.gyp:ui', |
Ben Murdoch | eb525c5 | 2013-07-10 11:40:50 +0100 | [diff] [blame] | 162 | '../../url/url.gyp:url_lib', |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 163 | 'message_center', |
Ben Murdoch | eb525c5 | 2013-07-10 11:40:50 +0100 | [diff] [blame] | 164 | 'message_center_test_support', |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 165 | ], |
| 166 | 'sources': [ |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 167 | 'cocoa/notification_controller_unittest.mm', |
| 168 | 'cocoa/popup_collection_unittest.mm', |
| 169 | 'cocoa/popup_controller_unittest.mm', |
Torne (Richard Coles) | 868fa2f | 2013-06-11 10:57:03 +0100 | [diff] [blame] | 170 | 'cocoa/settings_controller_unittest.mm', |
Torne (Richard Coles) | 90dce4d | 2013-05-29 14:40:03 +0100 | [diff] [blame] | 171 | 'cocoa/status_item_view_unittest.mm', |
Torne (Richard Coles) | 868fa2f | 2013-06-11 10:57:03 +0100 | [diff] [blame] | 172 | 'cocoa/tray_controller_unittest.mm', |
Torne (Richard Coles) | 90dce4d | 2013-05-29 14:40:03 +0100 | [diff] [blame] | 173 | 'cocoa/tray_view_controller_unittest.mm', |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 174 | 'message_center_tray_unittest.cc', |
Torne (Richard Coles) | 868fa2f | 2013-06-11 10:57:03 +0100 | [diff] [blame] | 175 | 'message_center_impl_unittest.cc', |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 176 | 'notification_list_unittest.cc', |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 177 | 'test/run_all_unittests.cc', |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 178 | ], |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 179 | '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) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 190 | '../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) | a93a17c | 2013-05-15 11:34:50 +0100 | [diff] [blame] | 199 | ['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 Murdoch | eb525c5 | 2013-07-10 11:40:50 +0100 | [diff] [blame] | 206 | # 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) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 212 | ], |
| 213 | }, # target_name: message_center_unittests |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 214 | ], |
| 215 | } |