| 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 UI_ARC_NOTIFICATION_ARC_NOTIFICATION_ITEM_H_ | 5 #ifndef UI_ARC_NOTIFICATION_ARC_NOTIFICATION_ITEM_H_ |
| 6 #define UI_ARC_NOTIFICATION_ARC_NOTIFICATION_ITEM_H_ | 6 #define UI_ARC_NOTIFICATION_ARC_NOTIFICATION_ITEM_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 mojom::ArcNotificationDataPtr data); | 32 mojom::ArcNotificationDataPtr data); |
| 33 | 33 |
| 34 // Methods called from ArcNotificationManager: | 34 // Methods called from ArcNotificationManager: |
| 35 void OnClosedFromAndroid(); | 35 void OnClosedFromAndroid(); |
| 36 | 36 |
| 37 // Methods called from ArcNotificationItemDelegate: | 37 // Methods called from ArcNotificationItemDelegate: |
| 38 void Close(bool by_user); | 38 void Close(bool by_user); |
| 39 void Click(); | 39 void Click(); |
| 40 void ButtonClick(int button_index); | 40 void ButtonClick(int button_index); |
| 41 void OpenSettings(); | 41 void OpenSettings(); |
| 42 bool IsOpeningSettingsSupported() const; |
| 42 | 43 |
| 43 const std::string& notification_key() const { return notification_key_; } | 44 const std::string& notification_key() const { return notification_key_; } |
| 44 | 45 |
| 45 protected: | 46 protected: |
| 46 static int ConvertAndroidPriority(int android_priority); | 47 static int ConvertAndroidPriority(int android_priority); |
| 47 | 48 |
| 48 // Checks whether there is on-going |notification_|. | 49 // Checks whether there is on-going |notification_|. |
| 49 bool HasPendingNotification(); | 50 bool HasPendingNotification(); |
| 50 // Cache the |data| in |newer_data_|. | 51 // Cache the |data| in |newer_data_|. |
| 51 void CacheArcNotificationData(mojom::ArcNotificationDataPtr data); | 52 void CacheArcNotificationData(mojom::ArcNotificationDataPtr data); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 | 98 |
| 98 base::ThreadChecker thread_checker_; | 99 base::ThreadChecker thread_checker_; |
| 99 base::WeakPtrFactory<ArcNotificationItem> weak_ptr_factory_; | 100 base::WeakPtrFactory<ArcNotificationItem> weak_ptr_factory_; |
| 100 | 101 |
| 101 DISALLOW_COPY_AND_ASSIGN(ArcNotificationItem); | 102 DISALLOW_COPY_AND_ASSIGN(ArcNotificationItem); |
| 102 }; | 103 }; |
| 103 | 104 |
| 104 } // namespace arc | 105 } // namespace arc |
| 105 | 106 |
| 106 #endif // UI_ARC_NOTIFICATION_ARC_NOTIFICATION_ITEM_H_ | 107 #endif // UI_ARC_NOTIFICATION_ARC_NOTIFICATION_ITEM_H_ |
| OLD | NEW |