| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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_NON_PERSISTENT_NOTIFICATION_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_NON_PERSISTENT_NOTIFICATION_HANDLER_H_ |
| 6 #define CHROME_BROWSER_NOTIFICATIONS_NON_PERSISTENT_NOTIFICATION_HANDLER_H_ | 6 #define CHROME_BROWSER_NOTIFICATIONS_NON_PERSISTENT_NOTIFICATION_HANDLER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "chrome/browser/notifications/notification_handler.h" | 9 #include "chrome/browser/notifications/notification_handler.h" |
| 10 | 10 |
| 11 // NotificationHandler implementation for non persistent notifications. | 11 // NotificationHandler implementation for non persistent notifications. |
| 12 class NonPersistentNotificationHandler : public NotificationHandler { | 12 class NonPersistentNotificationHandler : public NotificationHandler { |
| 13 public: | 13 public: |
| 14 NonPersistentNotificationHandler(); | 14 NonPersistentNotificationHandler(); |
| 15 ~NonPersistentNotificationHandler() override; | 15 ~NonPersistentNotificationHandler() override; |
| 16 | 16 |
| 17 // NotificationHandler implementation | 17 // NotificationHandler implementation |
| 18 void OnShow(Profile* profile, const std::string& notification_id) override; |
| 18 void OnClose(Profile* profile, | 19 void OnClose(Profile* profile, |
| 19 const std::string& origin, | 20 const std::string& origin, |
| 20 const std::string& notification_id, | 21 const std::string& notification_id, |
| 21 bool by_user) override; | 22 bool by_user) override; |
| 22 | 23 |
| 23 void OnClick(Profile* profile, | 24 void OnClick(Profile* profile, |
| 24 const std::string& origin, | 25 const std::string& origin, |
| 25 const std::string& notification_id, | 26 const std::string& notification_id, |
| 26 int action_index, | 27 int action_index, |
| 27 const base::NullableString16& reply) override; | 28 const base::NullableString16& reply) override; |
| 28 | 29 |
| 29 void OpenSettings(Profile* profile) override; | 30 void OpenSettings(Profile* profile) override; |
| 30 | 31 |
| 31 private: | 32 private: |
| 32 DISALLOW_COPY_AND_ASSIGN(NonPersistentNotificationHandler); | 33 DISALLOW_COPY_AND_ASSIGN(NonPersistentNotificationHandler); |
| 33 }; | 34 }; |
| 34 | 35 |
| 35 #endif // CHROME_BROWSER_NOTIFICATIONS_NON_PERSISTENT_NOTIFICATION_HANDLER_H_ | 36 #endif // CHROME_BROWSER_NOTIFICATIONS_NON_PERSISTENT_NOTIFICATION_HANDLER_H_ |
| OLD | NEW |