| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 | 52 |
| 53 // Add |notification_| to message center and update again if there is | 53 // Add |notification_| to message center and update again if there is |
| 54 // |newer_data_|. | 54 // |newer_data_|. |
| 55 void AddToMessageCenter(); | 55 void AddToMessageCenter(); |
| 56 | 56 |
| 57 bool CalledOnValidThread() const; | 57 bool CalledOnValidThread() const; |
| 58 | 58 |
| 59 const AccountId& profile_id() const { return profile_id_; } | 59 const AccountId& profile_id() const { return profile_id_; } |
| 60 const std::string& notification_key() const { return notification_key_; } | 60 const std::string& notification_key() const { return notification_key_; } |
| 61 const std::string& notification_id() const { return notification_id_; } | 61 const std::string& notification_id() const { return notification_id_; } |
| 62 message_center::MessageCenter* message_center() { return message_center_; } |
| 62 | 63 |
| 63 message_center::Notification* pending_notification() { | 64 message_center::Notification* pending_notification() { |
| 64 return notification_.get(); | 65 return notification_.get(); |
| 65 } | 66 } |
| 66 | 67 |
| 67 private: | 68 private: |
| 68 void OnImageDecoded(const SkBitmap& bitmap); | 69 void OnImageDecoded(const SkBitmap& bitmap); |
| 69 | 70 |
| 70 ArcNotificationManager* const manager_; | 71 ArcNotificationManager* const manager_; |
| 71 message_center::MessageCenter* const message_center_; | 72 message_center::MessageCenter* const message_center_; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 92 | 93 |
| 93 base::ThreadChecker thread_checker_; | 94 base::ThreadChecker thread_checker_; |
| 94 base::WeakPtrFactory<ArcNotificationItem> weak_ptr_factory_; | 95 base::WeakPtrFactory<ArcNotificationItem> weak_ptr_factory_; |
| 95 | 96 |
| 96 DISALLOW_COPY_AND_ASSIGN(ArcNotificationItem); | 97 DISALLOW_COPY_AND_ASSIGN(ArcNotificationItem); |
| 97 }; | 98 }; |
| 98 | 99 |
| 99 } // namespace arc | 100 } // namespace arc |
| 100 | 101 |
| 101 #endif // UI_ARC_NOTIFICATION_ARC_NOTIFICATION_ITEM_H_ | 102 #endif // UI_ARC_NOTIFICATION_ARC_NOTIFICATION_ITEM_H_ |
| OLD | NEW |