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/WebPushError.h" |
10 #include "third_party/WebKit/public/platform/WebPushPermissionStatus.h" | 11 #include "third_party/WebKit/public/platform/WebPushPermissionStatus.h" |
11 #include "url/gurl.h" | 12 #include "url/gurl.h" |
12 | 13 |
13 #define IPC_MESSAGE_START PushMessagingMsgStart | 14 #define IPC_MESSAGE_START PushMessagingMsgStart |
14 | 15 |
15 IPC_ENUM_TRAITS_MAX_VALUE(content::PushRegistrationStatus, | 16 IPC_ENUM_TRAITS_MAX_VALUE(content::PushRegistrationStatus, |
16 content::PUSH_REGISTRATION_STATUS_LAST) | 17 content::PUSH_REGISTRATION_STATUS_LAST) |
17 | 18 |
18 IPC_ENUM_TRAITS_MAX_VALUE(content::PushGetRegistrationStatus, | 19 IPC_ENUM_TRAITS_MAX_VALUE(content::PushGetRegistrationStatus, |
19 content::PUSH_GETREGISTRATION_STATUS_LAST) | 20 content::PUSH_GETREGISTRATION_STATUS_LAST) |
20 | 21 |
21 IPC_ENUM_TRAITS_MAX_VALUE( | 22 IPC_ENUM_TRAITS_MAX_VALUE( |
22 blink::WebPushPermissionStatus, | 23 blink::WebPushPermissionStatus, |
23 blink::WebPushPermissionStatus::WebPushPermissionStatusLast) | 24 blink::WebPushPermissionStatus::WebPushPermissionStatusLast) |
24 | 25 |
| 26 IPC_ENUM_TRAITS_MAX_VALUE( |
| 27 blink::WebPushError::ErrorType, |
| 28 blink::WebPushError::ErrorType::ErrorTypeLast) |
| 29 |
25 // Messages sent from the browser to the child process. | 30 // Messages sent from the browser to the child process. |
26 | 31 |
27 IPC_MESSAGE_ROUTED3(PushMessagingMsg_RegisterFromDocumentSuccess, | 32 IPC_MESSAGE_ROUTED3(PushMessagingMsg_RegisterFromDocumentSuccess, |
28 int32 /* request_id */, | 33 int32 /* request_id */, |
29 GURL /* push_endpoint */, | 34 GURL /* push_endpoint */, |
30 std::string /* push_registration_id */) | 35 std::string /* push_registration_id */) |
31 | 36 |
32 IPC_MESSAGE_CONTROL3(PushMessagingMsg_RegisterFromWorkerSuccess, | 37 IPC_MESSAGE_CONTROL3(PushMessagingMsg_RegisterFromWorkerSuccess, |
33 int32 /* request_id */, | 38 int32 /* request_id */, |
34 GURL /* push_endpoint */, | 39 GURL /* push_endpoint */, |
(...skipping 25 matching lines...) Expand all Loading... |
60 int32 /* request_id */, | 65 int32 /* request_id */, |
61 blink::WebPushPermissionStatus /* status */) | 66 blink::WebPushPermissionStatus /* status */) |
62 | 67 |
63 // TODO(mvanouwerkerk): Delete this after switching to the platform code path. | 68 // TODO(mvanouwerkerk): Delete this after switching to the platform code path. |
64 IPC_MESSAGE_ROUTED1(PushMessagingMsg_PermissionStatusFailure, | 69 IPC_MESSAGE_ROUTED1(PushMessagingMsg_PermissionStatusFailure, |
65 int32 /* callback_id */) | 70 int32 /* callback_id */) |
66 | 71 |
67 IPC_MESSAGE_CONTROL1(PushMessagingMsg_GetPermissionStatusError, | 72 IPC_MESSAGE_CONTROL1(PushMessagingMsg_GetPermissionStatusError, |
68 int32 /* request_id */) | 73 int32 /* request_id */) |
69 | 74 |
| 75 IPC_MESSAGE_CONTROL2(PushMessagingMsg_UnregisterSuccess, |
| 76 int32 /* request_id */, |
| 77 bool /* did_unregister */) |
| 78 |
| 79 IPC_MESSAGE_CONTROL3(PushMessagingMsg_UnregisterError, |
| 80 int32 /* request_id */, |
| 81 blink::WebPushError::ErrorType /* error_type */, |
| 82 std::string /* error_message */) |
| 83 |
70 // Messages sent from the child process to the browser. | 84 // Messages sent from the child process to the browser. |
71 | 85 |
72 // TODO(mvanouwerkerk): Delete this when it is no longer used. | 86 // TODO(mvanouwerkerk): Delete this when it is no longer used. |
73 IPC_MESSAGE_CONTROL5(PushMessagingHostMsg_RegisterFromDocumentOld, | 87 IPC_MESSAGE_CONTROL5(PushMessagingHostMsg_RegisterFromDocumentOld, |
74 int32 /* render_frame_id */, | 88 int32 /* render_frame_id */, |
75 int32 /* request_id */, | 89 int32 /* request_id */, |
76 std::string /* sender_id */, | 90 std::string /* sender_id */, |
77 bool /* user_visible_only */, | 91 bool /* user_visible_only */, |
78 int32 /* service_worker_provider_id */) | 92 int32 /* service_worker_provider_id */) |
79 | 93 |
(...skipping 14 matching lines...) Expand all Loading... |
94 | 108 |
95 // TODO(mvanouwerkerk): Delete this after switching to the platform code path. | 109 // TODO(mvanouwerkerk): Delete this after switching to the platform code path. |
96 IPC_MESSAGE_CONTROL3(PushMessagingHostMsg_PermissionStatus, | 110 IPC_MESSAGE_CONTROL3(PushMessagingHostMsg_PermissionStatus, |
97 int32 /* render_frame_id */, | 111 int32 /* render_frame_id */, |
98 int32 /* service_worker_provider_id */, | 112 int32 /* service_worker_provider_id */, |
99 int32 /* permission_callback_id */) | 113 int32 /* permission_callback_id */) |
100 | 114 |
101 IPC_MESSAGE_CONTROL2(PushMessagingHostMsg_GetPermissionStatus, | 115 IPC_MESSAGE_CONTROL2(PushMessagingHostMsg_GetPermissionStatus, |
102 int32 /* request_id */, | 116 int32 /* request_id */, |
103 int64 /* service_worker_registration_id */) | 117 int64 /* service_worker_registration_id */) |
| 118 |
| 119 IPC_MESSAGE_CONTROL2(PushMessagingHostMsg_Unregister, |
| 120 int32 /* request_id */, |
| 121 int64 /* service_worker_registration_id */) |
OLD | NEW |