| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PLATFORM_BRIDGE_MAC_H_ | 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PLATFORM_BRIDGE_MAC_H_ |
| 6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PLATFORM_BRIDGE_MAC_H_ | 6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PLATFORM_BRIDGE_MAC_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 | 44 |
| 45 // Validates contents of the |response| dictionary as received from the system | 45 // Validates contents of the |response| dictionary as received from the system |
| 46 // when a notification gets activated. | 46 // when a notification gets activated. |
| 47 static bool VerifyNotificationData(NSDictionary* response) WARN_UNUSED_RESULT; | 47 static bool VerifyNotificationData(NSDictionary* response) WARN_UNUSED_RESULT; |
| 48 | 48 |
| 49 private: | 49 private: |
| 50 FRIEND_TEST_ALL_PREFIXES(NotificationPlatformBridgeMacTest, | 50 FRIEND_TEST_ALL_PREFIXES(NotificationPlatformBridgeMacTest, |
| 51 TestDisplayNoButtons); | 51 TestDisplayNoButtons); |
| 52 FRIEND_TEST_ALL_PREFIXES(NotificationPlatformBridgeMacTest, | 52 FRIEND_TEST_ALL_PREFIXES(NotificationPlatformBridgeMacTest, |
| 53 TestDisplayOneButton); | 53 TestDisplayOneButton); |
| 54 FRIEND_TEST_ALL_PREFIXES(NotificationPlatformBridgeMacTest, TestClose); | 54 FRIEND_TEST_ALL_PREFIXES(NotificationPlatformBridgeMacTest, |
| 55 TestDisplayNiceMock); |
| 56 FRIEND_TEST_ALL_PREFIXES(NotificationPlatformBridgeMacTest, TestCloseOneWay); |
| 57 FRIEND_TEST_ALL_PREFIXES(NotificationPlatformBridgeMacTest, |
| 58 TestCloseAnotherWay); |
| 55 | 59 |
| 56 // Used directly in tests. | 60 // Used directly in tests. |
| 57 NotificationPlatformBridgeMac(NSUserNotificationCenter* notification_center, | 61 NotificationPlatformBridgeMac(NSUserNotificationCenter* notification_center, |
| 58 bool set_delegate); | 62 bool set_delegate); |
| 59 | 63 |
| 60 // Cocoa class that receives callbacks from the NSUserNotificationCenter. | 64 // Cocoa class that receives callbacks from the NSUserNotificationCenter. |
| 61 base::scoped_nsobject<NotificationCenterDelegate> delegate_; | 65 base::scoped_nsobject<NotificationCenterDelegate> delegate_; |
| 62 | 66 |
| 63 // The notification center to use, this can be overriden in tests | 67 // The notification center to use, this can be overriden in tests |
| 64 NSUserNotificationCenter* notification_center_; | 68 NSUserNotificationCenter* notification_center_; |
| 65 | 69 |
| 66 DISALLOW_COPY_AND_ASSIGN(NotificationPlatformBridgeMac); | 70 DISALLOW_COPY_AND_ASSIGN(NotificationPlatformBridgeMac); |
| 67 }; | 71 }; |
| 68 | 72 |
| 69 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PLATFORM_BRIDGE_MAC_H_ | 73 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PLATFORM_BRIDGE_MAC_H_ |
| OLD | NEW |