blob: ebcc02e3f1feb9b9c86ab501286e6e5b2d852061 [file] [log] [blame]
miguelgf052abf2016-11-07 20:27:181// 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 <Foundation/Foundation.h>
9
10// Stubs NSUserNotificationCenter so it can be used in tests without actually
11// displaying notifications.
12// Unlike the real class this is not a singleton and the lifecycle needs to be
13// handled by the caller.
14// See notification_platform_bridge_mac_unittest.mm for an example.
15@interface StubNotificationCenter : NSUserNotificationCenter
16- (instancetype)init;
17- (void)setDelegate:(id<NSUserNotificationCenterDelegate>)delegate;
18
19@end
20
21#endif // CHROME_BROWSER_NOTIFICATIONS_STUB_NOTIFICATION_CENTER_MAC_H_