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

Unified Diff: content/browser/notifications/notification_message_filter.cc

Issue 1014073002: Implement getting notifications up to the browser process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 5 years, 9 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: content/browser/notifications/notification_message_filter.cc
diff --git a/content/browser/notifications/notification_message_filter.cc b/content/browser/notifications/notification_message_filter.cc
index a4a91f409b4c87cb83724f2ed9fff0fcc34eff17..d6633ae9213960e5d4cbbef82bab5148e26d4bc7 100644
--- a/content/browser/notifications/notification_message_filter.cc
+++ b/content/browser/notifications/notification_message_filter.cc
@@ -43,6 +43,8 @@ bool NotificationMessageFilter::OnMessageReceived(const IPC::Message& message) {
OnShowPlatformNotification)
IPC_MESSAGE_HANDLER(PlatformNotificationHostMsg_ShowPersistent,
OnShowPersistentNotification)
+ IPC_MESSAGE_HANDLER(PlatformNotificationHostMsg_GetNotifications,
+ OnGetNotifications)
IPC_MESSAGE_HANDLER(PlatformNotificationHostMsg_Close,
OnClosePlatformNotification)
IPC_MESSAGE_HANDLER(PlatformNotificationHostMsg_ClosePersistent,
@@ -122,6 +124,22 @@ void NotificationMessageFilter::OnShowPersistentNotification(
icon, notification_data);
}
+void NotificationMessageFilter::OnGetNotifications(
+ int request_id,
+ int64_t service_worker_registration_id,
+ const GURL& origin,
+ const std::string& filter_tag) {
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
+
+ // TODO(peter): Implement retrieval of persistent Web Notifications from the
+ // database. Reply with an empty vector until this has been implemented.
+ // Tracked in https://crbug.com/442143.
+
+ Send(new PlatformNotificationMsg_DidGetNotifications(
+ request_id,
+ std::vector<PersistentNotificationInfo>()));
+}
+
void NotificationMessageFilter::OnClosePlatformNotification(
int notification_id) {
if (!close_closures_.count(notification_id))

Powered by Google App Engine
This is Rietveld 408576698