Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1032)

Unified Diff: ui/message_center/notification_delegate.h

Issue 221933013: Show a notification when an ephemeral app consumes excessive disk space (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@webkit_storage_monitor
Patch Set: Fix test failures Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/browser/extension_prefs.cc ('k') | ui/message_center/notification_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/notification_delegate.h
diff --git a/ui/message_center/notification_delegate.h b/ui/message_center/notification_delegate.h
index 475304cc2c4f16a208497644550a549cc139dfab..9c6c8a1c8bc14d86c8c52e93632e3e0661715819 100644
--- a/ui/message_center/notification_delegate.h
+++ b/ui/message_center/notification_delegate.h
@@ -76,6 +76,32 @@ class MESSAGE_CENTER_EXPORT HandleNotificationClickedDelegate
DISALLOW_COPY_AND_ASSIGN(HandleNotificationClickedDelegate);
};
+// A notification delegate which invokes a callback when a notification button
+// has been clicked.
+class MESSAGE_CENTER_EXPORT HandleNotificationButtonClickDelegate
+ : public NotificationDelegate {
+ public:
+ typedef base::Callback<void(int)> ButtonClickCallback;
+
+ explicit HandleNotificationButtonClickDelegate(
+ const ButtonClickCallback& button_callback);
+
+ // message_center::NotificationDelegate overrides:
+ virtual void Display() OVERRIDE;
+ virtual void Error() OVERRIDE;
+ virtual void Close(bool by_user) OVERRIDE;
+ virtual void Click() OVERRIDE;
+ virtual void ButtonClick(int button_index) OVERRIDE;
+
+ protected:
+ virtual ~HandleNotificationButtonClickDelegate();
+
+ private:
+ ButtonClickCallback button_callback_;
+
+ DISALLOW_COPY_AND_ASSIGN(HandleNotificationButtonClickDelegate);
+};
+
} // namespace message_center
#endif // UI_MESSAGE_CENTER_NOTIFICATION_DELEGATE_H_
« no previous file with comments | « extensions/browser/extension_prefs.cc ('k') | ui/message_center/notification_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698