| 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 <stdint.h> | 8 #include <stdint.h> | 
| 9 | 9 | 
| 10 #include "content/public/common/push_messaging_status.h" | 10 #include "content/public/common/push_messaging_status.h" | 
|  | 11 #include "content/public/common/push_subscription_options.h" | 
| 11 #include "ipc/ipc_message_macros.h" | 12 #include "ipc/ipc_message_macros.h" | 
| 12 #include "third_party/WebKit/public/platform/modules/push_messaging/WebPushError
     .h" | 13 #include "third_party/WebKit/public/platform/modules/push_messaging/WebPushError
     .h" | 
| 13 #include "third_party/WebKit/public/platform/modules/push_messaging/WebPushPermi
     ssionStatus.h" | 14 #include "third_party/WebKit/public/platform/modules/push_messaging/WebPushPermi
     ssionStatus.h" | 
| 14 #include "url/gurl.h" | 15 #include "url/gurl.h" | 
| 15 | 16 | 
| 16 #define IPC_MESSAGE_START PushMessagingMsgStart | 17 #define IPC_MESSAGE_START PushMessagingMsgStart | 
| 17 | 18 | 
| 18 IPC_ENUM_TRAITS_MAX_VALUE(content::PushRegistrationStatus, | 19 IPC_ENUM_TRAITS_MAX_VALUE(content::PushRegistrationStatus, | 
| 19                           content::PUSH_REGISTRATION_STATUS_LAST) | 20                           content::PUSH_REGISTRATION_STATUS_LAST) | 
| 20 | 21 | 
| 21 IPC_ENUM_TRAITS_MAX_VALUE(content::PushGetRegistrationStatus, | 22 IPC_ENUM_TRAITS_MAX_VALUE(content::PushGetRegistrationStatus, | 
| 22                           content::PUSH_GETREGISTRATION_STATUS_LAST) | 23                           content::PUSH_GETREGISTRATION_STATUS_LAST) | 
| 23 | 24 | 
| 24 IPC_ENUM_TRAITS_MAX_VALUE( | 25 IPC_ENUM_TRAITS_MAX_VALUE( | 
| 25     blink::WebPushPermissionStatus, | 26     blink::WebPushPermissionStatus, | 
| 26     blink::WebPushPermissionStatus::WebPushPermissionStatusLast) | 27     blink::WebPushPermissionStatus::WebPushPermissionStatusLast) | 
| 27 | 28 | 
| 28 IPC_ENUM_TRAITS_MAX_VALUE( | 29 IPC_ENUM_TRAITS_MAX_VALUE( | 
| 29     blink::WebPushError::ErrorType, | 30     blink::WebPushError::ErrorType, | 
| 30     blink::WebPushError::ErrorType::ErrorTypeLast) | 31     blink::WebPushError::ErrorType::ErrorTypeLast) | 
| 31 | 32 | 
|  | 33 IPC_STRUCT_TRAITS_BEGIN(content::PushSubscriptionOptions) | 
|  | 34   IPC_STRUCT_TRAITS_MEMBER(user_visible_only) | 
|  | 35   IPC_STRUCT_TRAITS_MEMBER(using_public_key) | 
|  | 36   IPC_STRUCT_TRAITS_MEMBER(sender_info) | 
|  | 37 IPC_STRUCT_TRAITS_END() | 
|  | 38 | 
| 32 // Messages sent from the browser to the child process. | 39 // Messages sent from the browser to the child process. | 
| 33 | 40 | 
| 34 IPC_MESSAGE_ROUTED4(PushMessagingMsg_SubscribeFromDocumentSuccess, | 41 IPC_MESSAGE_ROUTED4(PushMessagingMsg_SubscribeFromDocumentSuccess, | 
| 35                     int32_t /* request_id */, | 42                     int32_t /* request_id */, | 
| 36                     GURL /* push_endpoint */, | 43                     GURL /* push_endpoint */, | 
| 37                     std::vector<uint8_t> /* p256dh */, | 44                     std::vector<uint8_t> /* p256dh */, | 
| 38                     std::vector<uint8_t> /* auth */) | 45                     std::vector<uint8_t> /* auth */) | 
| 39 | 46 | 
| 40 IPC_MESSAGE_CONTROL4(PushMessagingMsg_SubscribeFromWorkerSuccess, | 47 IPC_MESSAGE_CONTROL4(PushMessagingMsg_SubscribeFromWorkerSuccess, | 
| 41                      int32_t /* request_id */, | 48                      int32_t /* request_id */, | 
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 73 IPC_MESSAGE_CONTROL2(PushMessagingMsg_GetPermissionStatusSuccess, | 80 IPC_MESSAGE_CONTROL2(PushMessagingMsg_GetPermissionStatusSuccess, | 
| 74                      int32_t /* request_id */, | 81                      int32_t /* request_id */, | 
| 75                      blink::WebPushPermissionStatus /* status */) | 82                      blink::WebPushPermissionStatus /* status */) | 
| 76 | 83 | 
| 77 IPC_MESSAGE_CONTROL2(PushMessagingMsg_GetPermissionStatusError, | 84 IPC_MESSAGE_CONTROL2(PushMessagingMsg_GetPermissionStatusError, | 
| 78                      int32_t /* request_id */, | 85                      int32_t /* request_id */, | 
| 79                      blink::WebPushError::ErrorType /* error_type */) | 86                      blink::WebPushError::ErrorType /* error_type */) | 
| 80 | 87 | 
| 81 // Messages sent from the child process to the browser. | 88 // Messages sent from the child process to the browser. | 
| 82 | 89 | 
| 83 IPC_MESSAGE_CONTROL5(PushMessagingHostMsg_SubscribeFromDocument, | 90 IPC_MESSAGE_CONTROL4(PushMessagingHostMsg_SubscribeFromDocument, | 
| 84                      int32_t /* render_frame_id */, | 91                      int32_t /* render_frame_id */, | 
| 85                      int32_t /* request_id */, | 92                      int32_t /* request_id */, | 
| 86                      std::string /* sender_id */, | 93                      content::PushSubscriptionOptions /* options */, | 
| 87                      bool /* user_visible */, |  | 
| 88                      int64_t /* service_worker_registration_id */) | 94                      int64_t /* service_worker_registration_id */) | 
| 89 | 95 | 
| 90 IPC_MESSAGE_CONTROL3(PushMessagingHostMsg_SubscribeFromWorker, | 96 IPC_MESSAGE_CONTROL3(PushMessagingHostMsg_SubscribeFromWorker, | 
| 91                      int32_t /* request_id */, | 97                      int32_t /* request_id */, | 
| 92                      int64_t /* service_worker_registration_id */, | 98                      int64_t /* service_worker_registration_id */, | 
| 93                      bool /* user_visible */) | 99                      content::PushSubscriptionOptions /* options */) | 
| 94 | 100 | 
| 95 IPC_MESSAGE_CONTROL2(PushMessagingHostMsg_Unsubscribe, | 101 IPC_MESSAGE_CONTROL2(PushMessagingHostMsg_Unsubscribe, | 
| 96                      int32_t /* request_id */, | 102                      int32_t /* request_id */, | 
| 97                      int64_t /* service_worker_registration_id */) | 103                      int64_t /* service_worker_registration_id */) | 
| 98 | 104 | 
| 99 IPC_MESSAGE_CONTROL2(PushMessagingHostMsg_GetSubscription, | 105 IPC_MESSAGE_CONTROL2(PushMessagingHostMsg_GetSubscription, | 
| 100                      int32_t /* request_id */, | 106                      int32_t /* request_id */, | 
| 101                      int64_t /* service_worker_registration_id */) | 107                      int64_t /* service_worker_registration_id */) | 
| 102 | 108 | 
| 103 IPC_MESSAGE_CONTROL3(PushMessagingHostMsg_GetPermissionStatus, | 109 IPC_MESSAGE_CONTROL3(PushMessagingHostMsg_GetPermissionStatus, | 
| 104                      int32_t /* request_id */, | 110                      int32_t /* request_id */, | 
| 105                      int64_t /* service_worker_registration_id */, | 111                      int64_t /* service_worker_registration_id */, | 
| 106                      bool /* user_visible */) | 112                      bool /* user_visible */) | 
| OLD | NEW | 
|---|