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

Side by Side Diff: public/platform/WebPushProvider.h

Issue 801393002: PushRegistration.unregister() can fail with a NetworkError. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@push_unregister
Patch Set: Created 6 years 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
« no previous file with comments | « public/platform/WebPushError.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 WebPushProvider_h 5 #ifndef WebPushProvider_h
6 #define WebPushProvider_h 6 #define WebPushProvider_h
7 7
8 #include "public/platform/WebCallbacks.h" 8 #include "public/platform/WebCallbacks.h"
9 #include "public/platform/WebCommon.h" 9 #include "public/platform/WebCommon.h"
10 #include "public/platform/WebPushPermissionStatus.h" 10 #include "public/platform/WebPushPermissionStatus.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 class WebServiceWorkerRegistration; 14 class WebServiceWorkerRegistration;
15 struct WebPushError; 15 struct WebPushError;
16 struct WebPushRegistration; 16 struct WebPushRegistration;
17 17
18 typedef WebCallbacks<WebPushRegistration, WebPushError> WebPushRegistrationCallb acks; 18 typedef WebCallbacks<WebPushRegistration, WebPushError> WebPushRegistrationCallb acks;
19 typedef WebCallbacks<WebPushPermissionStatus, void> WebPushPermissionStatusCallb acks; 19 typedef WebCallbacks<WebPushPermissionStatus, void> WebPushPermissionStatusCallb acks;
20 typedef WebCallbacks<bool, void> WebPushUnregisterCallbacks; 20 typedef WebCallbacks<bool, WebPushError> WebPushUnregisterCallbacks;
21 21
22 class WebPushProvider { 22 class WebPushProvider {
23 public: 23 public:
24 virtual ~WebPushProvider() { } 24 virtual ~WebPushProvider() { }
25 25
26 // Takes ownership of the WebPushRegistrationCallbacks. 26 // Takes ownership of the WebPushRegistrationCallbacks.
27 // Does not take ownership of the WebServiceWorkerRegistration. 27 // Does not take ownership of the WebServiceWorkerRegistration.
28 virtual void registerPushMessaging(WebServiceWorkerRegistration*, WebPushReg istrationCallbacks*) { BLINK_ASSERT_NOT_REACHED(); } 28 virtual void registerPushMessaging(WebServiceWorkerRegistration*, WebPushReg istrationCallbacks*) { BLINK_ASSERT_NOT_REACHED(); }
29 29
30 // Takes ownership of the WebPushRegistrationCallbacks. 30 // Takes ownership of the WebPushRegistrationCallbacks.
(...skipping 12 matching lines...) Expand all
43 // have an implementation. 43 // have an implementation.
44 bool result = true; 44 bool result = true;
45 callback->onSuccess(&result); 45 callback->onSuccess(&result);
46 delete callback; 46 delete callback;
47 } 47 }
48 }; 48 };
49 49
50 } // namespace blink 50 } // namespace blink
51 51
52 #endif // WebPushProvider_h 52 #endif // WebPushProvider_h
OLDNEW
« no previous file with comments | « public/platform/WebPushError.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698