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

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

Issue 702003004: Rename PushPermissionCallback to PushPermissionStatusCallback [1/3] (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef PushPermissionCallback_h
6 #define PushPermissionCallback_h
7
8 #include "public/platform/WebPushClient.h"
9 #include "public/platform/WebPushPermissionStatus.h"
10 #include "wtf/Noncopyable.h"
11 #include "wtf/PassRefPtr.h"
12 #include "wtf/RefPtr.h"
13
14 namespace WTF {
15 class String;
16 }
17
18 namespace blink {
19
20 class ScriptPromiseResolver;
21
22 // Will resolve the underlying promise depending on the permission passed to the callback.
23 class PushPermissionCallback final : public WebPushPermissionCallback {
24 WTF_MAKE_NONCOPYABLE(PushPermissionCallback);
25
26 public:
27 explicit PushPermissionCallback(PassRefPtr<ScriptPromiseResolver>);
28 virtual ~PushPermissionCallback();
29
30 void onSuccess(WebPushPermissionStatus*) override;
31
32 // Called if for some reason the status of the push permission cannot be che cked.
33 void onError() override;
34
35 private:
36 static const WTF::String& permissionString(WebPushPermissionStatus);
37 RefPtr<ScriptPromiseResolver> m_resolver;
38 };
39
40 } // namespace blink
41
42 #endif // PushPermissionCallback_h
OLDNEW
« no previous file with comments | « Source/modules/push_messaging/PushManager.cpp ('k') | Source/modules/push_messaging/PushPermissionCallback.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698