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