| 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 "content/public/common/show_desktop_notification_params.h" | 8 #include "content/public/common/show_desktop_notification_params.h" |
| 9 #include "ipc/ipc_message_macros.h" | 9 #include "ipc/ipc_message_macros.h" |
| 10 #include "third_party/WebKit/public/platform/WebNotificationPermission.h" | 10 #include "third_party/WebKit/public/platform/WebNotificationPermission.h" |
| 11 #include "url/gurl.h" | 11 #include "url/gurl.h" |
| 12 | 12 |
| 13 #define IPC_MESSAGE_START PlatformNotificationMsgStart | 13 #define IPC_MESSAGE_START PlatformNotificationMsgStart |
| 14 | 14 |
| 15 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebNotificationPermission, | 15 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebNotificationPermission, |
| 16 blink::WebNotificationPermissionLast) | 16 blink::WebNotificationPermissionLast) |
| 17 | 17 |
| 18 IPC_STRUCT_TRAITS_BEGIN(content::ShowDesktopNotificationHostMsgParams) |
| 19 IPC_STRUCT_TRAITS_MEMBER(origin) |
| 20 IPC_STRUCT_TRAITS_MEMBER(icon) |
| 21 IPC_STRUCT_TRAITS_MEMBER(title) |
| 22 IPC_STRUCT_TRAITS_MEMBER(body) |
| 23 IPC_STRUCT_TRAITS_MEMBER(direction) |
| 24 IPC_STRUCT_TRAITS_MEMBER(replace_id) |
| 25 IPC_STRUCT_TRAITS_END() |
| 26 |
| 18 // Messages sent from the browser to the renderer. | 27 // Messages sent from the browser to the renderer. |
| 19 | 28 |
| 20 // Informs the renderer that the permission request for |request_id| is done, | 29 // Informs the renderer that the permission request for |request_id| is done, |
| 21 // and has been settled with |result|. | 30 // and has been settled with |result|. |
| 22 IPC_MESSAGE_ROUTED2(PlatformNotificationMsg_PermissionRequestComplete, | 31 IPC_MESSAGE_ROUTED2(PlatformNotificationMsg_PermissionRequestComplete, |
| 23 int /* request_id */, | 32 int /* request_id */, |
| 24 blink::WebNotificationPermission /* result */) | 33 blink::WebNotificationPermission /* result */) |
| 25 | 34 |
| 26 // Informs the renderer that the browser has displayed the notification. | 35 // Informs the renderer that the browser has displayed the notification. |
| 27 IPC_MESSAGE_CONTROL1(PlatformNotificationMsg_DidShow, | 36 IPC_MESSAGE_CONTROL1(PlatformNotificationMsg_DidShow, |
| (...skipping 17 matching lines...) Expand all Loading... |
| 45 IPC_MESSAGE_CONTROL2(PlatformNotificationHostMsg_Show, | 54 IPC_MESSAGE_CONTROL2(PlatformNotificationHostMsg_Show, |
| 46 int /* notification_id */, | 55 int /* notification_id */, |
| 47 content::ShowDesktopNotificationHostMsgParams /* params */) | 56 content::ShowDesktopNotificationHostMsgParams /* params */) |
| 48 | 57 |
| 49 IPC_MESSAGE_CONTROL1(PlatformNotificationHostMsg_Close, | 58 IPC_MESSAGE_CONTROL1(PlatformNotificationHostMsg_Close, |
| 50 int /* notification_id */) | 59 int /* notification_id */) |
| 51 | 60 |
| 52 IPC_SYNC_MESSAGE_CONTROL1_1(PlatformNotificationHostMsg_CheckPermission, | 61 IPC_SYNC_MESSAGE_CONTROL1_1(PlatformNotificationHostMsg_CheckPermission, |
| 53 GURL /* origin */, | 62 GURL /* origin */, |
| 54 blink::WebNotificationPermission /* result */) | 63 blink::WebNotificationPermission /* result */) |
| OLD | NEW |