Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2586)

Unified Diff: chrome/browser/notifications/stub_notification_center_mac.h

Issue 2480203002: ui: Cleanup class/struct forward declarations (Closed)
Patch Set: Sync CL to position 430550 Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..ebcc02e3f1feb9b9c86ab501286e6e5b2d852061
--- /dev/null
+++ b/chrome/browser/notifications/stub_notification_center_mac.h
@@ -0,0 +1,21 @@
+// 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 <Foundation/Foundation.h>
+
+// Stubs NSUserNotificationCenter so it can be used in tests without actually
+// displaying notifications.
+// Unlike the real class this is not a singleton and the lifecycle needs to be
+// handled by the caller.
+// See notification_platform_bridge_mac_unittest.mm for an example.
+@interface StubNotificationCenter : NSUserNotificationCenter
+- (instancetype)init;
+- (void)setDelegate:(id<NSUserNotificationCenterDelegate>)delegate;
+
+@end
+
+#endif // CHROME_BROWSER_NOTIFICATIONS_STUB_NOTIFICATION_CENTER_MAC_H_

Powered by Google App Engine
This is Rietveld 408576698