Add ICU message format support
[chromium-blink-merge.git] / content / common / push_messaging_messages.h
blob0578c240b3a2c9f4a7500e12013f1bd7135c3fd4
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
3 // found in the LICENSE file.
5 // IPC messages for push messaging.
6 // Multiply-included message file, hence no include guard.
8 #include <stdint.h>
10 #include "content/public/common/push_messaging_status.h"
11 #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/WebPushPermissionStatus.h"
14 #include "url/gurl.h"
16 #define IPC_MESSAGE_START PushMessagingMsgStart
18 IPC_ENUM_TRAITS_MAX_VALUE(content::PushRegistrationStatus,
19 content::PUSH_REGISTRATION_STATUS_LAST)
21 IPC_ENUM_TRAITS_MAX_VALUE(content::PushGetRegistrationStatus,
22 content::PUSH_GETREGISTRATION_STATUS_LAST)
24 IPC_ENUM_TRAITS_MAX_VALUE(
25 blink::WebPushPermissionStatus,
26 blink::WebPushPermissionStatus::WebPushPermissionStatusLast)
28 IPC_ENUM_TRAITS_MAX_VALUE(
29 blink::WebPushError::ErrorType,
30 blink::WebPushError::ErrorType::ErrorTypeLast)
32 // Messages sent from the browser to the child process.
34 IPC_MESSAGE_ROUTED3(PushMessagingMsg_SubscribeFromDocumentSuccess,
35 int32_t /* request_id */,
36 GURL /* push_endpoint */,
37 std::vector<uint8_t> /* curve25519dh */)
39 IPC_MESSAGE_CONTROL3(PushMessagingMsg_SubscribeFromWorkerSuccess,
40 int32_t /* request_id */,
41 GURL /* push_endpoint */,
42 std::vector<uint8_t> /* curve25519dh */)
44 IPC_MESSAGE_ROUTED2(PushMessagingMsg_SubscribeFromDocumentError,
45 int32_t /* request_id */,
46 content::PushRegistrationStatus /* status */)
48 IPC_MESSAGE_CONTROL2(PushMessagingMsg_SubscribeFromWorkerError,
49 int32_t /* request_id */,
50 content::PushRegistrationStatus /* status */)
52 IPC_MESSAGE_CONTROL2(PushMessagingMsg_UnsubscribeSuccess,
53 int32_t /* request_id */,
54 bool /* did_unsubscribe */)
56 IPC_MESSAGE_CONTROL3(PushMessagingMsg_UnsubscribeError,
57 int32_t /* request_id */,
58 blink::WebPushError::ErrorType /* error_type */,
59 std::string /* error_message */)
61 IPC_MESSAGE_CONTROL3(PushMessagingMsg_GetRegistrationSuccess,
62 int32_t /* request_id */,
63 GURL /* push_endpoint */,
64 std::vector<uint8_t> /* curve25519dh */)
66 IPC_MESSAGE_CONTROL2(PushMessagingMsg_GetRegistrationError,
67 int32_t /* request_id */,
68 content::PushGetRegistrationStatus /* status */)
70 IPC_MESSAGE_CONTROL2(PushMessagingMsg_GetPermissionStatusSuccess,
71 int32_t /* request_id */,
72 blink::WebPushPermissionStatus /* status */)
74 IPC_MESSAGE_CONTROL2(PushMessagingMsg_GetPermissionStatusError,
75 int32_t /* request_id */,
76 blink::WebPushError::ErrorType /* error_type */)
78 // Messages sent from the child process to the browser.
80 IPC_MESSAGE_CONTROL5(PushMessagingHostMsg_SubscribeFromDocument,
81 int32_t /* render_frame_id */,
82 int32_t /* request_id */,
83 std::string /* sender_id */,
84 bool /* user_visible */,
85 int64_t /* service_worker_registration_id */)
87 IPC_MESSAGE_CONTROL3(PushMessagingHostMsg_SubscribeFromWorker,
88 int32_t /* request_id */,
89 int64_t /* service_worker_registration_id */,
90 bool /* user_visible */)
92 IPC_MESSAGE_CONTROL2(PushMessagingHostMsg_Unsubscribe,
93 int32_t /* request_id */,
94 int64_t /* service_worker_registration_id */)
96 IPC_MESSAGE_CONTROL2(PushMessagingHostMsg_GetRegistration,
97 int32_t /* request_id */,
98 int64_t /* service_worker_registration_id */)
100 IPC_MESSAGE_CONTROL3(PushMessagingHostMsg_GetPermissionStatus,
101 int32_t /* request_id */,
102 int64_t /* service_worker_registration_id */,
103 bool /* user_visible */)