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/ui_base.gyp:ui_base',
     20         '../gfx/gfx.gyp:gfx',
     21         '../gfx/gfx.gyp:gfx_geometry',
     22         '../resources/ui_resources.gyp:ui_resources',
     23         '../strings/ui_strings.gyp:ui_strings',
     24       ],
     25       'defines': [
     26         'MESSAGE_CENTER_IMPLEMENTATION',
     27       ],
     28       'sources': [
     29         'cocoa/notification_controller.h',
     30         'cocoa/notification_controller.mm',
     31         'cocoa/opaque_views.h',
     32         'cocoa/opaque_views.mm',
     33         'cocoa/popup_collection.h',
     34         'cocoa/popup_collection.mm',
     35         'cocoa/popup_controller.h',
     36         'cocoa/popup_controller.mm',
     37         'cocoa/settings_controller.h',
     38         'cocoa/settings_controller.mm',
     39         'cocoa/settings_entry_view.h',
     40         'cocoa/settings_entry_view.mm',
     41         'cocoa/status_item_view.h',
     42         'cocoa/status_item_view.mm',
     43         'cocoa/tray_controller.h',
     44         'cocoa/tray_controller.mm',
     45         'cocoa/tray_view_controller.h',
     46         'cocoa/tray_view_controller.mm',
     47         'dummy_message_center.cc',
     48         'message_center.cc',
     49         'message_center.h',
     50         'message_center_export.h',
     51         'notification_delegate.cc',
     52         'notification_delegate.h',
     53         'message_center_impl.cc',
     54         'message_center_impl.h',
     55         'message_center_observer.h',
     56         'message_center_style.cc',
     57         'message_center_style.h',
     58         'message_center_tray.cc',
     59         'message_center_tray.h',
     60         'message_center_tray_delegate.h',
     61         'message_center_types.h',
     62         'notification.cc',
     63         'notification.h',
     64         'notification_blocker.cc',
     65         'notification_blocker.h',
     66         'notification_list.cc',
     67         'notification_list.h',
     68         'notification_types.cc',
     69         'notification_types.h',
     70         'notifier_settings.cc',
     71         'notifier_settings.h',
     72         'views/bounded_label.cc',
     73         'views/bounded_label.h',
     74         'views/constants.h',
     75         'views/message_bubble_base.cc',
     76         'views/message_bubble_base.h',
     77         'views/message_center_controller.h',
     78         'views/message_center_bubble.cc',
     79         'views/message_center_bubble.h',
     80         'views/message_center_button_bar.cc',
     81         'views/message_center_button_bar.h',
     82         'views/message_center_view.cc',
     83         'views/message_center_view.h',
     84         'views/message_popup_collection.cc',
     85         'views/message_popup_collection.h',
     86         'views/message_view.cc',
     87         'views/message_view.h',
     88         'views/message_view_context_menu_controller.cc',
     89         'views/message_view_context_menu_controller.h',
     90         'views/notifier_settings_view.cc',
     91         'views/notifier_settings_view.h',
     92         'views/notification_button.cc',
     93         'views/notification_button.h',
     94         'views/notification_view.cc',
     95         'views/notification_view.h',
     96         'views/padded_button.cc',
     97         'views/padded_button.h',
     98         'views/proportional_image_view.cc',
     99         'views/proportional_image_view.h',
    100         'views/toast_contents_view.cc',
    101         'views/toast_contents_view.h',
    102       ],
    103       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
    104       'msvs_disabled_warnings': [ 4267, ],
    105       'conditions': [
    106         # This condition is for Windows 8 Metro mode support.  We need to
    107         # specify a particular desktop during widget creation in that case.
    108         # This is done using the desktop aura native widget framework.
    109         ['use_ash==1 and OS=="win"', {
    110           'dependencies': [
    111             '../aura/aura.gyp:aura',
    112           ],
    113         }],
    114         ['toolkit_views==1', {
    115           'dependencies': [
    116             '../events/events.gyp:events',
    117             '../views/views.gyp:views',
    118             '../compositor/compositor.gyp:compositor',
    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         # iOS disables notifications altogether, Android implements its own
    136         # notification UI manager instead of deferring to the message center.
    137         ['notifications==0 or OS=="android"', {
    138           'sources/': [
    139             # Exclude everything except dummy impl.
    140             ['exclude', '\\.(cc|mm)$'],
    141             ['include', '^dummy_message_center\\.cc$'],
    142             ['include', '^message_center_switches\\.cc$'],
    143           ],
    144         }, {  # notifications==1
    145           'sources!': [ 'dummy_message_center.cc' ],
    146         }],
    147         # Include a minimal set of files required for notifications on Android.
    148         ['OS=="android"', {
    149           'sources/': [
    150             ['include', '^notification\\.cc$'],
    151             ['include', '^notification_delegate\\.cc$'],
    152             ['include', '^notifier_settings\\.cc$'],
    153           ],
    154         }],
    155       ],
    156     },  # target_name: message_center
    157     {
    158       'target_name': 'message_center_test_support',
    159       'type': 'static_library',
    160       'dependencies': [
    161         '../../base/base.gyp:base',
    162         '../../base/base.gyp:test_support_base',
    163         '../../skia/skia.gyp:skia',
    164         '../base/ui_base.gyp:ui_base',
    165         '../gfx/gfx.gyp:gfx',
    166         '../gfx/gfx.gyp:gfx_geometry',
    167         'message_center',
    168       ],
    169       'sources': [
    170         'fake_message_center.h',
    171         'fake_message_center.cc',
    172         'fake_message_center_tray_delegate.h',
    173         'fake_message_center_tray_delegate.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         '../../skia/skia.gyp:skia',
    185         '../../testing/gtest.gyp:gtest',
    186         '../../url/url.gyp:url_lib',
    187         '../base/ui_base.gyp:ui_base',
    188         '../gfx/gfx.gyp:gfx',
    189         '../gfx/gfx.gyp:gfx_geometry',
    190         '../resources/ui_resources.gyp:ui_resources',
    191         '../resources/ui_resources.gyp:ui_test_pak',
    192         'message_center',
    193         'message_center_test_support',
    194       ],
    195       'sources': [
    196         'cocoa/notification_controller_unittest.mm',
    197         'cocoa/popup_collection_unittest.mm',
    198         'cocoa/popup_controller_unittest.mm',
    199         'cocoa/settings_controller_unittest.mm',
    200         'cocoa/status_item_view_unittest.mm',
    201         'cocoa/tray_controller_unittest.mm',
    202         'cocoa/tray_view_controller_unittest.mm',
    203         'message_center_tray_unittest.cc',
    204         'message_center_impl_unittest.cc',
    205         'notification_delegate_unittest.cc',
    206         'notification_list_unittest.cc',
    207         'test/run_all_unittests.cc',
    208       ],
    209       'conditions': [
    210         ['OS=="mac"', {
    211           'dependencies': [
    212             '../gfx/gfx.gyp:gfx_test_support',
    213           ],
    214         }],
    215         ['toolkit_views==1', {
    216           'dependencies': [
    217             # Compositor is needed by message_center_view_unittest.cc
    218             # and for the fonts used by bounded_label_unittest.cc.
    219             '../compositor/compositor.gyp:compositor',
    220             '../views/views.gyp:views',
    221             '../views/views.gyp:views_test_support',
    222           ],
    223           'sources': [
    224             'views/bounded_label_unittest.cc',
    225             'views/message_center_view_unittest.cc',
    226             'views/message_popup_collection_unittest.cc',
    227             'views/notification_view_unittest.cc',
    228             'views/notifier_settings_view_unittest.cc',
    229           ],
    230         }],
    231         ['notifications==0', {  # Android and iOS.
    232           'sources/': [
    233             # Exclude everything except main().
    234             ['exclude', '\\.(cc|mm)$'],
    235             ['include', '^test/run_all_unittests\\.cc$'],
    236           ],
    237         }],
    238         # See http://crbug.com/162998#c4 for why this is needed.
    239         ['OS=="linux" and use_allocator!="none"', {
    240           'dependencies': [
    241             '../../base/allocator/allocator.gyp:allocator',
    242           ],
    243         }],
    244       ],
    245     },  # target_name: message_center_unittests
    246   ],
    247 }
    248