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

Side by Side Diff: Source/modules/push_messaging/PushPermissionStatusCallbacks.h

Issue 1304723002: [PushMessaging] Use appopriate type parameters for WebCallbacks (1/3). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/modules/push_messaging/PushPermissionStatusCallbacks.cpp » ('j') | 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 PushPermissionStatusCallbacks_h 5 #ifndef PushPermissionStatusCallbacks_h
6 #define PushPermissionStatusCallbacks_h 6 #define PushPermissionStatusCallbacks_h
7 7
8 #include "platform/heap/Handle.h" 8 #include "platform/heap/Handle.h"
9 #include "public/platform/modules/push_messaging/WebPushPermissionStatus.h" 9 #include "public/platform/modules/push_messaging/WebPushPermissionStatus.h"
10 #include "public/platform/modules/push_messaging/WebPushProvider.h" 10 #include "public/platform/modules/push_messaging/WebPushProvider.h"
11 #include "wtf/Noncopyable.h" 11 #include "wtf/Noncopyable.h"
12 12
13 namespace WTF { 13 namespace WTF {
14 class String; 14 class String;
15 } 15 }
16 16
17 namespace blink { 17 namespace blink {
18 18
19 class ScriptPromiseResolver; 19 class ScriptPromiseResolver;
20 20
21 // Will resolve the underlying promise depending on the permission received. 21 // Will resolve the underlying promise depending on the permission received.
22 class PushPermissionStatusCallbacks final : public WebPushPermissionStatusCallba cks { 22 class PushPermissionStatusCallbacks final : public WebPushPermissionStatusCallba cks {
23 WTF_MAKE_NONCOPYABLE(PushPermissionStatusCallbacks); 23 WTF_MAKE_NONCOPYABLE(PushPermissionStatusCallbacks);
24 24
25 public: 25 public:
26 explicit PushPermissionStatusCallbacks(ScriptPromiseResolver*); 26 explicit PushPermissionStatusCallbacks(ScriptPromiseResolver*);
27 ~PushPermissionStatusCallbacks() override; 27 ~PushPermissionStatusCallbacks() override;
28 28
29 void onSuccess(WebPushPermissionStatus*) override; 29 void onSuccess(WebPushPermissionStatus) override;
30 30
31 // Called if for some reason the status of the push permission cannot be che cked. 31 // Called if for some reason the status of the push permission cannot be che cked.
32 void onError(WebPushError*) override; 32 void onError(const WebPushError&) override;
33 33
34 private: 34 private:
35 static WTF::String permissionString(WebPushPermissionStatus); 35 static WTF::String permissionString(WebPushPermissionStatus);
36 Persistent<ScriptPromiseResolver> m_resolver; 36 Persistent<ScriptPromiseResolver> m_resolver;
37 }; 37 };
38 38
39 } // namespace blink 39 } // namespace blink
40 40
41 #endif // PushPermissionStatusCallbacks_h 41 #endif // PushPermissionStatusCallbacks_h
OLDNEW
« no previous file with comments | « no previous file | Source/modules/push_messaging/PushPermissionStatusCallbacks.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698