| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 void OnGetPermissionStatusSuccess(int request_id, | 93 void OnGetPermissionStatusSuccess(int request_id, |
| 94 blink::WebPushPermissionStatus status); | 94 blink::WebPushPermissionStatus status); |
| 95 void OnGetPermissionStatusError(int request_id, | 95 void OnGetPermissionStatusError(int request_id, |
| 96 blink::WebPushError::ErrorType error); | 96 blink::WebPushError::ErrorType error); |
| 97 | 97 |
| 98 scoped_refptr<ThreadSafeSender> thread_safe_sender_; | 98 scoped_refptr<ThreadSafeSender> thread_safe_sender_; |
| 99 scoped_refptr<PushDispatcher> push_dispatcher_; | 99 scoped_refptr<PushDispatcher> push_dispatcher_; |
| 100 | 100 |
| 101 // Stores the subscription callbacks with their request ids. This class owns | 101 // Stores the subscription callbacks with their request ids. This class owns |
| 102 // the callbacks. | 102 // the callbacks. |
| 103 IDMap<blink::WebPushSubscriptionCallbacks, IDMapOwnPointer> | 103 IDMap<std::unique_ptr<blink::WebPushSubscriptionCallbacks>> |
| 104 subscription_callbacks_; | 104 subscription_callbacks_; |
| 105 | 105 |
| 106 // Stores the permission status callbacks with their request ids. This class | 106 // Stores the permission status callbacks with their request ids. This class |
| 107 // owns the callbacks. | 107 // owns the callbacks. |
| 108 IDMap<blink::WebPushPermissionStatusCallbacks, IDMapOwnPointer> | 108 IDMap<std::unique_ptr<blink::WebPushPermissionStatusCallbacks>> |
| 109 permission_status_callbacks_; | 109 permission_status_callbacks_; |
| 110 | 110 |
| 111 // Stores the unsubscription callbacks with their request ids. This class owns | 111 // Stores the unsubscription callbacks with their request ids. This class owns |
| 112 // the callbacks. | 112 // the callbacks. |
| 113 IDMap<blink::WebPushUnsubscribeCallbacks, IDMapOwnPointer> | 113 IDMap<std::unique_ptr<blink::WebPushUnsubscribeCallbacks>> |
| 114 unsubscribe_callbacks_; | 114 unsubscribe_callbacks_; |
| 115 | 115 |
| 116 DISALLOW_COPY_AND_ASSIGN(PushProvider); | 116 DISALLOW_COPY_AND_ASSIGN(PushProvider); |
| 117 }; | 117 }; |
| 118 | 118 |
| 119 } // namespace content | 119 } // namespace content |
| 120 | 120 |
| 121 #endif // CONTENT_CHILD_PUSH_MESSAGING_PUSH_PROVIDER_H_ | 121 #endif // CONTENT_CHILD_PUSH_MESSAGING_PUSH_PROVIDER_H_ |
| OLD | NEW |