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

Unified Diff: ui/message_center/notification_delegate.h

Issue 684253002: Provide default implementations for NotificationDelegate methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 2 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
Index: ui/message_center/notification_delegate.h
diff --git a/ui/message_center/notification_delegate.h b/ui/message_center/notification_delegate.h
index f870fcb4d18f1f14b671ae3c066cadd7259f2f13..93526ba1fc6209e4c5b8c47602eae092c925ca23 100644
--- a/ui/message_center/notification_delegate.h
+++ b/ui/message_center/notification_delegate.h
@@ -24,25 +24,23 @@ class MESSAGE_CENTER_EXPORT NotificationDelegate
: public base::RefCountedThreadSafe<NotificationDelegate> {
public:
// To be called when the desktop notification is actually shown.
- virtual void Display() = 0;
+ virtual void Display();
// To be called when the desktop notification cannot be shown due to an
// error.
- virtual void Error() = 0;
+ virtual void Error();
// To be called when the desktop notification is closed. If closed by a
// user explicitly (as opposed to timeout/script), |by_user| should be true.
- virtual void Close(bool by_user) = 0;
+ virtual void Close(bool by_user);
// Returns true if the delegate can handle click event.
virtual bool HasClickedListener();
// To be called when a desktop notification is clicked.
- virtual void Click() = 0;
+ virtual void Click();
- // To be called when the user clicks a button in a notification. TODO(miket):
- // consider providing default implementations of the pure virtuals of this
- // interface, to avoid pinging so many OWNERs each time we enhance it.
+ // To be called when the user clicks a button in a notification.
virtual void ButtonClick(int button_index);
protected:
@@ -59,12 +57,8 @@ class MESSAGE_CENTER_EXPORT HandleNotificationClickedDelegate
explicit HandleNotificationClickedDelegate(const base::Closure& closure);
// message_center::NotificationDelegate overrides:
- void Display() override;
- void Error() override;
- void Close(bool by_user) override;
- bool HasClickedListener() override;
void Click() override;
- void ButtonClick(int button_index) override;
+ bool HasClickedListener() override;
protected:
~HandleNotificationClickedDelegate() override;
@@ -87,10 +81,6 @@ class MESSAGE_CENTER_EXPORT HandleNotificationButtonClickDelegate
const ButtonClickCallback& button_callback);
// message_center::NotificationDelegate overrides:
- void Display() override;
- void Error() override;
- void Close(bool by_user) override;
- void Click() override;
void ButtonClick(int button_index) override;
protected:

Powered by Google App Engine
This is Rietveld 408576698