cc: Use GetSize instead of recorded_viewport_
[chromium-blink-merge.git] / content / common / push_messaging_messages.h
blob6dfacf9c90376b9f29daec29e9357bd9d6fbc7fe
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 "content/public/common/push_messaging_status.h"
9 #include "ipc/ipc_message_macros.h"
10 #include "third_party/WebKit/public/platform/WebPushPermissionStatus.h"
11 #include "url/gurl.h"
13 #define IPC_MESSAGE_START PushMessagingMsgStart
15 IPC_ENUM_TRAITS_MAX_VALUE(content::PushRegistrationStatus,
16 content::PUSH_REGISTRATION_STATUS_LAST)
18 IPC_ENUM_TRAITS_MAX_VALUE(
19 blink::WebPushPermissionStatus,
20 blink::WebPushPermissionStatus::WebPushPermissionStatusLast)
22 // Messages sent from the browser to the child process.
24 IPC_MESSAGE_ROUTED3(PushMessagingMsg_RegisterFromDocumentSuccess,
25 int32 /* request_id */,
26 GURL /* push_endpoint */,
27 std::string /* push_registration_id */)
29 IPC_MESSAGE_CONTROL3(PushMessagingMsg_RegisterFromWorkerSuccess,
30 int32 /* request_id */,
31 GURL /* push_endpoint */,
32 std::string /* push_registration_id */)
34 IPC_MESSAGE_ROUTED2(PushMessagingMsg_RegisterFromDocumentError,
35 int32 /* request_id */,
36 content::PushRegistrationStatus /* status */)
38 IPC_MESSAGE_CONTROL2(PushMessagingMsg_RegisterFromWorkerError,
39 int32 /* request_id */,
40 content::PushRegistrationStatus /* status */)
42 // TODO(mvanouwerkerk): Delete this after switching to the platform code path.
43 IPC_MESSAGE_ROUTED2(PushMessagingMsg_PermissionStatusResult,
44 int32 /* callback_id */,
45 blink::WebPushPermissionStatus /* status */)
47 IPC_MESSAGE_CONTROL2(PushMessagingMsg_GetPermissionStatusSuccess,
48 int32 /* request_id */,
49 blink::WebPushPermissionStatus /* status */)
51 // TODO(mvanouwerkerk): Delete this after switching to the platform code path.
52 IPC_MESSAGE_ROUTED1(PushMessagingMsg_PermissionStatusFailure,
53 int32 /* callback_id */)
55 IPC_MESSAGE_CONTROL1(PushMessagingMsg_GetPermissionStatusError,
56 int32 /* request_id */)
58 // Messages sent from the child process to the browser.
60 // TODO(mvanouwerkerk): Delete this when it is no longer used.
61 IPC_MESSAGE_CONTROL5(PushMessagingHostMsg_RegisterFromDocumentOld,
62 int32 /* render_frame_id */,
63 int32 /* request_id */,
64 std::string /* sender_id */,
65 bool /* user_visible_only */,
66 int32 /* service_worker_provider_id */)
68 IPC_MESSAGE_CONTROL5(PushMessagingHostMsg_RegisterFromDocument,
69 int32 /* render_frame_id */,
70 int32 /* request_id */,
71 std::string /* sender_id */,
72 bool /* user_visible_only */,
73 int64 /* service_worker_registration_id */)
75 IPC_MESSAGE_CONTROL2(PushMessagingHostMsg_RegisterFromWorker,
76 int32 /* request_id */,
77 int64 /* service_worker_registration_id */)
79 // TODO(mvanouwerkerk): Delete this after switching to the platform code path.
80 IPC_MESSAGE_CONTROL3(PushMessagingHostMsg_PermissionStatus,
81 int32 /* render_frame_id */,
82 int32 /* service_worker_provider_id */,
83 int32 /* permission_callback_id */)
85 IPC_MESSAGE_CONTROL2(PushMessagingHostMsg_GetPermissionStatus,
86 int32 /* request_id */,
87 int64 /* service_worker_registration_id */)