| 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 // Messages sent from the browser to the renderer. | 18 // Messages sent from the browser to the renderer. |
| 19 | 19 |
| 20 // Informs the renderer that the permission request for |request_id| is done, | 20 // Informs the renderer that the permission request for |request_id| is done, |
| 21 // and has been settled with |result|. | 21 // and has been settled with |result|. |
| 22 IPC_MESSAGE_ROUTED2(PlatformNotificationMsg_PermissionRequestComplete, | 22 IPC_MESSAGE_ROUTED2(PlatformNotificationMsg_PermissionRequestComplete, |
| 23 int /* request_id */, | 23 int /* request_id */, |
| 24 blink::WebNotificationPermission /* result */) | 24 blink::WebNotificationPermission /* result */) |
| 25 | 25 |
| 26 // Informs the renderer that the browser has displayed the notification. | 26 // Informs the renderer that the browser has displayed the notification. |
| 27 IPC_MESSAGE_CONTROL1(PlatformNotificationMsg_DidShow, | 27 IPC_MESSAGE_CONTROL1(PlatformNotificationMsg_DidShow, |
| 28 int /* notification_id */) | 28 int /* notification_id */) |
| 29 | 29 |
| 30 // Informs the renderer that the notification could not be displayed. | |
| 31 IPC_MESSAGE_CONTROL1(PlatformNotificationMsg_DidError, | |
| 32 int /* notification_id */) | |
| 33 | |
| 34 // Informs the renderer that the notification has been closed. | 30 // Informs the renderer that the notification has been closed. |
| 35 IPC_MESSAGE_CONTROL1(PlatformNotificationMsg_DidClose, | 31 IPC_MESSAGE_CONTROL1(PlatformNotificationMsg_DidClose, |
| 36 int /* notification_id */) | 32 int /* notification_id */) |
| 37 | 33 |
| 38 // Informs the renderer that the notification has been clicked on. | 34 // Informs the renderer that the notification has been clicked on. |
| 39 IPC_MESSAGE_CONTROL1(PlatformNotificationMsg_DidClick, | 35 IPC_MESSAGE_CONTROL1(PlatformNotificationMsg_DidClick, |
| 40 int /* notification_id */) | 36 int /* notification_id */) |
| 41 | 37 |
| 42 // Messages sent from the renderer to the browser. | 38 // Messages sent from the renderer to the browser. |
| 43 | 39 |
| 44 // Requests permission to display platform notifications for |origin|. | 40 // Requests permission to display platform notifications for |origin|. |
| 45 IPC_MESSAGE_ROUTED2(PlatformNotificationHostMsg_RequestPermission, | 41 IPC_MESSAGE_ROUTED2(PlatformNotificationHostMsg_RequestPermission, |
| 46 GURL /* origin */, | 42 GURL /* origin */, |
| 47 int /* request_id */) | 43 int /* request_id */) |
| 48 | 44 |
| 49 IPC_MESSAGE_CONTROL2(PlatformNotificationHostMsg_Show, | 45 IPC_MESSAGE_CONTROL2(PlatformNotificationHostMsg_Show, |
| 50 int /* notification_id */, | 46 int /* notification_id */, |
| 51 content::ShowDesktopNotificationHostMsgParams /* params */) | 47 content::ShowDesktopNotificationHostMsgParams /* params */) |
| 52 | 48 |
| 53 IPC_MESSAGE_CONTROL1(PlatformNotificationHostMsg_Close, | 49 IPC_MESSAGE_CONTROL1(PlatformNotificationHostMsg_Close, |
| 54 int /* notification_id */) | 50 int /* notification_id */) |
| 55 | 51 |
| 56 IPC_SYNC_MESSAGE_CONTROL1_1(PlatformNotificationHostMsg_CheckPermission, | 52 IPC_SYNC_MESSAGE_CONTROL1_1(PlatformNotificationHostMsg_CheckPermission, |
| 57 GURL /* origin */, | 53 GURL /* origin */, |
| 58 blink::WebNotificationPermission /* result */) | 54 blink::WebNotificationPermission /* result */) |
| OLD | NEW |