Index: chrome/browser/notifications/native_notification_display_service.h |
diff --git a/chrome/browser/notifications/native_notification_display_service.h b/chrome/browser/notifications/native_notification_display_service.h |
index 37989383a1d846ec7f50254d7cc3ece8e25acc9b..0b083dcdbf57c288c2c31cd6e2dc7cece6670700 100644 |
--- a/chrome/browser/notifications/native_notification_display_service.h |
+++ b/chrome/browser/notifications/native_notification_display_service.h |
@@ -5,12 +5,17 @@ |
#ifndef CHROME_BROWSER_NOTIFICATIONS_NATIVE_NOTIFICATION_DISPLAY_SERVICE_H_ |
#define CHROME_BROWSER_NOTIFICATIONS_NATIVE_NOTIFICATION_DISPLAY_SERVICE_H_ |
+#include <map> |
+#include <memory> |
#include <set> |
#include <string> |
+ |
#include "base/macros.h" |
#include "chrome/browser/notifications/notification_display_service.h" |
+#include "chrome/browser/notifications/notification_operation_common.h" |
class Notification; |
+class NotificationHandler; |
class NotificationPlatformBridge; |
class Profile; |
@@ -24,15 +29,39 @@ class NativeNotificationDisplayService : public NotificationDisplayService { |
~NativeNotificationDisplayService() override; |
// NotificationDisplayService implementation. |
- void Display(const std::string& notification_id, |
- const Notification& notification) override; |
- void Close(const std::string& notification_id) override; |
+ void Display( |
+ notification_operation_common::NotificationHandlerType notification_type, |
+ const std::string& notification_id, |
+ const Notification& notification) override; |
+ void Close( |
+ notification_operation_common::NotificationHandlerType notification_type, |
+ const std::string& notification_id) override; |
bool GetDisplayed(std::set<std::string>* notifications) const override; |
+ |
+ void ProcessNotificationOperation( |
+ notification_operation_common::NotificationOperation operation, |
+ notification_operation_common::NotificationHandlerType notification_type, |
+ const std::string& origin, |
+ const std::string& notification_id, |
+ int action_index) override; |
+ |
+ void AddNotificationHandler( |
+ notification_operation_common::NotificationHandlerType notification_type, |
+ std::unique_ptr<NotificationHandler> handler); |
+ void RemoveNotificationHandler( |
+ notification_operation_common::NotificationHandlerType notification_type); |
+ |
bool SupportsNotificationCenter() const override; |
private: |
+ NotificationHandler* GetNotificationHandler( |
+ notification_operation_common::NotificationHandlerType notification_type); |
+ |
Profile* profile_; |
NotificationPlatformBridge* notification_bridge_; |
+ std::map<notification_operation_common::NotificationHandlerType, |
+ std::unique_ptr<NotificationHandler>> |
+ notification_handlers_; |
DISALLOW_COPY_AND_ASSIGN(NativeNotificationDisplayService); |
}; |