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 '../ui.gyp:ui', 21 '../ui.gyp:ui_resources', 22 ], 23 'defines': [ 24 'MESSAGE_CENTER_IMPLEMENTATION', 25 ], 26 'sources': [ 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', 33 'cocoa/settings_controller.h', 34 'cocoa/settings_controller.mm', 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', 41 'dummy_message_center.cc', 42 'message_center.cc', 43 'message_center.h', 44 'message_center_export.h', 45 'notification_delegate.cc', 46 'notification_delegate.h', 47 'message_center_impl.cc', 48 'message_center_impl.h', 49 'message_center_observer.h', 50 'message_center_style.cc', 51 'message_center_style.h', 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', 61 'notification_list.cc', 62 'notification_list.h', 63 'notification_types.cc', 64 'notification_types.h', 65 'notifier_settings.cc', 66 'notifier_settings.h', 67 'views/bounded_label.cc', 68 'views/bounded_label.h', 69 'views/message_bubble_base.cc', 70 'views/message_bubble_base.h', 71 'views/message_center_bubble.cc', 72 'views/message_center_bubble.h', 73 'views/message_center_button_bar.cc', 74 'views/message_center_button_bar.h', 75 'views/message_center_view.cc', 76 'views/message_center_view.h', 77 'views/message_popup_collection.cc', 78 'views/message_popup_collection.h', 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', 85 'views/toast_contents_view.cc', 86 'views/toast_contents_view.h', 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 }], 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 }], 110 ['OS=="mac"', { 111 'dependencies': [ 112 '../ui.gyp:ui_cocoa_third_party_toolkits', 113 ], 114 'include_dirs': [ 115 '../../third_party/GTM', 116 ], 117 }], 118 ['toolkit_views==1', { 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 ], 130 }, { # notifications==1 131 'sources!': [ 'dummy_message_center.cc' ], 132 }], 133 ], 134 }, # target_name: message_center 135 { 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 { 153 'target_name': 'message_center_unittests', 154 'type': 'executable', 155 'dependencies': [ 156 '../../base/base.gyp:base', 157 '../../base/base.gyp:test_support_base', 158 '../../skia/skia.gyp:skia', 159 '../../testing/gtest.gyp:gtest', 160 '../ui.gyp:run_ui_unittests', 161 '../ui.gyp:ui', 162 '../../url/url.gyp:url_lib', 163 'message_center', 164 'message_center_test_support', 165 ], 166 'sources': [ 167 'cocoa/notification_controller_unittest.mm', 168 'cocoa/popup_collection_unittest.mm', 169 'cocoa/popup_controller_unittest.mm', 170 'cocoa/settings_controller_unittest.mm', 171 'cocoa/status_item_view_unittest.mm', 172 'cocoa/tray_controller_unittest.mm', 173 'cocoa/tray_view_controller_unittest.mm', 174 'message_center_tray_unittest.cc', 175 'message_center_impl_unittest.cc', 176 'notification_list_unittest.cc', 177 'test/run_all_unittests.cc', 178 ], 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', 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 }], 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 }], 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 }], 212 ], 213 }, # target_name: message_center_unittests 214 ], 215 } 216