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

Unified Diff: chrome/browser/notifications/persistent_notification_delegate.cc

Issue 2392343002: Plumbing in notification replies: PlatformNotificationService -> SW (Closed)
Patch Set: include base/logging.h for NOTIMPLEMENTED Created 4 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: chrome/browser/notifications/persistent_notification_delegate.cc
diff --git a/chrome/browser/notifications/persistent_notification_delegate.cc b/chrome/browser/notifications/persistent_notification_delegate.cc
index 1e05cbf76f76557777370a98758c20a37c70e71d..b38f3c1b24ca69ae7755de187c4053fcf7ac498b 100644
--- a/chrome/browser/notifications/persistent_notification_delegate.cc
+++ b/chrome/browser/notifications/persistent_notification_delegate.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/notifications/persistent_notification_delegate.h"
+#include "base/strings/nullable_string16.h"
#include "chrome/browser/notifications/platform_notification_service_impl.h"
#include "url/gurl.h"
@@ -26,7 +27,8 @@ void PersistentNotificationDelegate::Close(bool by_user) {
void PersistentNotificationDelegate::Click() {
PlatformNotificationServiceImpl::GetInstance()->OnPersistentNotificationClick(
- browser_context(), id(), origin(), -1 /* action_index */);
+ browser_context(), id(), origin(), -1 /* action_index */,
+ base::NullableString16() /* reply */);
}
void PersistentNotificationDelegate::ButtonClick(int button_index) {
@@ -37,5 +39,16 @@ void PersistentNotificationDelegate::ButtonClick(int button_index) {
}
PlatformNotificationServiceImpl::GetInstance()->OnPersistentNotificationClick(
- browser_context(), id(), origin(), button_index);
+ browser_context(), id(), origin(), button_index,
+ base::NullableString16() /* reply */);
+}
+
+void PersistentNotificationDelegate::ButtonClickWithReply(
+ int button_index,
+ const base::string16& reply) {
+ DCHECK_GE(button_index, 0);
+ DCHECK_NE(button_index, notification_settings_index_);
+ PlatformNotificationServiceImpl::GetInstance()->OnPersistentNotificationClick(
+ browser_context(), id(), origin(), button_index,
+ base::NullableString16(reply, false /* is_null */));
}

Powered by Google App Engine
This is Rietveld 408576698