| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2017 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_EXTENSIONS_API_NOTIFICATIONS_EXTENSION_NOTIFICATION_HANDL
ER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_NOTIFICATIONS_EXTENSION_NOTIFICATION_HANDL
ER_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "chrome/browser/notifications/notification_handler.h" |
| 10 |
| 11 // Handler for notifications shown by extensions. Will be created and owned by |
| 12 // the NotificationDisplayService. |
| 13 class ExtensionNotificationHandler : public NotificationHandler { |
| 14 public: |
| 15 ExtensionNotificationHandler(); |
| 16 ~ExtensionNotificationHandler() override; |
| 17 |
| 18 // NotificationHandler implementation. |
| 19 void OnClose(Profile* profile, |
| 20 const std::string& origin, |
| 21 const std::string& notification_id, |
| 22 bool by_user) override; |
| 23 void OnClick(Profile* profile, |
| 24 const std::string& origin, |
| 25 const std::string& notification_id, |
| 26 int action_index, |
| 27 const base::NullableString16& reply) override; |
| 28 void OpenSettings(Profile* profile) override; |
| 29 void RegisterNotification(const std::string& notification_id, |
| 30 NotificationDelegate* delegate) override; |
| 31 |
| 32 private: |
| 33 DISALLOW_COPY_AND_ASSIGN(ExtensionNotificationHandler); |
| 34 }; |
| 35 |
| 36 #endif // CHROME_BROWSER_EXTENSIONS_API_NOTIFICATIONS_EXTENSION_NOTIFICATION_HA
NDLER_H_ |
| OLD | NEW |