Index: ui/arc/notification/arc_notification_delegate.h |
diff --git a/ui/arc/notification/arc_notification_delegate.h b/ui/arc/notification/arc_notification_delegate.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..23e63064224a6669f405d436acbe051e2f1ec4a7 |
--- /dev/null |
+++ b/ui/arc/notification/arc_notification_delegate.h |
@@ -0,0 +1,34 @@ |
+// Copyright 2017 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef UI_ARC_NOTIFICATION_ARC_CUSTOM_DELEGATE_H_ |
+#define UI_ARC_NOTIFICATION_ARC_CUSTOM_DELEGATE_H_ |
+ |
+#include "base/memory/ptr_util.h" |
+#include "base/memory/weak_ptr.h" |
+#include "ui/arc/notification/arc_notification_item.h" |
+#include "ui/message_center/notification_delegate.h" |
+ |
+namespace arc { |
+ |
+class ArcNotificationDelegate : public message_center::NotificationDelegate { |
hidehiko
2017/05/01 12:29:17
Document about this class?
yoshiki
2017/05/08 06:24:52
Done.
|
+ public: |
+ explicit ArcNotificationDelegate(base::WeakPtr<ArcNotificationItem> item); |
+ |
+ std::unique_ptr<message_center::CustomContent> CreateCustomContent() override; |
hidehiko
2017/05/01 12:29:17
// message_center::NotificationDelegate overrides:
yoshiki
2017/05/08 06:24:52
Done.
|
+ void Close(bool by_user) override; |
+ void Click() override; |
+ |
+ private: |
+ // The destructor is private since this class is ref-counted. |
+ ~ArcNotificationDelegate() override; |
+ |
+ base::WeakPtr<ArcNotificationItem> item_; |
hidehiko
2017/05/01 12:29:17
You use WeakPtr here, but all methods assumes (DCH
yoshiki
2017/05/08 06:24:52
I want to keep the weak ptr to detect a potential
hidehiko
2017/05/08 09:34:41
I see. Would you mind to comment the goal of WeakP
|
+ |
+ DISALLOW_COPY_AND_ASSIGN(ArcNotificationDelegate); |
hidehiko
2017/05/01 12:29:17
missing base/macros.h
yoshiki
2017/05/08 06:24:53
Done.
|
+}; |
+ |
+} // namespace arc |
+ |
+#endif // UI_ARC_NOTIFICATION_ARC_CUSTOM_DELEGATE_H_ |