Chromium Code Reviews| Index: chrome/browser/notifications/stub_notification_center_mac.h |
| diff --git a/chrome/browser/notifications/stub_notification_center_mac.h b/chrome/browser/notifications/stub_notification_center_mac.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f817d5d8cabb0bb223226ae5293df4b06c565978 |
| --- /dev/null |
| +++ b/chrome/browser/notifications/stub_notification_center_mac.h |
| @@ -0,0 +1,25 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_NOTIFICATIONS_STUB_NOTIFICATION_CENTER_MAC_H_ |
| +#define CHROME_BROWSER_NOTIFICATIONS_STUB_NOTIFICATION_CENTER_MAC_H_ |
| + |
| +#import <AppKit/AppKit.h> |
| + |
| +@class NSUserNotificationCenterDelegate; |
|
Robert Sesek
2016/11/01 17:09:01
Not needed with AppKit.h?
Miguel Garcia
2016/11/07 14:18:41
Peter asked the same thing. I swear it does not co
Robert Sesek
2016/11/07 16:16:50
Oh, try Cocoa/Cocoa.h instead. NSUserNotificationC
Miguel Garcia
2016/11/07 18:22:25
Done, (NSUserNotificationCenterDelegate is a proto
|
| + |
| +// Stubs NSUserNotificationCenter so it can be used in tests without actually |
| +// displaying |
| +// notifications. |
|
Robert Sesek
2016/11/01 17:09:01
Join with previous line.
Miguel Garcia
2016/11/07 14:18:41
Done.
|
| +// Unlike the real class this is not a singleton and the lifecycle needs to be |
| +// handled |
| +// by the caller. |
|
Robert Sesek
2016/11/01 17:09:01
Join with previous line.
Miguel Garcia
2016/11/07 14:18:41
Done.
|
| +// See notification_platform_bridge_mac_unittest.mm for an example. |
| +@interface StubNotificationCenter : NSUserNotificationCenter |
| +- (instancetype)init; |
| +- (void)setDelegate:(NSUserNotificationCenterDelegate*)delegate; |
| + |
| +@end |
| + |
| +#endif // CHROME_BROWSER_NOTIFICATIONS_STUB_NOTIFICATION_CENTER_MAC_H_ |