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

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

Issue 800503002: PushRegistration.unregister(), cleanups and more tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@push_unregister
Patch Set: rebase 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 | « LayoutTests/http/tests/push_messaging/unregister.html ('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"
(...skipping 19 matching lines...) Expand all
30 // Takes ownership of the WebPushRegistrationCallbacks. 30 // Takes ownership of the WebPushRegistrationCallbacks.
31 // Does not take ownership of the WebServiceWorkerRegistration. 31 // Does not take ownership of the WebServiceWorkerRegistration.
32 virtual void getRegistration(WebServiceWorkerRegistration*, WebPushRegistrat ionCallbacks*) { BLINK_ASSERT_NOT_REACHED(); } 32 virtual void getRegistration(WebServiceWorkerRegistration*, WebPushRegistrat ionCallbacks*) { BLINK_ASSERT_NOT_REACHED(); }
33 33
34 // Takes ownership of the WebPushPermissionStatusCallbacks. 34 // Takes ownership of the WebPushPermissionStatusCallbacks.
35 // Does not take ownership of the WebServiceWorkerRegistration. 35 // Does not take ownership of the WebServiceWorkerRegistration.
36 virtual void getPermissionStatus(WebServiceWorkerRegistration*, WebPushPermi ssionStatusCallbacks*) { BLINK_ASSERT_NOT_REACHED(); } 36 virtual void getPermissionStatus(WebServiceWorkerRegistration*, WebPushPermi ssionStatusCallbacks*) { BLINK_ASSERT_NOT_REACHED(); }
37 37
38 // Takes ownership if the WebPushUnregisterCallbacks. 38 // Takes ownership if the WebPushUnregisterCallbacks.
39 // Does not take ownership of the WebServiceWorkerRegistration. 39 // Does not take ownership of the WebServiceWorkerRegistration.
40 virtual void unregister(WebServiceWorkerRegistration*, WebPushUnregisterCall backs* callback) 40 virtual void unregister(WebServiceWorkerRegistration*, WebPushUnregisterCall backs* callback) { BLINK_ASSERT_NOT_REACHED(); }
41 {
42 // FIXME: this should call BLINK_ASSERT_NOT_REACHED() when Chromium will
43 // have an implementation.
44 bool result = true;
45 callback->onSuccess(&result);
46 delete callback;
47 }
48 }; 41 };
49 42
50 } // namespace blink 43 } // namespace blink
51 44
52 #endif // WebPushProvider_h 45 #endif // WebPushProvider_h
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/push_messaging/unregister.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698