| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 void OnUnregisterSuccess(int request_id, bool did_unregister); | 70 void OnUnregisterSuccess(int request_id, bool did_unregister); |
| 71 void OnUnregisterError(int request_id, | 71 void OnUnregisterError(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 | 82 |
| 82 scoped_refptr<ThreadSafeSender> thread_safe_sender_; | 83 scoped_refptr<ThreadSafeSender> thread_safe_sender_; |
| 83 scoped_refptr<PushDispatcher> push_dispatcher_; | 84 scoped_refptr<PushDispatcher> push_dispatcher_; |
| 84 | 85 |
| 85 // Stores the subscription callbacks with their request ids. This class owns | 86 // Stores the subscription callbacks with their request ids. This class owns |
| 86 // the callbacks. | 87 // the callbacks. |
| 87 IDMap<blink::WebPushSubscriptionCallbacks, IDMapOwnPointer> | 88 IDMap<blink::WebPushSubscriptionCallbacks, IDMapOwnPointer> |
| 88 subscription_callbacks_; | 89 subscription_callbacks_; |
| 89 | 90 |
| 90 // Stores the permission status callbacks with their request ids. This class | 91 // Stores the permission status callbacks with their request ids. This class |
| 91 // owns the callbacks. | 92 // owns the callbacks. |
| 92 IDMap<blink::WebPushPermissionStatusCallbacks, IDMapOwnPointer> | 93 IDMap<blink::WebPushPermissionStatusCallbacks, IDMapOwnPointer> |
| 93 permission_status_callbacks_; | 94 permission_status_callbacks_; |
| 94 | 95 |
| 95 // Stores the unsubscription callbacks with their request ids. This class owns | 96 // Stores the unsubscription callbacks with their request ids. This class owns |
| 96 // the callbacks. | 97 // the callbacks. |
| 97 IDMap<blink::WebPushUnsubscribeCallbacks, IDMapOwnPointer> | 98 IDMap<blink::WebPushUnsubscribeCallbacks, IDMapOwnPointer> |
| 98 unsubscribe_callbacks_; | 99 unsubscribe_callbacks_; |
| 99 | 100 |
| 100 DISALLOW_COPY_AND_ASSIGN(PushProvider); | 101 DISALLOW_COPY_AND_ASSIGN(PushProvider); |
| 101 }; | 102 }; |
| 102 | 103 |
| 103 } // namespace content | 104 } // namespace content |
| 104 | 105 |
| 105 #endif // CONTENT_CHILD_PUSH_MESSAGING_PUSH_PROVIDER_H_ | 106 #endif // CONTENT_CHILD_PUSH_MESSAGING_PUSH_PROVIDER_H_ |
| OLD | NEW |