OLD | NEW |
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> | 8 #include <stdint.h> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "content/public/common/platform_notification_data.h" | 13 #include "content/public/common/platform_notification_data.h" |
14 #include "ipc/ipc_message_macros.h" | 14 #include "ipc/ipc_message_macros.h" |
15 #include "third_party/WebKit/public/platform/modules/notifications/WebNotificati
onPermission.h" | 15 #include "third_party/WebKit/public/platform/modules/notifications/WebNotificati
onPermission.h" |
16 #include "third_party/skia/include/core/SkBitmap.h" | 16 #include "third_party/skia/include/core/SkBitmap.h" |
17 | 17 |
18 // Singly-included section for type definitions. | 18 // Singly-included section for type definitions. |
19 #ifndef CONTENT_COMMON_PLATFORM_NOTIFICATION_MESSAGES_H_ | 19 #ifndef CONTENT_COMMON_PLATFORM_NOTIFICATION_MESSAGES_H_ |
20 #define CONTENT_COMMON_PLATFORM_NOTIFICATION_MESSAGES_H_ | 20 #define CONTENT_COMMON_PLATFORM_NOTIFICATION_MESSAGES_H_ |
21 | 21 |
22 // Defines the pair of [persistent notification id] => [notification data] used | 22 // Defines the pair of [persistent notification id] => [notification data] used |
23 // when getting the notifications for a given Service Worker registration. | 23 // when getting the notifications for a given Service Worker registration. |
24 using PersistentNotificationInfo = | 24 using PersistentNotificationInfo = |
25 std::pair<std::string, content::PlatformNotificationData>; | 25 std::pair<int64_t, content::PlatformNotificationData>; |
26 | 26 |
27 #endif // CONTENT_COMMON_PLATFORM_NOTIFICATION_MESSAGES_H_ | 27 #endif // CONTENT_COMMON_PLATFORM_NOTIFICATION_MESSAGES_H_ |
28 | 28 |
29 #define IPC_MESSAGE_START PlatformNotificationMsgStart | 29 #define IPC_MESSAGE_START PlatformNotificationMsgStart |
30 | 30 |
31 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebNotificationPermission, | 31 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebNotificationPermission, |
32 blink::WebNotificationPermissionLast) | 32 blink::WebNotificationPermissionLast) |
33 | 33 |
34 IPC_ENUM_TRAITS_MAX_VALUE( | 34 IPC_ENUM_TRAITS_MAX_VALUE( |
35 content::PlatformNotificationData::NotificationDirection, | 35 content::PlatformNotificationData::NotificationDirection, |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 IPC_MESSAGE_CONTROL1(PlatformNotificationHostMsg_Close, | 98 IPC_MESSAGE_CONTROL1(PlatformNotificationHostMsg_Close, |
99 int /* notification_id */) | 99 int /* notification_id */) |
100 | 100 |
101 IPC_MESSAGE_CONTROL2(PlatformNotificationHostMsg_ClosePersistent, | 101 IPC_MESSAGE_CONTROL2(PlatformNotificationHostMsg_ClosePersistent, |
102 GURL /* origin */, | 102 GURL /* origin */, |
103 int64_t /* persistent_notification_id */) | 103 int64_t /* persistent_notification_id */) |
104 | 104 |
105 IPC_SYNC_MESSAGE_CONTROL1_1(PlatformNotificationHostMsg_CheckPermission, | 105 IPC_SYNC_MESSAGE_CONTROL1_1(PlatformNotificationHostMsg_CheckPermission, |
106 GURL /* origin */, | 106 GURL /* origin */, |
107 blink::WebNotificationPermission /* result */) | 107 blink::WebNotificationPermission /* result */) |
OLD | NEW |