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/common/push_registration_params.h" | |
8 #include "content/public/common/push_messaging_status.h" | 9 #include "content/public/common/push_messaging_status.h" |
9 #include "ipc/ipc_message_macros.h" | 10 #include "ipc/ipc_message_macros.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 // Messages sent from the browser to the renderer. | 22 // Messages sent from the browser to the renderer. |
22 | 23 |
24 IPC_STRUCT_TRAITS_BEGIN(content::PushRegistrationParams) | |
25 IPC_STRUCT_TRAITS_MEMBER(sender_id) | |
26 IPC_STRUCT_TRAITS_MEMBER(user_visible_only) | |
27 IPC_STRUCT_TRAITS_MEMBER(user_gesture) | |
mlamouri (slow - plz ping)
2014/12/01 21:05:09
I wouldn't put |user_gesture| in that struct.
Peter Beverloo
2014/12/03 15:01:59
Acknowledged.
| |
28 IPC_STRUCT_TRAITS_END() | |
29 | |
23 IPC_MESSAGE_ROUTED3(PushMessagingMsg_RegisterSuccess, | 30 IPC_MESSAGE_ROUTED3(PushMessagingMsg_RegisterSuccess, |
24 int32 /* callbacks_id */, | 31 int32 /* callbacks_id */, |
25 GURL /* push_endpoint */, | 32 GURL /* push_endpoint */, |
26 std::string /* push_registration_id */) | 33 std::string /* push_registration_id */) |
27 | 34 |
28 IPC_MESSAGE_ROUTED2(PushMessagingMsg_RegisterError, | 35 IPC_MESSAGE_ROUTED2(PushMessagingMsg_RegisterError, |
29 int32 /* callbacks_id */, | 36 int32 /* callbacks_id */, |
30 content::PushRegistrationStatus /* status */) | 37 content::PushRegistrationStatus /* status */) |
31 | 38 |
32 IPC_MESSAGE_ROUTED2(PushMessagingMsg_PermissionStatusResult, | 39 IPC_MESSAGE_ROUTED2(PushMessagingMsg_PermissionStatusResult, |
33 int32 /* callback_id */, | 40 int32 /* callback_id */, |
34 blink::WebPushPermissionStatus /* status */) | 41 blink::WebPushPermissionStatus /* status */) |
35 | 42 |
36 IPC_MESSAGE_ROUTED1(PushMessagingMsg_PermissionStatusFailure, | 43 IPC_MESSAGE_ROUTED1(PushMessagingMsg_PermissionStatusFailure, |
37 int32 /* callback_id */) | 44 int32 /* callback_id */) |
38 | 45 |
39 // Messages sent from the renderer to the browser. | 46 // Messages sent from the renderer to the browser. |
40 | 47 |
41 IPC_MESSAGE_CONTROL5(PushMessagingHostMsg_Register, | 48 IPC_MESSAGE_CONTROL4(PushMessagingHostMsg_Register, |
42 int32 /* render_frame_id */, | 49 int32 /* render_frame_id */, |
43 int32 /* callbacks_id */, | 50 int32 /* callbacks_id */, |
44 std::string /* sender_id */, | 51 content::PushRegistrationParams /* registration_params */, |
45 bool /* user_gesture */, | |
46 int32 /* service_worker_provider_id */) | 52 int32 /* service_worker_provider_id */) |
47 | 53 |
48 IPC_MESSAGE_CONTROL3(PushMessagingHostMsg_PermissionStatus, | 54 IPC_MESSAGE_CONTROL3(PushMessagingHostMsg_PermissionStatus, |
49 int32 /* render_frame_id */, | 55 int32 /* render_frame_id */, |
50 int32 /* service_worker_provider_id */, | 56 int32 /* service_worker_provider_id */, |
51 int32 /* permission_callback_id */) | 57 int32 /* permission_callback_id */) |
OLD | NEW |