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

Unified Diff: content/common/platform_notification_messages.h

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/common/platform_notification_messages.h
diff --git a/content/common/platform_notification_messages.h b/content/common/platform_notification_messages.h
index 59801e197397071cf0c687f6e9e805ba9d0bc780..d441e25a7327cd7312c1a59b55096f6be7546c66 100644
--- a/content/common/platform_notification_messages.h
+++ b/content/common/platform_notification_messages.h
@@ -5,6 +5,11 @@
// Messages for platform-native notifications using the Web Notification API.
// Multiply-included message file, hence no include guard.
+#include <stdint.h>
+#include <string>
+#include <utility>
+#include <vector>
+
#include "content/public/common/platform_notification_data.h"
#include "ipc/ipc_message_macros.h"
#include "third_party/WebKit/public/platform/modules/notifications/WebNotificationPermission.h"
@@ -29,6 +34,11 @@ IPC_STRUCT_TRAITS_BEGIN(content::PlatformNotificationData)
IPC_STRUCT_TRAITS_MEMBER(silent)
IPC_STRUCT_TRAITS_END()
+// Defines the pair of [persistent notification id] => [notification data] used
+// when getting the notifications for a given Service Worker registration.
+using PersistentNotificationInfo =
Tom Sepez 2015/03/17 21:32:38 This will have to move to an include guarded secti
Peter Beverloo 2015/03/19 15:46:44 Done.
+ std::pair<std::string, content::PlatformNotificationData>;
+
// Messages sent from the browser to the renderer.
// Informs the renderer that the browser has displayed the notification.
@@ -43,6 +53,13 @@ IPC_MESSAGE_CONTROL1(PlatformNotificationMsg_DidClose,
IPC_MESSAGE_CONTROL1(PlatformNotificationMsg_DidClick,
int /* notification_id */)
+// Informs the renderer about a vector of available notifications in response
Tom Sepez 2015/03/17 21:32:38 nit: this comment might indicate "reply to Platfo
Peter Beverloo 2015/03/19 15:46:44 Done.
+// to a request to get all persistent notifications for a Service Worker.
+IPC_MESSAGE_CONTROL2(PlatformNotificationMsg_DidGetNotifications,
+ int /* request_id */,
+ std::vector<PersistentNotificationInfo>
+ /* notifications */)
+
// Messages sent from the renderer to the browser.
IPC_MESSAGE_CONTROL4(PlatformNotificationHostMsg_Show,
@@ -52,11 +69,17 @@ IPC_MESSAGE_CONTROL4(PlatformNotificationHostMsg_Show,
content::PlatformNotificationData /* notification_data */)
IPC_MESSAGE_CONTROL4(PlatformNotificationHostMsg_ShowPersistent,
- int64 /* service_worker_provider_id */,
+ int64_t /* service_worker_registration_id */,
GURL /* origin */,
SkBitmap /* icon */,
content::PlatformNotificationData /* notification_data */)
+IPC_MESSAGE_CONTROL4(PlatformNotificationHostMsg_GetNotifications,
+ int /* request_id */,
+ int64_t /* service_worker_registration_id */,
+ GURL /* origin */,
+ std::string /* filter_tag */)
+
IPC_MESSAGE_CONTROL1(PlatformNotificationHostMsg_Close,
int /* notification_id */)

Powered by Google App Engine
This is Rietveld 408576698