miguelg | 87e986d | 2016-07-08 18:04:44 | [diff] [blame] | 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_NON_PERSISTENT_NOTIFICATION_HANDLER_H_ |
| 6 | #define CHROME_BROWSER_NOTIFICATIONS_NON_PERSISTENT_NOTIFICATION_HANDLER_H_ |
| 7 | |
miguelg | 87e986d | 2016-07-08 18:04:44 | [diff] [blame] | 8 | #include "base/macros.h" |
miguelg | 87e986d | 2016-07-08 18:04:44 | [diff] [blame] | 9 | #include "chrome/browser/notifications/notification_handler.h" |
| 10 | |
miguelg | 87e986d | 2016-07-08 18:04:44 | [diff] [blame] | 11 | // NotificationHandler implementation for non persistent notifications. |
| 12 | class NonPersistentNotificationHandler : public NotificationHandler { |
| 13 | public: |
| 14 | NonPersistentNotificationHandler(); |
| 15 | ~NonPersistentNotificationHandler() override; |
| 16 | |
| 17 | // NotificationHandler implementation |
miguelg | abf610a | 2017-06-02 17:31:43 | [diff] [blame] | 18 | void OnShow(Profile* profile, const std::string& notification_id) override; |
miguelg | 87e986d | 2016-07-08 18:04:44 | [diff] [blame] | 19 | void OnClose(Profile* profile, |
Evan Stade | 7e48597c | 2017-11-03 22:04:48 | [diff] [blame] | 20 | const GURL& origin, |
miguelg | 87e986d | 2016-07-08 18:04:44 | [diff] [blame] | 21 | const std::string& notification_id, |
| 22 | bool by_user) override; |
| 23 | |
| 24 | void OnClick(Profile* profile, |
Evan Stade | 7e48597c | 2017-11-03 22:04:48 | [diff] [blame] | 25 | const GURL& origin, |
miguelg | 87e986d | 2016-07-08 18:04:44 | [diff] [blame] | 26 | const std::string& notification_id, |
Peter Beverloo | ae64ba9 | 2017-09-08 21:02:45 | [diff] [blame] | 27 | const base::Optional<int>& action_index, |
| 28 | const base::Optional<base::string16>& reply) override; |
miguelg | 87e986d | 2016-07-08 18:04:44 | [diff] [blame] | 29 | |
| 30 | void OpenSettings(Profile* profile) override; |
miguelg | 87e986d | 2016-07-08 18:04:44 | [diff] [blame] | 31 | |
miguelg | 87e986d | 2016-07-08 18:04:44 | [diff] [blame] | 32 | private: |
miguelg | 87e986d | 2016-07-08 18:04:44 | [diff] [blame] | 33 | DISALLOW_COPY_AND_ASSIGN(NonPersistentNotificationHandler); |
| 34 | }; |
| 35 | |
| 36 | #endif // CHROME_BROWSER_NOTIFICATIONS_NON_PERSISTENT_NOTIFICATION_HANDLER_H_ |