| 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(sender_info) | 
 |   36 IPC_STRUCT_TRAITS_END() | 
 |   37  | 
|   32 // Messages sent from the browser to the child process. |   38 // Messages sent from the browser to the child process. | 
|   33  |   39  | 
|   34 IPC_MESSAGE_ROUTED4(PushMessagingMsg_SubscribeFromDocumentSuccess, |   40 IPC_MESSAGE_ROUTED4(PushMessagingMsg_SubscribeFromDocumentSuccess, | 
|   35                     int32_t /* request_id */, |   41                     int32_t /* request_id */, | 
|   36                     GURL /* push_endpoint */, |   42                     GURL /* push_endpoint */, | 
|   37                     std::vector<uint8_t> /* p256dh */, |   43                     std::vector<uint8_t> /* p256dh */, | 
|   38                     std::vector<uint8_t> /* auth */) |   44                     std::vector<uint8_t> /* auth */) | 
|   39  |   45  | 
|   40 IPC_MESSAGE_CONTROL4(PushMessagingMsg_SubscribeFromWorkerSuccess, |   46 IPC_MESSAGE_CONTROL4(PushMessagingMsg_SubscribeFromWorkerSuccess, | 
|   41                      int32_t /* request_id */, |   47                      int32_t /* request_id */, | 
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   73 IPC_MESSAGE_CONTROL2(PushMessagingMsg_GetPermissionStatusSuccess, |   79 IPC_MESSAGE_CONTROL2(PushMessagingMsg_GetPermissionStatusSuccess, | 
|   74                      int32_t /* request_id */, |   80                      int32_t /* request_id */, | 
|   75                      blink::WebPushPermissionStatus /* status */) |   81                      blink::WebPushPermissionStatus /* status */) | 
|   76  |   82  | 
|   77 IPC_MESSAGE_CONTROL2(PushMessagingMsg_GetPermissionStatusError, |   83 IPC_MESSAGE_CONTROL2(PushMessagingMsg_GetPermissionStatusError, | 
|   78                      int32_t /* request_id */, |   84                      int32_t /* request_id */, | 
|   79                      blink::WebPushError::ErrorType /* error_type */) |   85                      blink::WebPushError::ErrorType /* error_type */) | 
|   80  |   86  | 
|   81 // Messages sent from the child process to the browser. |   87 // Messages sent from the child process to the browser. | 
|   82  |   88  | 
|   83 IPC_MESSAGE_CONTROL5(PushMessagingHostMsg_SubscribeFromDocument, |   89 IPC_MESSAGE_CONTROL4(PushMessagingHostMsg_SubscribeFromDocument, | 
|   84                      int32_t /* render_frame_id */, |   90                      int32_t /* render_frame_id */, | 
|   85                      int32_t /* request_id */, |   91                      int32_t /* request_id */, | 
|   86                      std::string /* sender_id */, |   92                      content::PushSubscriptionOptions /* options */, | 
|   87                      bool /* user_visible */, |  | 
|   88                      int64_t /* service_worker_registration_id */) |   93                      int64_t /* service_worker_registration_id */) | 
|   89  |   94  | 
|   90 IPC_MESSAGE_CONTROL3(PushMessagingHostMsg_SubscribeFromWorker, |   95 IPC_MESSAGE_CONTROL3(PushMessagingHostMsg_SubscribeFromWorker, | 
|   91                      int32_t /* request_id */, |   96                      int32_t /* request_id */, | 
|   92                      int64_t /* service_worker_registration_id */, |   97                      int64_t /* service_worker_registration_id */, | 
|   93                      bool /* user_visible */) |   98                      content::PushSubscriptionOptions /* options */) | 
|   94  |   99  | 
|   95 IPC_MESSAGE_CONTROL2(PushMessagingHostMsg_Unsubscribe, |  100 IPC_MESSAGE_CONTROL2(PushMessagingHostMsg_Unsubscribe, | 
|   96                      int32_t /* request_id */, |  101                      int32_t /* request_id */, | 
|   97                      int64_t /* service_worker_registration_id */) |  102                      int64_t /* service_worker_registration_id */) | 
|   98  |  103  | 
|   99 IPC_MESSAGE_CONTROL2(PushMessagingHostMsg_GetSubscription, |  104 IPC_MESSAGE_CONTROL2(PushMessagingHostMsg_GetSubscription, | 
|  100                      int32_t /* request_id */, |  105                      int32_t /* request_id */, | 
|  101                      int64_t /* service_worker_registration_id */) |  106                      int64_t /* service_worker_registration_id */) | 
|  102  |  107  | 
|  103 IPC_MESSAGE_CONTROL3(PushMessagingHostMsg_GetPermissionStatus, |  108 IPC_MESSAGE_CONTROL3(PushMessagingHostMsg_GetPermissionStatus, | 
|  104                      int32_t /* request_id */, |  109                      int32_t /* request_id */, | 
|  105                      int64_t /* service_worker_registration_id */, |  110                      int64_t /* service_worker_registration_id */, | 
|  106                      bool /* user_visible */) |  111                      bool /* user_visible */) | 
| OLD | NEW |