GPU workaround to simulate Out of Memory errors with large textures
[chromium-blink-merge.git] / content / common / push_messaging_messages.h
blob73c11fe08b5fa5ec8c1c66925eb206a2c8ea3664
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_RegisterFromDocumentSuccess,
35 int32_t /* request_id */,
36 GURL /* push_endpoint */,
37 std::string /* push_registration_id */)
39 IPC_MESSAGE_CONTROL3(PushMessagingMsg_RegisterFromWorkerSuccess,
40 int32_t /* request_id */,
41 GURL /* push_endpoint */,
42 std::string /* push_registration_id */)
44 IPC_MESSAGE_ROUTED2(PushMessagingMsg_RegisterFromDocumentError,
45 int32_t /* request_id */,
46 content::PushRegistrationStatus /* status */)
48 IPC_MESSAGE_CONTROL2(PushMessagingMsg_RegisterFromWorkerError,
49 int32_t /* request_id */,
50 content::PushRegistrationStatus /* status */)
52 IPC_MESSAGE_CONTROL2(PushMessagingMsg_UnregisterSuccess,
53 int32_t /* request_id */,
54 bool /* did_unregister */)
56 IPC_MESSAGE_CONTROL3(PushMessagingMsg_UnregisterError,
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::string /* push_registration_id */)
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_CONTROL1(PushMessagingMsg_GetPermissionStatusError,
75 int32_t /* request_id */)
77 // Messages sent from the child process to the browser.
79 IPC_MESSAGE_CONTROL5(PushMessagingHostMsg_RegisterFromDocument,
80 int32_t /* render_frame_id */,
81 int32_t /* request_id */,
82 std::string /* sender_id */,
83 bool /* user_visible */,
84 int64_t /* service_worker_registration_id */)
86 IPC_MESSAGE_CONTROL3(PushMessagingHostMsg_RegisterFromWorker,
87 int32_t /* request_id */,
88 int64_t /* service_worker_registration_id */,
89 bool /* user_visible */)
91 IPC_MESSAGE_CONTROL2(PushMessagingHostMsg_Unregister,
92 int32_t /* request_id */,
93 int64_t /* service_worker_registration_id */)
95 IPC_MESSAGE_CONTROL2(PushMessagingHostMsg_GetRegistration,
96 int32_t /* request_id */,
97 int64_t /* service_worker_registration_id */)
99 IPC_MESSAGE_CONTROL3(PushMessagingHostMsg_GetPermissionStatus,
100 int32_t /* request_id */,
101 int64_t /* service_worker_registration_id */,
102 bool /* user_visible */)