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( | 19 IPC_ENUM_TRAITS_MAX_VALUE( |
19 blink::WebPushPermissionStatus, | 20 blink::WebPushPermissionStatus, |
20 blink::WebPushPermissionStatus::WebPushPermissionStatusLast) | 21 blink::WebPushPermissionStatus::WebPushPermissionStatusLast) |
21 | 22 |
| 23 IPC_ENUM_TRAITS_MAX_VALUE( |
| 24 blink::WebPushError::ErrorType, |
| 25 blink::WebPushError::ErrorType::ErrorTypeLast) |
| 26 |
22 // Messages sent from the browser to the child process. | 27 // Messages sent from the browser to the child process. |
23 | 28 |
24 IPC_MESSAGE_ROUTED3(PushMessagingMsg_RegisterFromDocumentSuccess, | 29 IPC_MESSAGE_ROUTED3(PushMessagingMsg_RegisterFromDocumentSuccess, |
25 int32 /* request_id */, | 30 int32 /* request_id */, |
26 GURL /* push_endpoint */, | 31 GURL /* push_endpoint */, |
27 std::string /* push_registration_id */) | 32 std::string /* push_registration_id */) |
28 | 33 |
29 IPC_MESSAGE_CONTROL3(PushMessagingMsg_RegisterFromWorkerSuccess, | 34 IPC_MESSAGE_CONTROL3(PushMessagingMsg_RegisterFromWorkerSuccess, |
30 int32 /* request_id */, | 35 int32 /* request_id */, |
31 GURL /* push_endpoint */, | 36 GURL /* push_endpoint */, |
(...skipping 16 matching lines...) Expand all Loading... |
48 int32 /* request_id */, | 53 int32 /* request_id */, |
49 blink::WebPushPermissionStatus /* status */) | 54 blink::WebPushPermissionStatus /* status */) |
50 | 55 |
51 // TODO(mvanouwerkerk): Delete this after switching to the platform code path. | 56 // TODO(mvanouwerkerk): Delete this after switching to the platform code path. |
52 IPC_MESSAGE_ROUTED1(PushMessagingMsg_PermissionStatusFailure, | 57 IPC_MESSAGE_ROUTED1(PushMessagingMsg_PermissionStatusFailure, |
53 int32 /* callback_id */) | 58 int32 /* callback_id */) |
54 | 59 |
55 IPC_MESSAGE_CONTROL1(PushMessagingMsg_GetPermissionStatusError, | 60 IPC_MESSAGE_CONTROL1(PushMessagingMsg_GetPermissionStatusError, |
56 int32 /* request_id */) | 61 int32 /* request_id */) |
57 | 62 |
| 63 IPC_MESSAGE_CONTROL2(PushMessagingMsg_UnregisterSuccess, |
| 64 int32 /* request_id */, |
| 65 bool /* did_unregister */) |
| 66 |
| 67 IPC_MESSAGE_CONTROL3(PushMessagingMsg_UnregisterError, |
| 68 int32 /* request_id */, |
| 69 blink::WebPushError::ErrorType /* error_type */, |
| 70 std::string /* error_message */) |
| 71 |
58 // Messages sent from the child process to the browser. | 72 // Messages sent from the child process to the browser. |
59 | 73 |
60 // TODO(mvanouwerkerk): Delete this when it is no longer used. | 74 // TODO(mvanouwerkerk): Delete this when it is no longer used. |
61 IPC_MESSAGE_CONTROL5(PushMessagingHostMsg_RegisterFromDocumentOld, | 75 IPC_MESSAGE_CONTROL5(PushMessagingHostMsg_RegisterFromDocumentOld, |
62 int32 /* render_frame_id */, | 76 int32 /* render_frame_id */, |
63 int32 /* request_id */, | 77 int32 /* request_id */, |
64 std::string /* sender_id */, | 78 std::string /* sender_id */, |
65 bool /* user_visible_only */, | 79 bool /* user_visible_only */, |
66 int32 /* service_worker_provider_id */) | 80 int32 /* service_worker_provider_id */) |
67 | 81 |
(...skipping 10 matching lines...) Expand all Loading... |
78 | 92 |
79 // TODO(mvanouwerkerk): Delete this after switching to the platform code path. | 93 // TODO(mvanouwerkerk): Delete this after switching to the platform code path. |
80 IPC_MESSAGE_CONTROL3(PushMessagingHostMsg_PermissionStatus, | 94 IPC_MESSAGE_CONTROL3(PushMessagingHostMsg_PermissionStatus, |
81 int32 /* render_frame_id */, | 95 int32 /* render_frame_id */, |
82 int32 /* service_worker_provider_id */, | 96 int32 /* service_worker_provider_id */, |
83 int32 /* permission_callback_id */) | 97 int32 /* permission_callback_id */) |
84 | 98 |
85 IPC_MESSAGE_CONTROL2(PushMessagingHostMsg_GetPermissionStatus, | 99 IPC_MESSAGE_CONTROL2(PushMessagingHostMsg_GetPermissionStatus, |
86 int32 /* request_id */, | 100 int32 /* request_id */, |
87 int64 /* service_worker_registration_id */) | 101 int64 /* service_worker_registration_id */) |
| 102 |
| 103 IPC_MESSAGE_CONTROL2(PushMessagingHostMsg_Unregister, |
| 104 int32 /* request_id */, |
| 105 int64 /* service_worker_registration_id */) |
OLD | NEW |