OLD | NEW |
(Empty) | |
| 1 # Copyright 2014 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 import("//build/config/features.gni") |
| 6 import("//build/config/ui.gni") |
| 7 |
| 8 component("message_center") { |
| 9 defines = [ "MESSAGE_CENTER_IMPLEMENTATION" ] |
| 10 |
| 11 deps = [ |
| 12 "//base", |
| 13 "//base:i18n", |
| 14 "//base/third_party/dynamic_annotations", |
| 15 "//skia", |
| 16 "//ui/base", |
| 17 "//ui/gfx", |
| 18 "//ui/gfx/geometry", |
| 19 "//ui/resources", |
| 20 "//ui/strings", |
| 21 ] |
| 22 |
| 23 if (enable_notifications) { |
| 24 sources = [ |
| 25 "cocoa/notification_controller.h", |
| 26 "cocoa/notification_controller.mm", |
| 27 "cocoa/opaque_views.h", |
| 28 "cocoa/opaque_views.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/settings_entry_view.h", |
| 36 "cocoa/settings_entry_view.mm", |
| 37 "cocoa/status_item_view.h", |
| 38 "cocoa/status_item_view.mm", |
| 39 "cocoa/tray_controller.h", |
| 40 "cocoa/tray_controller.mm", |
| 41 "cocoa/tray_view_controller.h", |
| 42 "cocoa/tray_view_controller.mm", |
| 43 "message_center.cc", |
| 44 "message_center.h", |
| 45 "message_center_export.h", |
| 46 "notification_delegate.cc", |
| 47 "notification_delegate.h", |
| 48 "message_center_impl.cc", |
| 49 "message_center_impl.h", |
| 50 "message_center_observer.h", |
| 51 "message_center_style.cc", |
| 52 "message_center_style.h", |
| 53 "message_center_tray.cc", |
| 54 "message_center_tray.h", |
| 55 "message_center_tray_delegate.h", |
| 56 "message_center_types.h", |
| 57 "notification.cc", |
| 58 "notification.h", |
| 59 "notification_blocker.cc", |
| 60 "notification_blocker.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 ] |
| 68 |
| 69 if (is_win) { |
| 70 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. |
| 71 cflags = [ "/wd4267" ] |
| 72 deps += [ "//ui/aura" ] |
| 73 } |
| 74 |
| 75 if (toolkit_views) { |
| 76 sources += [ |
| 77 "views/bounded_label.cc", |
| 78 "views/bounded_label.h", |
| 79 "views/constants.h", |
| 80 "views/desktop_popup_alignment_delegate.cc", |
| 81 "views/desktop_popup_alignment_delegate.h", |
| 82 "views/message_center_controller.h", |
| 83 "views/message_center_button_bar.cc", |
| 84 "views/message_center_button_bar.h", |
| 85 "views/message_center_view.cc", |
| 86 "views/message_center_view.h", |
| 87 "views/message_popup_collection.cc", |
| 88 "views/message_popup_collection.h", |
| 89 "views/message_view.cc", |
| 90 "views/message_view.h", |
| 91 "views/message_view_context_menu_controller.cc", |
| 92 "views/message_view_context_menu_controller.h", |
| 93 "views/notifier_settings_view.cc", |
| 94 "views/notifier_settings_view.h", |
| 95 "views/notification_button.cc", |
| 96 "views/notification_button.h", |
| 97 "views/notification_view.cc", |
| 98 "views/notification_view.h", |
| 99 "views/padded_button.cc", |
| 100 "views/padded_button.h", |
| 101 "views/popup_alignment_delegate.cc", |
| 102 "views/popup_alignment_delegate.h", |
| 103 "views/proportional_image_view.cc", |
| 104 "views/proportional_image_view.h", |
| 105 "views/toast_contents_view.cc", |
| 106 "views/toast_contents_view.h", |
| 107 ] |
| 108 deps += [ |
| 109 "//ui/events", |
| 110 "//ui/views", |
| 111 "//ui/compositor", |
| 112 ] |
| 113 } |
| 114 |
| 115 if (use_ash) { |
| 116 sources += [ |
| 117 "views/message_bubble_base.cc", |
| 118 "views/message_bubble_base.h", |
| 119 "views/message_center_bubble.cc", |
| 120 "views/message_center_bubble.h", |
| 121 ] |
| 122 } |
| 123 |
| 124 } else { |
| 125 # Notification service disabled. |
| 126 sources = [ |
| 127 "dummy_message_center.cc", |
| 128 "notification_delegate.cc", |
| 129 "notification_delegate.h", |
| 130 ] |
| 131 # Android implements its own notification UI manager instead of deferring to |
| 132 # the message center (when notifications are enabled). Include a minimal |
| 133 # set of files required for notifications on Android. |
| 134 if (is_android) { |
| 135 sources += [ |
| 136 "notification.cc", |
| 137 "notification.h", |
| 138 "notifier_settings.cc", |
| 139 "notifier_settings.h", |
| 140 ] |
| 141 } |
| 142 } |
| 143 } |
| 144 |
| 145 static_library("test_support") { |
| 146 sources = [ |
| 147 "fake_message_center.h", |
| 148 "fake_message_center.cc", |
| 149 "fake_message_center_tray_delegate.h", |
| 150 "fake_message_center_tray_delegate.cc", |
| 151 "fake_notifier_settings_provider.h", |
| 152 "fake_notifier_settings_provider.cc", |
| 153 ] |
| 154 |
| 155 deps = [ |
| 156 ":message_center", |
| 157 "//base", |
| 158 "//base/test:test_support", |
| 159 "//skia", |
| 160 "//ui/gfx", |
| 161 "//ui/gfx/geometry", |
| 162 ] |
| 163 } |
| 164 |
| 165 # TODO(GYP) Enable this when media is linked. |
| 166 if (false) { |
| 167 |
| 168 test("message_center_unittests") { |
| 169 sources = [ |
| 170 "test/run_all_unittests.cc", |
| 171 ] |
| 172 |
| 173 deps = [ |
| 174 ":message_center", |
| 175 ":test_support", |
| 176 "//base", |
| 177 "//base/allocator", |
| 178 "//base/test:test_support", |
| 179 "//skia", |
| 180 "//testing/gtest", |
| 181 "//ui/base", |
| 182 "//ui/gfx", |
| 183 "//ui/gfx/geometry", |
| 184 "//ui/resources", |
| 185 "//ui/resources:ui_test_pak", |
| 186 "//url", |
| 187 ] |
| 188 |
| 189 if (enable_notifications) { |
| 190 sources += [ |
| 191 "cocoa/notification_controller_unittest.mm", |
| 192 "cocoa/popup_collection_unittest.mm", |
| 193 "cocoa/popup_controller_unittest.mm", |
| 194 "cocoa/settings_controller_unittest.mm", |
| 195 "cocoa/status_item_view_unittest.mm", |
| 196 "cocoa/tray_controller_unittest.mm", |
| 197 "cocoa/tray_view_controller_unittest.mm", |
| 198 "message_center_tray_unittest.cc", |
| 199 "message_center_impl_unittest.cc", |
| 200 "notification_delegate_unittest.cc", |
| 201 "notification_list_unittest.cc", |
| 202 ] |
| 203 |
| 204 if (is_mac) { |
| 205 deps += [ "//ui/gfx:test_support" ] |
| 206 } |
| 207 |
| 208 if (toolkit_views) { |
| 209 sources += [ |
| 210 "views/bounded_label_unittest.cc", |
| 211 "views/message_center_view_unittest.cc", |
| 212 "views/message_popup_collection_unittest.cc", |
| 213 "views/notification_view_unittest.cc", |
| 214 "views/notifier_settings_view_unittest.cc", |
| 215 ] |
| 216 deps += [ |
| 217 # Compositor is needed by message_center_view_unittest.cc and for the |
| 218 # fonts used by bounded_label_unittest.cc. |
| 219 "//ui/compositor", |
| 220 "//ui/views", |
| 221 "//ui/views:test_support", |
| 222 ] |
| 223 } |
| 224 } # enable_notifications |
| 225 } |
| 226 |
| 227 } # if false |
OLD | NEW |