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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « content/child/notifications/notification_manager.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Messages for platform-native notifications using the Web Notification API. 5 // Messages for platform-native notifications using the Web Notification API.
6 // Multiply-included message file, hence no include guard. 6 // Multiply-included message file, hence no include guard.
7 7
8 #include <stdint.h>
9 #include <string>
10 #include <utility>
11 #include <vector>
12
8 #include "content/public/common/platform_notification_data.h" 13 #include "content/public/common/platform_notification_data.h"
9 #include "ipc/ipc_message_macros.h" 14 #include "ipc/ipc_message_macros.h"
10 #include "third_party/WebKit/public/platform/modules/notifications/WebNotificati onPermission.h" 15 #include "third_party/WebKit/public/platform/modules/notifications/WebNotificati onPermission.h"
11 #include "third_party/skia/include/core/SkBitmap.h" 16 #include "third_party/skia/include/core/SkBitmap.h"
12 17
18 // Singly-included section for type definitions.
19 #ifndef CONTENT_COMMON_PLATFORM_NOTIFICATION_MESSAGES_H_
20 #define CONTENT_COMMON_PLATFORM_NOTIFICATION_MESSAGES_H_
21
22 // Defines the pair of [persistent notification id] => [notification data] used
23 // when getting the notifications for a given Service Worker registration.
24 using PersistentNotificationInfo =
25 std::pair<std::string, content::PlatformNotificationData>;
26
27 #endif // CONTENT_COMMON_PLATFORM_NOTIFICATION_MESSAGES_H_
28
13 #define IPC_MESSAGE_START PlatformNotificationMsgStart 29 #define IPC_MESSAGE_START PlatformNotificationMsgStart
14 30
15 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebNotificationPermission, 31 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebNotificationPermission,
16 blink::WebNotificationPermissionLast) 32 blink::WebNotificationPermissionLast)
17 33
18 IPC_ENUM_TRAITS_MAX_VALUE( 34 IPC_ENUM_TRAITS_MAX_VALUE(
19 content::PlatformNotificationData::NotificationDirection, 35 content::PlatformNotificationData::NotificationDirection,
20 content::PlatformNotificationData::NotificationDirectionLast) 36 content::PlatformNotificationData::NotificationDirectionLast)
21 37
22 IPC_STRUCT_TRAITS_BEGIN(content::PlatformNotificationData) 38 IPC_STRUCT_TRAITS_BEGIN(content::PlatformNotificationData)
(...skipping 13 matching lines...) Expand all
36 int /* notification_id */) 52 int /* notification_id */)
37 53
38 // Informs the renderer that the notification has been closed. 54 // Informs the renderer that the notification has been closed.
39 IPC_MESSAGE_CONTROL1(PlatformNotificationMsg_DidClose, 55 IPC_MESSAGE_CONTROL1(PlatformNotificationMsg_DidClose,
40 int /* notification_id */) 56 int /* notification_id */)
41 57
42 // Informs the renderer that the notification has been clicked on. 58 // Informs the renderer that the notification has been clicked on.
43 IPC_MESSAGE_CONTROL1(PlatformNotificationMsg_DidClick, 59 IPC_MESSAGE_CONTROL1(PlatformNotificationMsg_DidClick,
44 int /* notification_id */) 60 int /* notification_id */)
45 61
62 // Reply to PlatformNotificationHostMsg_GetNotifications sharing a vector of
63 // available notifications per the request's constraints.
64 IPC_MESSAGE_CONTROL2(PlatformNotificationMsg_DidGetNotifications,
65 int /* request_id */,
66 std::vector<PersistentNotificationInfo>
67 /* notifications */)
68
46 // Messages sent from the renderer to the browser. 69 // Messages sent from the renderer to the browser.
47 70
48 IPC_MESSAGE_CONTROL4(PlatformNotificationHostMsg_Show, 71 IPC_MESSAGE_CONTROL4(PlatformNotificationHostMsg_Show,
49 int /* notification_id */, 72 int /* notification_id */,
50 GURL /* origin */, 73 GURL /* origin */,
51 SkBitmap /* icon */, 74 SkBitmap /* icon */,
52 content::PlatformNotificationData /* notification_data */) 75 content::PlatformNotificationData /* notification_data */)
53 76
54 IPC_MESSAGE_CONTROL4(PlatformNotificationHostMsg_ShowPersistent, 77 IPC_MESSAGE_CONTROL4(PlatformNotificationHostMsg_ShowPersistent,
55 int64 /* service_worker_provider_id */, 78 int64_t /* service_worker_registration_id */,
56 GURL /* origin */, 79 GURL /* origin */,
57 SkBitmap /* icon */, 80 SkBitmap /* icon */,
58 content::PlatformNotificationData /* notification_data */) 81 content::PlatformNotificationData /* notification_data */)
59 82
83 IPC_MESSAGE_CONTROL4(PlatformNotificationHostMsg_GetNotifications,
84 int /* request_id */,
85 int64_t /* service_worker_registration_id */,
86 GURL /* origin */,
87 std::string /* filter_tag */)
88
60 IPC_MESSAGE_CONTROL1(PlatformNotificationHostMsg_Close, 89 IPC_MESSAGE_CONTROL1(PlatformNotificationHostMsg_Close,
61 int /* notification_id */) 90 int /* notification_id */)
62 91
63 IPC_MESSAGE_CONTROL2(PlatformNotificationHostMsg_ClosePersistent, 92 IPC_MESSAGE_CONTROL2(PlatformNotificationHostMsg_ClosePersistent,
64 GURL /* origin */, 93 GURL /* origin */,
65 std::string /* persistent_notification_id */) 94 std::string /* persistent_notification_id */)
66 95
67 IPC_SYNC_MESSAGE_CONTROL1_1(PlatformNotificationHostMsg_CheckPermission, 96 IPC_SYNC_MESSAGE_CONTROL1_1(PlatformNotificationHostMsg_CheckPermission,
68 GURL /* origin */, 97 GURL /* origin */,
69 blink::WebNotificationPermission /* result */) 98 blink::WebNotificationPermission /* result */)
OLDNEW
« 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