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

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: 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
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 23 matching lines...) Expand all
34 // Takes ownership of the WebPushRegistrationCallbacks. 34 // Takes ownership of the WebPushRegistrationCallbacks.
35 // Does not take ownership of the WebServiceWorkerRegistration. 35 // Does not take ownership of the WebServiceWorkerRegistration.
36 virtual void getRegistration(WebServiceWorkerRegistration*, WebPushRegistrat ionCallbacks*) { BLINK_ASSERT_NOT_REACHED(); } 36 virtual void getRegistration(WebServiceWorkerRegistration*, WebPushRegistrat ionCallbacks*) { BLINK_ASSERT_NOT_REACHED(); }
37 37
38 // Takes ownership of the WebPushPermissionStatusCallbacks. 38 // Takes ownership of the WebPushPermissionStatusCallbacks.
39 // Does not take ownership of the WebServiceWorkerRegistration. 39 // Does not take ownership of the WebServiceWorkerRegistration.
40 virtual void getPermissionStatus(WebServiceWorkerRegistration*, WebPushPermi ssionStatusCallbacks*) { BLINK_ASSERT_NOT_REACHED(); } 40 virtual void getPermissionStatus(WebServiceWorkerRegistration*, WebPushPermi ssionStatusCallbacks*) { BLINK_ASSERT_NOT_REACHED(); }
41 41
42 // Takes ownership if the WebPushUnregisterCallbacks. 42 // Takes ownership if the WebPushUnregisterCallbacks.
43 // Does not take ownership of the WebServiceWorkerRegistration. 43 // Does not take ownership of the WebServiceWorkerRegistration.
44 virtual void unregister(WebServiceWorkerRegistration*, WebPushUnregisterCall backs* callback) 44 virtual void unregister(WebServiceWorkerRegistration*, WebPushUnregisterCall backs* callback) { BLINK_ASSERT_NOT_REACHED(); }
45 {
46 // FIXME: this should call BLINK_ASSERT_NOT_REACHED() when Chromium will
47 // have an implementation.
48 bool result = true;
49 callback->onSuccess(&result);
50 delete callback;
51 }
52 }; 45 };
53 46
54 } // namespace blink 47 } // namespace blink
55 48
56 #endif // WebPushProvider_h 49 #endif // WebPushProvider_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698