OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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 #ifndef CHROME_BROWSER_NOTIFICATIONS_STUB_NOTIFICATION_CENTER_MAC_H_ |
| 6 #define CHROME_BROWSER_NOTIFICATIONS_STUB_NOTIFICATION_CENTER_MAC_H_ |
| 7 |
| 8 #import <AppKit/AppKit.h> |
| 9 |
| 10 @class NSUserNotificationCenterDelegate; |
| 11 |
| 12 // Stubs NSUserNotificationCenter so it can be used in tests without actually |
| 13 // displaying notifications. |
| 14 // Unlike the real class this is not a singleton and the lifecycle needs to be |
| 15 // handled by the caller. |
| 16 // See notification_platform_bridge_mac_unittest.mm for an example. |
| 17 @interface StubNotificationCenter : NSUserNotificationCenter |
| 18 - (instancetype)init; |
| 19 - (void)setDelegate:(NSUserNotificationCenterDelegate*)delegate; |
| 20 |
| 21 @end |
| 22 |
| 23 #endif // CHROME_BROWSER_NOTIFICATIONS_STUB_NOTIFICATION_CENTER_MAC_H_ |
OLD | NEW |