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 // IPC messages for push messaging. | 5 // IPC messages for push messaging. |
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/push_messaging_status.h" | 8 #include "content/public/common/push_messaging_status.h" |
9 #include "ipc/ipc_message_macros.h" | 9 #include "ipc/ipc_message_macros.h" |
| 10 #include "third_party/WebKit/public/platform/WebPushPermissionCallback.h" |
10 #include "url/gurl.h" | 11 #include "url/gurl.h" |
11 | 12 |
12 #define IPC_MESSAGE_START PushMessagingMsgStart | 13 #define IPC_MESSAGE_START PushMessagingMsgStart |
13 | 14 |
14 IPC_ENUM_TRAITS_MAX_VALUE(content::PushMessagingStatus, | 15 IPC_ENUM_TRAITS_MAX_VALUE(content::PushMessagingStatus, |
15 content::PUSH_MESSAGING_STATUS_LAST) | 16 content::PUSH_MESSAGING_STATUS_LAST) |
16 | 17 |
| 18 IPC_ENUM_TRAITS_MAX_VALUE( |
| 19 blink::WebPushPermissionCallback::PushPermissionStatus, |
| 20 blink::WebPushPermissionCallback::PushPermissionStatus:: |
| 21 PushPermissionTypeLast) |
17 // Messages sent from the browser to the renderer. | 22 // Messages sent from the browser to the renderer. |
18 | 23 |
19 IPC_MESSAGE_ROUTED3(PushMessagingMsg_RegisterSuccess, | 24 IPC_MESSAGE_ROUTED3(PushMessagingMsg_RegisterSuccess, |
20 int32 /* callbacks_id */, | 25 int32 /* callbacks_id */, |
21 GURL /* push_endpoint */, | 26 GURL /* push_endpoint */, |
22 std::string /* push_registration_id */) | 27 std::string /* push_registration_id */) |
23 | 28 |
24 IPC_MESSAGE_ROUTED2(PushMessagingMsg_RegisterError, | 29 IPC_MESSAGE_ROUTED2(PushMessagingMsg_RegisterError, |
25 int32 /* callbacks_id */, | 30 int32 /* callbacks_id */, |
26 content::PushMessagingStatus /* status */) | 31 content::PushMessagingStatus /* status */) |
27 | 32 |
| 33 IPC_MESSAGE_ROUTED2( |
| 34 PushMessagingMsg_PermissionStatusResult, |
| 35 int32 /* callback_id */, |
| 36 blink::WebPushPermissionCallback::PushPermissionStatus /* status */) |
| 37 |
28 // Messages sent from the renderer to the browser. | 38 // Messages sent from the renderer to the browser. |
29 | 39 |
30 IPC_MESSAGE_CONTROL5(PushMessagingHostMsg_Register, | 40 IPC_MESSAGE_CONTROL5(PushMessagingHostMsg_Register, |
31 int32 /* render_frame_id */, | 41 int32 /* render_frame_id */, |
32 int32 /* callbacks_id */, | 42 int32 /* callbacks_id */, |
33 std::string /* sender_id */, | 43 std::string /* sender_id */, |
34 bool /* user_gesture */, | 44 bool /* user_gesture */, |
35 int32 /* service_worker_provider_id */) | 45 int32 /* service_worker_provider_id */) |
| 46 |
| 47 IPC_MESSAGE_CONTROL3(PushMessagingHostMsg_PermissionStatus, |
| 48 int32 /* render_frame_id */, |
| 49 int32 /* service_worker_provider_id */, |
| 50 int32 /* permission_callback_id */) |
OLD | NEW |