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

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: 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 9dc40350811c4a65af8a82c331e08f55c326f9f7..c6175a7bcaf2b323e60cebb5b824044f24ab4fed 100644
--- a/content/browser/notifications/notification_message_filter.cc
+++ b/content/browser/notifications/notification_message_filter.cc
@@ -44,6 +44,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,
@@ -129,6 +131,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) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
« no previous file with comments | « content/browser/notifications/notification_message_filter.h ('k') | content/child/notifications/notification_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698