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 #ifndef CONTENT_CHILD_PUSH_MESSAGING_PUSH_PROVIDER_H_ | 5 #ifndef CONTENT_CHILD_PUSH_MESSAGING_PUSH_PROVIDER_H_ |
6 #define CONTENT_CHILD_PUSH_MESSAGING_PUSH_PROVIDER_H_ | 6 #define CONTENT_CHILD_PUSH_MESSAGING_PUSH_PROVIDER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/id_map.h" | 10 #include "base/id_map.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 blink::WebPushPermissionStatusCallbacks* callbacks); | 56 blink::WebPushPermissionStatusCallbacks* callbacks); |
57 | 57 |
58 // Called by the PushDispatcher. | 58 // Called by the PushDispatcher. |
59 bool OnMessageReceived(const IPC::Message& message); | 59 bool OnMessageReceived(const IPC::Message& message); |
60 | 60 |
61 private: | 61 private: |
62 PushProvider(ThreadSafeSender* thread_safe_sender, | 62 PushProvider(ThreadSafeSender* thread_safe_sender, |
63 PushDispatcher* push_dispatcher); | 63 PushDispatcher* push_dispatcher); |
64 | 64 |
65 // IPC message handlers. | 65 // IPC message handlers. |
66 void OnRegisterFromWorkerSuccess(int request_id, | 66 void OnSubscribeFromWorkerSuccess(int request_id, |
67 const GURL& endpoint, | 67 const GURL& endpoint, |
68 const std::string& registration_id); | 68 const std::string& subscription_id); |
69 void OnRegisterFromWorkerError(int request_id, PushRegistrationStatus status); | 69 void OnSubscribeFromWorkerError(int request_id, PushRegistrationStatus status)
; |
70 void OnUnregisterSuccess(int request_id, bool did_unregister); | 70 void OnUnsubscribeSuccess(int request_id, bool did_unregister); |
71 void OnUnregisterError(int request_id, | 71 void OnUnsubscribeError(int request_id, |
72 blink::WebPushError::ErrorType error_type, | 72 blink::WebPushError::ErrorType error_type, |
73 const std::string& error_message); | 73 const std::string& error_message); |
74 void OnGetRegistrationSuccess(int request_id, | 74 void OnGetRegistrationSuccess(int request_id, |
75 const GURL& endpoint, | 75 const GURL& endpoint, |
76 const std::string& registration_id); | 76 const std::string& registration_id); |
77 void OnGetRegistrationError(int request_id, PushGetRegistrationStatus status); | 77 void OnGetRegistrationError(int request_id, PushGetRegistrationStatus status); |
78 void OnGetPermissionStatusSuccess(int request_id, | 78 void OnGetPermissionStatusSuccess(int request_id, |
79 blink::WebPushPermissionStatus status); | 79 blink::WebPushPermissionStatus status); |
80 void OnGetPermissionStatusError(int request_id, | 80 void OnGetPermissionStatusError(int request_id, |
81 blink::WebPushError::ErrorType error); | 81 blink::WebPushError::ErrorType error); |
(...skipping 15 matching lines...) Expand all Loading... |
97 // the callbacks. | 97 // the callbacks. |
98 IDMap<blink::WebPushUnsubscribeCallbacks, IDMapOwnPointer> | 98 IDMap<blink::WebPushUnsubscribeCallbacks, IDMapOwnPointer> |
99 unsubscribe_callbacks_; | 99 unsubscribe_callbacks_; |
100 | 100 |
101 DISALLOW_COPY_AND_ASSIGN(PushProvider); | 101 DISALLOW_COPY_AND_ASSIGN(PushProvider); |
102 }; | 102 }; |
103 | 103 |
104 } // namespace content | 104 } // namespace content |
105 | 105 |
106 #endif // CONTENT_CHILD_PUSH_MESSAGING_PUSH_PROVIDER_H_ | 106 #endif // CONTENT_CHILD_PUSH_MESSAGING_PUSH_PROVIDER_H_ |
OLD | NEW |