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 "ipc/ipc_message_macros.h" | 9 #include "ipc/ipc_message_macros.h" |
9 #include "third_party/WebKit/public/platform/WebNotificationPermission.h" | 10 #include "third_party/WebKit/public/platform/WebNotificationPermission.h" |
10 #include "url/gurl.h" | 11 #include "url/gurl.h" |
11 | 12 |
12 #define IPC_MESSAGE_START PlatformNotificationMsgStart | 13 #define IPC_MESSAGE_START PlatformNotificationMsgStart |
13 | 14 |
14 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebNotificationPermission, | 15 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebNotificationPermission, |
15 blink::WebNotificationPermissionLast) | 16 blink::WebNotificationPermissionLast) |
16 | 17 |
17 // Messages sent from the browser to the renderer. | 18 // Messages sent from the browser to the renderer. |
18 | 19 |
19 // 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, |
20 // and has been settled with |result|. | 21 // and has been settled with |result|. |
21 IPC_MESSAGE_ROUTED2(PlatformNotificationMsg_PermissionRequestComplete, | 22 IPC_MESSAGE_ROUTED2(PlatformNotificationMsg_PermissionRequestComplete, |
22 int /* request_id */, | 23 int /* request_id */, |
23 blink::WebNotificationPermission /* result */) | 24 blink::WebNotificationPermission /* result */) |
24 | 25 |
25 // Messages sent from the renderer to the browser. | 26 // Messages sent from the renderer to the browser. |
26 | 27 |
27 // Requests permission to display platform notifications for |origin|. | 28 // Requests permission to display platform notifications for |origin|. |
28 IPC_MESSAGE_ROUTED2(PlatformNotificationHostMsg_RequestPermission, | 29 IPC_MESSAGE_ROUTED2(PlatformNotificationHostMsg_RequestPermission, |
29 GURL /* origin */, | 30 GURL /* origin */, |
30 int /* request_id */) | 31 int /* request_id */) |
| 32 |
| 33 IPC_MESSAGE_CONTROL2(PlatformNotificationHostMsg_Show, |
| 34 int /* notification_id */, |
| 35 content::ShowDesktopNotificationHostMsgParams /* params */) |
| 36 |
| 37 IPC_MESSAGE_CONTROL1(PlatformNotificationHostMsg_Close, |
| 38 int /* notification_id */) |
| 39 |
| 40 IPC_SYNC_MESSAGE_CONTROL1_1(PlatformNotificationHostMsg_CheckPermission, |
| 41 GURL /* origin */, |
| 42 blink::WebNotificationPermission /* result */) |
OLD | NEW |