Chromium Code Reviews| 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> |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 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, |
| 36 content::PlatformNotificationData::NotificationDirectionLast) | 36 content::PlatformNotificationData::NotificationDirectionLast) |
| 37 | 37 |
| 38 IPC_STRUCT_TRAITS_BEGIN(content::PlatformNotificationAction) | |
| 39 IPC_STRUCT_TRAITS_MEMBER(action) | |
| 40 IPC_STRUCT_TRAITS_MEMBER(title) | |
| 41 IPC_STRUCT_TRAITS_END() | |
| 42 | |
| 38 IPC_STRUCT_TRAITS_BEGIN(content::PlatformNotificationData) | 43 IPC_STRUCT_TRAITS_BEGIN(content::PlatformNotificationData) |
| 39 IPC_STRUCT_TRAITS_MEMBER(title) | 44 IPC_STRUCT_TRAITS_MEMBER(title) |
| 40 IPC_STRUCT_TRAITS_MEMBER(direction) | 45 IPC_STRUCT_TRAITS_MEMBER(direction) |
| 41 IPC_STRUCT_TRAITS_MEMBER(lang) | 46 IPC_STRUCT_TRAITS_MEMBER(lang) |
| 42 IPC_STRUCT_TRAITS_MEMBER(body) | 47 IPC_STRUCT_TRAITS_MEMBER(body) |
| 43 IPC_STRUCT_TRAITS_MEMBER(tag) | 48 IPC_STRUCT_TRAITS_MEMBER(tag) |
| 44 IPC_STRUCT_TRAITS_MEMBER(icon) | 49 IPC_STRUCT_TRAITS_MEMBER(icon) |
| 45 IPC_STRUCT_TRAITS_MEMBER(vibration_pattern) | 50 IPC_STRUCT_TRAITS_MEMBER(vibration_pattern) |
| 46 IPC_STRUCT_TRAITS_MEMBER(silent) | 51 IPC_STRUCT_TRAITS_MEMBER(silent) |
| 47 IPC_STRUCT_TRAITS_MEMBER(data) | 52 IPC_STRUCT_TRAITS_MEMBER(data) |
| 53 IPC_STRUCT_TRAITS_MEMBER(actions) | |
|
Peter Beverloo
2015/07/30 17:02:05
The receiving side (browser) must verify that the
johnme
2015/07/31 18:21:31
Done (SanitizeNotificationData in notification_mes
| |
| 48 IPC_STRUCT_TRAITS_END() | 54 IPC_STRUCT_TRAITS_END() |
| 49 | 55 |
| 50 // Messages sent from the browser to the renderer. | 56 // Messages sent from the browser to the renderer. |
| 51 | 57 |
| 52 // Informs the renderer that the browser has displayed the notification. | 58 // Informs the renderer that the browser has displayed the notification. |
| 53 IPC_MESSAGE_CONTROL1(PlatformNotificationMsg_DidShow, | 59 IPC_MESSAGE_CONTROL1(PlatformNotificationMsg_DidShow, |
| 54 int /* notification_id */) | 60 int /* notification_id */) |
| 55 | 61 |
| 56 // Informs the renderer that the notification has been closed. | 62 // Informs the renderer that the notification has been closed. |
| 57 IPC_MESSAGE_CONTROL1(PlatformNotificationMsg_DidClose, | 63 IPC_MESSAGE_CONTROL1(PlatformNotificationMsg_DidClose, |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 99 IPC_MESSAGE_CONTROL1(PlatformNotificationHostMsg_Close, | 105 IPC_MESSAGE_CONTROL1(PlatformNotificationHostMsg_Close, |
| 100 int /* notification_id */) | 106 int /* notification_id */) |
| 101 | 107 |
| 102 IPC_MESSAGE_CONTROL2(PlatformNotificationHostMsg_ClosePersistent, | 108 IPC_MESSAGE_CONTROL2(PlatformNotificationHostMsg_ClosePersistent, |
| 103 GURL /* origin */, | 109 GURL /* origin */, |
| 104 int64_t /* persistent_notification_id */) | 110 int64_t /* persistent_notification_id */) |
| 105 | 111 |
| 106 IPC_SYNC_MESSAGE_CONTROL1_1(PlatformNotificationHostMsg_CheckPermission, | 112 IPC_SYNC_MESSAGE_CONTROL1_1(PlatformNotificationHostMsg_CheckPermission, |
| 107 GURL /* origin */, | 113 GURL /* origin */, |
| 108 blink::WebNotificationPermission /* result */) | 114 blink::WebNotificationPermission /* result */) |
| OLD | NEW |