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

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
« no previous file with comments | « content/child/notifications/notification_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..eef981f51caa36b0e669d4093644158e4707b476 100644
--- a/content/common/platform_notification_messages.h
+++ b/content/common/platform_notification_messages.h
@@ -5,11 +5,27 @@
// 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"
#include "third_party/skia/include/core/SkBitmap.h"
+// Singly-included section for type definitions.
+#ifndef CONTENT_COMMON_PLATFORM_NOTIFICATION_MESSAGES_H_
+#define CONTENT_COMMON_PLATFORM_NOTIFICATION_MESSAGES_H_
+
+// Defines the pair of [persistent notification id] => [notification data] used
+// when getting the notifications for a given Service Worker registration.
+using PersistentNotificationInfo =
+ std::pair<std::string, content::PlatformNotificationData>;
+
+#endif // CONTENT_COMMON_PLATFORM_NOTIFICATION_MESSAGES_H_
+
#define IPC_MESSAGE_START PlatformNotificationMsgStart
IPC_ENUM_TRAITS_MAX_VALUE(blink::WebNotificationPermission,
@@ -43,6 +59,13 @@ IPC_MESSAGE_CONTROL1(PlatformNotificationMsg_DidClose,
IPC_MESSAGE_CONTROL1(PlatformNotificationMsg_DidClick,
int /* notification_id */)
+// Reply to PlatformNotificationHostMsg_GetNotifications sharing a vector of
+// available notifications per the request's constraints.
+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 +75,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 */)
« no previous file with comments | « content/child/notifications/notification_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698