Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(356)

Side by Side Diff: content/common/push_messaging_messages.h

Issue 1129833003: Rename "register" -> "subscribe" in the Push Messaging code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@p-userVisible-tests
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "ipc/ipc_message_macros.h" 11 #include "ipc/ipc_message_macros.h"
12 #include "third_party/WebKit/public/platform/modules/push_messaging/WebPushError .h" 12 #include "third_party/WebKit/public/platform/modules/push_messaging/WebPushError .h"
13 #include "third_party/WebKit/public/platform/modules/push_messaging/WebPushPermi ssionStatus.h" 13 #include "third_party/WebKit/public/platform/modules/push_messaging/WebPushPermi ssionStatus.h"
14 #include "url/gurl.h" 14 #include "url/gurl.h"
15 15
16 #define IPC_MESSAGE_START PushMessagingMsgStart 16 #define IPC_MESSAGE_START PushMessagingMsgStart
17 17
18 IPC_ENUM_TRAITS_MAX_VALUE(content::PushRegistrationStatus, 18 IPC_ENUM_TRAITS_MAX_VALUE(content::PushSubscriptionStatus,
19 content::PUSH_REGISTRATION_STATUS_LAST) 19 content::PUSH_SUBSCRIPTION_STATUS_LAST)
20 20
21 IPC_ENUM_TRAITS_MAX_VALUE(content::PushGetRegistrationStatus, 21 IPC_ENUM_TRAITS_MAX_VALUE(content::PushGetSubscriptionStatus,
22 content::PUSH_GETREGISTRATION_STATUS_LAST) 22 content::PUSH_GETSUBSCRIPTION_STATUS_LAST)
23 23
24 IPC_ENUM_TRAITS_MAX_VALUE( 24 IPC_ENUM_TRAITS_MAX_VALUE(
25 blink::WebPushPermissionStatus, 25 blink::WebPushPermissionStatus,
26 blink::WebPushPermissionStatus::WebPushPermissionStatusLast) 26 blink::WebPushPermissionStatus::WebPushPermissionStatusLast)
27 27
28 IPC_ENUM_TRAITS_MAX_VALUE( 28 IPC_ENUM_TRAITS_MAX_VALUE(
29 blink::WebPushError::ErrorType, 29 blink::WebPushError::ErrorType,
30 blink::WebPushError::ErrorType::ErrorTypeLast) 30 blink::WebPushError::ErrorType::ErrorTypeLast)
31 31
32 // Messages sent from the browser to the child process. 32 // Messages sent from the browser to the child process.
33 33
34 IPC_MESSAGE_ROUTED3(PushMessagingMsg_RegisterFromDocumentSuccess, 34 IPC_MESSAGE_ROUTED3(PushMessagingMsg_SubscribeFromDocumentSuccess,
35 int32_t /* request_id */, 35 int32_t /* request_id */,
36 GURL /* push_endpoint */, 36 GURL /* push_endpoint */,
37 std::string /* push_registration_id */) 37 std::string /* push_subscription_id */)
38 38
39 IPC_MESSAGE_CONTROL3(PushMessagingMsg_RegisterFromWorkerSuccess, 39 IPC_MESSAGE_CONTROL3(PushMessagingMsg_SubscribeFromWorkerSuccess,
40 int32_t /* request_id */, 40 int32_t /* request_id */,
41 GURL /* push_endpoint */, 41 GURL /* push_endpoint */,
42 std::string /* push_registration_id */) 42 std::string /* push_subscription_id */)
43 43
44 IPC_MESSAGE_ROUTED2(PushMessagingMsg_RegisterFromDocumentError, 44 IPC_MESSAGE_ROUTED2(PushMessagingMsg_SubscribeFromDocumentError,
45 int32_t /* request_id */, 45 int32_t /* request_id */,
46 content::PushRegistrationStatus /* status */) 46 content::PushSubscriptionStatus /* status */)
47 47
48 IPC_MESSAGE_CONTROL2(PushMessagingMsg_RegisterFromWorkerError, 48 IPC_MESSAGE_CONTROL2(PushMessagingMsg_SubscribeFromWorkerError,
49 int32_t /* request_id */, 49 int32_t /* request_id */,
50 content::PushRegistrationStatus /* status */) 50 content::PushSubscriptionStatus /* status */)
51 51
52 IPC_MESSAGE_CONTROL2(PushMessagingMsg_UnregisterSuccess, 52 IPC_MESSAGE_CONTROL2(PushMessagingMsg_UnsubscribeSuccess,
53 int32_t /* request_id */, 53 int32_t /* request_id */,
54 bool /* did_unregister */) 54 bool /* did_unsubscribe */)
55 55
56 IPC_MESSAGE_CONTROL3(PushMessagingMsg_UnregisterError, 56 IPC_MESSAGE_CONTROL3(PushMessagingMsg_UnsubscribeError,
57 int32_t /* request_id */, 57 int32_t /* request_id */,
58 blink::WebPushError::ErrorType /* error_type */, 58 blink::WebPushError::ErrorType /* error_type */,
59 std::string /* error_message */) 59 std::string /* error_message */)
60 60
61 IPC_MESSAGE_CONTROL3(PushMessagingMsg_GetRegistrationSuccess, 61 IPC_MESSAGE_CONTROL3(PushMessagingMsg_GetSubscriptionSuccess,
62 int32_t /* request_id */, 62 int32_t /* request_id */,
63 GURL /* push_endpoint */, 63 GURL /* push_endpoint */,
64 std::string /* push_registration_id */) 64 std::string /* push_subscription_id */)
65 65
66 IPC_MESSAGE_CONTROL2(PushMessagingMsg_GetRegistrationError, 66 IPC_MESSAGE_CONTROL2(PushMessagingMsg_GetSubscriptionError,
67 int32_t /* request_id */, 67 int32_t /* request_id */,
68 content::PushGetRegistrationStatus /* status */) 68 content::PushGetSubscriptionStatus /* status */)
69 69
70 IPC_MESSAGE_CONTROL2(PushMessagingMsg_GetPermissionStatusSuccess, 70 IPC_MESSAGE_CONTROL2(PushMessagingMsg_GetPermissionStatusSuccess,
71 int32_t /* request_id */, 71 int32_t /* request_id */,
72 blink::WebPushPermissionStatus /* status */) 72 blink::WebPushPermissionStatus /* status */)
73 73
74 IPC_MESSAGE_CONTROL1(PushMessagingMsg_GetPermissionStatusError, 74 IPC_MESSAGE_CONTROL1(PushMessagingMsg_GetPermissionStatusError,
75 int32_t /* request_id */) 75 int32_t /* request_id */)
76 76
77 // Messages sent from the child process to the browser. 77 // Messages sent from the child process to the browser.
78 78
79 IPC_MESSAGE_CONTROL5(PushMessagingHostMsg_RegisterFromDocument, 79 IPC_MESSAGE_CONTROL5(PushMessagingHostMsg_SubscribeFromDocument,
80 int32_t /* render_frame_id */, 80 int32_t /* render_frame_id */,
81 int32_t /* request_id */, 81 int32_t /* request_id */,
82 std::string /* sender_id */, 82 std::string /* sender_id */,
83 bool /* user_visible */, 83 bool /* user_visible */,
84 int64_t /* service_worker_registration_id */) 84 int64_t /* service_worker_registration_id */)
85 85
86 IPC_MESSAGE_CONTROL3(PushMessagingHostMsg_RegisterFromWorker, 86 IPC_MESSAGE_CONTROL3(PushMessagingHostMsg_SubscribeFromWorker,
87 int32_t /* request_id */, 87 int32_t /* request_id */,
88 int64_t /* service_worker_registration_id */, 88 int64_t /* service_worker_registration_id */,
89 bool /* user_visible */) 89 bool /* user_visible */)
90 90
91 IPC_MESSAGE_CONTROL2(PushMessagingHostMsg_Unregister, 91 IPC_MESSAGE_CONTROL2(PushMessagingHostMsg_Unsubscribe,
92 int32_t /* request_id */, 92 int32_t /* request_id */,
93 int64_t /* service_worker_registration_id */) 93 int64_t /* service_worker_registration_id */)
94 94
95 IPC_MESSAGE_CONTROL2(PushMessagingHostMsg_GetRegistration, 95 IPC_MESSAGE_CONTROL2(PushMessagingHostMsg_GetSubscription,
96 int32_t /* request_id */, 96 int32_t /* request_id */,
97 int64_t /* service_worker_registration_id */) 97 int64_t /* service_worker_registration_id */)
98 98
99 IPC_MESSAGE_CONTROL3(PushMessagingHostMsg_GetPermissionStatus, 99 IPC_MESSAGE_CONTROL3(PushMessagingHostMsg_GetPermissionStatus,
100 int32_t /* request_id */, 100 int32_t /* request_id */,
101 int64_t /* service_worker_registration_id */, 101 int64_t /* service_worker_registration_id */,
102 bool /* user_visible */) 102 bool /* user_visible */)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698