OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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 UI_ARC_NOTIFICATION_ARC_CUSTOM_DELEGATE_H_ |
| 6 #define UI_ARC_NOTIFICATION_ARC_CUSTOM_DELEGATE_H_ |
| 7 |
| 8 #include "base/memory/ptr_util.h" |
| 9 #include "base/memory/weak_ptr.h" |
| 10 #include "ui/arc/notification/arc_notification_item.h" |
| 11 #include "ui/message_center/notification_delegate.h" |
| 12 |
| 13 namespace arc { |
| 14 |
| 15 class ArcNotificationDelegate : public message_center::NotificationDelegate { |
| 16 public: |
| 17 explicit ArcNotificationDelegate(base::WeakPtr<ArcNotificationItem> item); |
| 18 |
| 19 std::unique_ptr<message_center::CustomContent> CreateCustomContent() override; |
| 20 void Close(bool by_user) override; |
| 21 |
| 22 private: |
| 23 // The destructor is private since this class is ref-counted. |
| 24 ~ArcNotificationDelegate() override; |
| 25 |
| 26 base::WeakPtr<ArcNotificationItem> item_; |
| 27 |
| 28 DISALLOW_COPY_AND_ASSIGN(ArcNotificationDelegate); |
| 29 }; |
| 30 |
| 31 } // namespace arc |
| 32 |
| 33 #endif // UI_ARC_NOTIFICATION_ARC_CUSTOM_DELEGATE_H_ |
OLD | NEW |