OLD | NEW |
(Empty) | |
| 1 // 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_NATIVE_NOTIFICATION_DISPLAY_SERVICE_H_ |
| 6 #define CHROME_BROWSER_NOTIFICATIONS_NATIVE_NOTIFICATION_DISPLAY_SERVICE_H_ |
| 7 |
| 8 #include <set> |
| 9 #include <string> |
| 10 #include "base/macros.h" |
| 11 #include "chrome/browser/notifications/notification_display_service.h" |
| 12 |
| 13 class Notification; |
| 14 class NotificationPlatformBridge; |
| 15 class Profile; |
| 16 |
| 17 // A class to display and interact with notifications in native notification |
| 18 // centers on platforms that support it. |
| 19 class NativeNotificationDisplayService : public NotificationDisplayService { |
| 20 public: |
| 21 NativeNotificationDisplayService( |
| 22 Profile* profile, |
| 23 NotificationPlatformBridge* notification_bridge); |
| 24 ~NativeNotificationDisplayService() override; |
| 25 |
| 26 // NotificationDisplayService implementation. |
| 27 void Display(const std::string& notification_id, |
| 28 const Notification& notification) override; |
| 29 void Close(const std::string& notification_id) override; |
| 30 bool GetDisplayed(std::set<std::string>* notifications) const override; |
| 31 bool SupportsNotificationCenter() const override; |
| 32 |
| 33 private: |
| 34 Profile* profile_; |
| 35 NotificationPlatformBridge* notification_bridge_; |
| 36 |
| 37 DISALLOW_COPY_AND_ASSIGN(NativeNotificationDisplayService); |
| 38 }; |
| 39 |
| 40 #endif // CHROME_BROWSER_NOTIFICATIONS_NATIVE_NOTIFICATION_DISPLAY_SERVICE_H_ |
OLD | NEW |