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

Side by Side Diff: content/child/push_messaging/push_provider.h

Issue 1133083002: Reject the permissionState promise with NotSupported Exception (2/3) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 #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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 void OnUnregisterSuccess(int request_id, bool did_unregister); 86 void OnUnregisterSuccess(int request_id, bool did_unregister);
87 void OnUnregisterError(int request_id, 87 void OnUnregisterError(int request_id,
88 blink::WebPushError::ErrorType error_type, 88 blink::WebPushError::ErrorType error_type,
89 const std::string& error_message); 89 const std::string& error_message);
90 void OnGetRegistrationSuccess(int request_id, 90 void OnGetRegistrationSuccess(int request_id,
91 const GURL& endpoint, 91 const GURL& endpoint,
92 const std::string& registration_id); 92 const std::string& registration_id);
93 void OnGetRegistrationError(int request_id, PushGetRegistrationStatus status); 93 void OnGetRegistrationError(int request_id, PushGetRegistrationStatus status);
94 void OnGetPermissionStatusSuccess(int request_id, 94 void OnGetPermissionStatusSuccess(int request_id,
95 blink::WebPushPermissionStatus status); 95 blink::WebPushPermissionStatus status);
96 void OnGetPermissionStatusError(int request_id); 96 void OnGetPermissionStatusError(int request_id,
97 blink::WebPushError::ErrorType error);
97 98
98 scoped_refptr<ThreadSafeSender> thread_safe_sender_; 99 scoped_refptr<ThreadSafeSender> thread_safe_sender_;
99 scoped_refptr<PushDispatcher> push_dispatcher_; 100 scoped_refptr<PushDispatcher> push_dispatcher_;
100 101
101 // Stores the subscription callbacks with their request ids. This class owns 102 // Stores the subscription callbacks with their request ids. This class owns
102 // the callbacks. 103 // the callbacks.
103 IDMap<blink::WebPushSubscriptionCallbacks, IDMapOwnPointer> 104 IDMap<blink::WebPushSubscriptionCallbacks, IDMapOwnPointer>
104 subscription_callbacks_; 105 subscription_callbacks_;
105 106
106 // Stores the permission status callbacks with their request ids. This class 107 // Stores the permission status callbacks with their request ids. This class
107 // owns the callbacks. 108 // owns the callbacks.
108 IDMap<blink::WebPushPermissionStatusCallbacks, IDMapOwnPointer> 109 IDMap<blink::WebPushPermissionStatusCallbacks, IDMapOwnPointer>
109 permission_status_callbacks_; 110 permission_status_callbacks_;
110 111
111 // Stores the unsubscription callbacks with their request ids. This class owns 112 // Stores the unsubscription callbacks with their request ids. This class owns
112 // the callbacks. 113 // the callbacks.
113 IDMap<blink::WebPushUnsubscribeCallbacks, IDMapOwnPointer> 114 IDMap<blink::WebPushUnsubscribeCallbacks, IDMapOwnPointer>
114 unsubscribe_callbacks_; 115 unsubscribe_callbacks_;
115 116
116 DISALLOW_COPY_AND_ASSIGN(PushProvider); 117 DISALLOW_COPY_AND_ASSIGN(PushProvider);
117 }; 118 };
118 119
119 } // namespace content 120 } // namespace content
120 121
121 #endif // CONTENT_CHILD_PUSH_MESSAGING_PUSH_PROVIDER_H_ 122 #endif // CONTENT_CHILD_PUSH_MESSAGING_PUSH_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698