| 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 21 matching lines...) Expand all Loading... |
| 32 void Display(NotificationCommon::Type notification_type, | 32 void Display(NotificationCommon::Type notification_type, |
| 33 const std::string& notification_id, | 33 const std::string& notification_id, |
| 34 const std::string& profile_id, | 34 const std::string& profile_id, |
| 35 bool incognito, | 35 bool incognito, |
| 36 const Notification& notification) override; | 36 const Notification& notification) override; |
| 37 void Close(const std::string& profile_id, | 37 void Close(const std::string& profile_id, |
| 38 const std::string& notification_id) override; | 38 const std::string& notification_id) override; |
| 39 bool GetDisplayed(const std::string& profile_id, | 39 bool GetDisplayed(const std::string& profile_id, |
| 40 bool incognito, | 40 bool incognito, |
| 41 std::set<std::string>* notifications) const override; | 41 std::set<std::string>* notifications) const override; |
| 42 bool SupportsNotificationCenter() const override; | |
| 43 | 42 |
| 44 // Validates contents of the |response| dictionary as received from the system | 43 // Validates contents of the |response| dictionary as received from the system |
| 45 // when a notification gets activated. | 44 // when a notification gets activated. |
| 46 static bool VerifyNotificationData(NSDictionary* response) WARN_UNUSED_RESULT; | 45 static bool VerifyNotificationData(NSDictionary* response) WARN_UNUSED_RESULT; |
| 47 | 46 |
| 48 private: | 47 private: |
| 49 // Cocoa class that receives callbacks from the NSUserNotificationCenter. | 48 // Cocoa class that receives callbacks from the NSUserNotificationCenter. |
| 50 base::scoped_nsobject<NotificationCenterDelegate> delegate_; | 49 base::scoped_nsobject<NotificationCenterDelegate> delegate_; |
| 51 | 50 |
| 52 // The notification center to use, this can be overriden in tests | 51 // The notification center to use, this can be overriden in tests |
| 53 NSUserNotificationCenter* notification_center_; | 52 NSUserNotificationCenter* notification_center_; |
| 54 | 53 |
| 55 DISALLOW_COPY_AND_ASSIGN(NotificationPlatformBridgeMac); | 54 DISALLOW_COPY_AND_ASSIGN(NotificationPlatformBridgeMac); |
| 56 }; | 55 }; |
| 57 | 56 |
| 58 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PLATFORM_BRIDGE_MAC_H_ | 57 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PLATFORM_BRIDGE_MAC_H_ |
| OLD | NEW |