Home | History | Annotate | Download | only in message_center
      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         '../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/group_view.cc',
     76         'views/group_view.h',
     77         'views/constants.h',
     78         'views/message_bubble_base.cc',
     79         'views/message_bubble_base.h',
     80         'views/message_center_controller.h',
     81         'views/message_center_bubble.cc',
     82         'views/message_center_bubble.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/notifier_settings_view.cc',
     92         'views/notifier_settings_view.h',
     93         'views/notification_button.cc',
     94         'views/notification_button.h',
     95         'views/notification_view.cc',
     96         'views/notification_view.h',
     97         'views/padded_button.cc',
     98         'views/padded_button.h',
     99         'views/proportional_image_view.cc',
    100         'views/proportional_image_view.h',
    101         'views/toast_contents_view.cc',
    102         'views/toast_contents_view.h',
    103       ],
    104       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
    105       'msvs_disabled_warnings': [ 4267, ],
    106       'conditions': [
    107         # This condition is for Windows 8 Metro mode support.  We need to
    108         # specify a particular desktop during widget creation in that case.
    109         # This is done using the desktop aura native widget framework.
    110         ['use_ash==1 and OS=="win"', {
    111           'dependencies': [
    112             '../aura/aura.gyp:aura',
    113           ],
    114         }],
    115         ['toolkit_views==1', {
    116           'dependencies': [
    117             '../events/events.gyp:events',
    118             '../views/views.gyp:views',
    119           ],
    120         }, {
    121           'sources/': [
    122             ['exclude', 'views/'],
    123           ],
    124         }],
    125         ['use_ash==0', {
    126           'sources!': [
    127             'views/message_bubble_base.cc',
    128             'views/message_bubble_base.h',
    129             'views/message_center_bubble.cc',
    130             'views/message_center_bubble.h',
    131             'views/message_popup_bubble.cc',
    132             'views/message_popup_bubble.h',
    133           ],
    134         }],
    135         ['OS=="mac"', {
    136           'dependencies': [
    137             '../ui.gyp:ui_cocoa_third_party_toolkits',
    138           ],
    139           'include_dirs': [
    140             '../../third_party/GTM',
    141           ],
    142         }],
    143         ['toolkit_views==1', {
    144           'dependencies': [
    145             '../compositor/compositor.gyp:compositor',
    146           ],
    147         }],
    148         ['notifications==0', {  # Android and iOS.
    149           'sources/': [
    150             # Exclude everything except dummy impl.
    151             ['exclude', '\\.(cc|mm)$'],
    152             ['include', '^dummy_message_center\\.cc$'],
    153             ['include', '^message_center_switches\\.cc$'],
    154           ],
    155         }, {  # notifications==1
    156           'sources!': [ 'dummy_message_center.cc' ],
    157         }],
    158       ],
    159     },  # target_name: message_center
    160     {
    161       'target_name': 'message_center_test_support',
    162       'type': 'static_library',
    163       'dependencies': [
    164         '../../base/base.gyp:base',
    165         '../../base/base.gyp:test_support_base',
    166         '../../skia/skia.gyp:skia',
    167         '../gfx/gfx.gyp:gfx',
    168         '../ui.gyp:ui',
    169         'message_center',
    170       ],
    171       'sources': [
    172         'fake_message_center.h',
    173         'fake_message_center.cc',
    174         'fake_notifier_settings_provider.h',
    175         'fake_notifier_settings_provider.cc',
    176       ],
    177     },  # target_name: message_center_test_support
    178     {
    179       'target_name': 'message_center_unittests',
    180       'type': 'executable',
    181       'dependencies': [
    182         '../../base/base.gyp:base',
    183         '../../base/base.gyp:test_support_base',
    184         '../../chrome/chrome_resources.gyp:packed_resources',
    185         '../../skia/skia.gyp:skia',
    186         '../../testing/gtest.gyp:gtest',
    187         '../../url/url.gyp:url_lib',
    188         '../../url/url.gyp:url_lib',
    189         '../gfx/gfx.gyp:gfx',
    190         '../resources/ui_resources.gyp:ui_resources',
    191         '../ui.gyp:ui',
    192         '../ui_unittests.gyp:run_ui_unittests',
    193         'message_center',
    194         'message_center_test_support',
    195       ],
    196       'sources': [
    197         'cocoa/notification_controller_unittest.mm',
    198         'cocoa/popup_collection_unittest.mm',
    199         'cocoa/popup_controller_unittest.mm',
    200         'cocoa/settings_controller_unittest.mm',
    201         'cocoa/status_item_view_unittest.mm',
    202         'cocoa/tray_controller_unittest.mm',
    203         'cocoa/tray_view_controller_unittest.mm',
    204         'message_center_tray_unittest.cc',
    205         'message_center_impl_unittest.cc',
    206         'notification_list_unittest.cc',
    207         'test/run_all_unittests.cc',
    208       ],
    209       'conditions': [
    210         ['desktop_linux == 1 or chromeos == 1 or OS=="ios"', {
    211          'dependencies': [
    212            '../base/strings/ui_strings.gyp:ui_unittest_strings',
    213          ],
    214         }],
    215         ['OS=="mac"', {
    216           'dependencies': [
    217             '../ui_unittests.gyp:ui_test_support',
    218           ],
    219         }],
    220         ['toolkit_views==1', {
    221           'dependencies': [
    222             # Compositor is needed by message_center_view_unittest.cc
    223             # and for the fonts used by bounded_label_unittest.cc.
    224             '../compositor/compositor.gyp:compositor',
    225             '../views/views.gyp:views',
    226             '../views/views.gyp:views_test_support',
    227           ],
    228           'sources': [
    229             'views/bounded_label_unittest.cc',
    230             'views/message_center_view_unittest.cc',
    231             'views/message_popup_collection_unittest.cc',
    232             'views/notifier_settings_view_unittest.cc',
    233           ],
    234         }],
    235         ['notifications==0', {  # Android and iOS.
    236           'sources/': [
    237             # Exclude everything except main().
    238             ['exclude', '\\.(cc|mm)$'],
    239             ['include', '^test/run_all_unittests\\.cc$'],
    240           ],
    241         }],
    242         # See http://crbug.com/162998#c4 for why this is needed.
    243         ['OS=="linux" and linux_use_tcmalloc==1', {
    244           'dependencies': [
    245             '../../base/allocator/allocator.gyp:allocator',
    246           ],
    247         }],
    248       ],
    249     },  # target_name: message_center_unittests
    250   ],
    251 }
    252