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

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

Issue 658723003: Blink implementation of PushManager#hasPermission() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rename enum to a more understandable name Created 6 years, 2 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
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/WebPushPermissionCallback.h"
9 #include "wtf/Noncopyable.h"
10 #include "wtf/PassRefPtr.h"
11 #include "wtf/RefPtr.h"
12
13 namespace WTF {
14 class String;
15 }
16
17 namespace blink {
18
19 class ScriptPromiseResolver;
20
21 // Will resolve the underlying promise depending on the permission
22 // passed to the callback.
23 class PushPermissionCallback final : public WebPushPermissionCallback {
24 WTF_MAKE_NONCOPYABLE(PushPermissionCallback);
25
26 public:
mlamouri (slow - plz ping) 2014/10/17 09:22:01 coding style: - there is a useless empty line befo
Miguel Garcia 2014/10/20 09:58:10 Done.
27 PushPermissionCallback(PassRefPtr<ScriptPromiseResolver>);
28 virtual ~PushPermissionCallback();
29
30 // Called if the embedder is able to check the status of the push permis sion.
mlamouri (slow - plz ping) 2014/10/17 09:22:01 nit: I would put those comments in WebPushPermissi
Miguel Garcia 2014/10/20 09:58:10 Done.
31 virtual void onSuccess(PushPermissionStatus) override;
32
33 // Called if for some reason the status of the push permission cannot be checked.
34 virtual void onError() override;
35
36 private:
37 static const WTF::String& permissionString(PushPermissionStatus);
mlamouri (slow - plz ping) 2014/10/17 09:22:01 Could you move that in an anonymous namespace in t
38 RefPtr<ScriptPromiseResolver> m_resolver;
39 };
40
41 } // namespace blink
42
43 #endif // PushPermissionCallback_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698