Toshiki Kikuchi | 7c2894d | 2018-10-10 01:02:09 | [diff] [blame] | 1 | // Copyright 2018 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 COMPONENTS_EXO_NOTIFICATION_H_ |
| 6 | #define COMPONENTS_EXO_NOTIFICATION_H_ |
| 7 | |
| 8 | #include <string> |
Toshiki Kikuchi | e518bda4 | 2018-10-24 01:45:34 | [diff] [blame] | 9 | #include <vector> |
Toshiki Kikuchi | 7c2894d | 2018-10-10 01:02:09 | [diff] [blame] | 10 | |
| 11 | #include "base/callback.h" |
Toshiki Kikuchi | e518bda4 | 2018-10-24 01:45:34 | [diff] [blame] | 12 | #include "base/optional.h" |
Toshiki Kikuchi | 7c2894d | 2018-10-10 01:02:09 | [diff] [blame] | 13 | |
| 14 | namespace exo { |
| 15 | |
| 16 | // Handles notification shown in message center. |
| 17 | class Notification { |
| 18 | public: |
| 19 | Notification(const std::string& title, |
| 20 | const std::string& message, |
| 21 | const std::string& display_source, |
| 22 | const std::string& notification_id, |
| 23 | const std::string& notifier_id, |
Toshiki Kikuchi | e518bda4 | 2018-10-24 01:45:34 | [diff] [blame] | 24 | const std::vector<std::string>& buttons, |
| 25 | const base::RepeatingCallback<void(bool)>& close_callback, |
| 26 | const base::RepeatingCallback<void(const base::Optional<int>&)>& |
| 27 | click_callback); |
Toshiki Kikuchi | 7c2894d | 2018-10-10 01:02:09 | [diff] [blame] | 28 | |
| 29 | // Closes this notification. |
| 30 | void Close(); |
| 31 | |
| 32 | private: |
| 33 | const std::string notification_id_; |
| 34 | |
| 35 | DISALLOW_COPY_AND_ASSIGN(Notification); |
| 36 | }; |
| 37 | |
| 38 | } // namespace exo |
| 39 | |
| 40 | #endif // COMPONENTS_EXO_NOTIFICATION_H_ |