Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 WebPushPermissionCallback_h | |
| 6 #define WebPushPermissionCallback_h | |
| 7 | |
| 8 // Interface to be used by the embedder in order | |
| 9 // to inform Blink when once the permission status for push has been checked. | |
| 10 namespace blink { | |
| 11 | |
| 12 class WebPushPermissionCallback { | |
| 13 public: | |
| 14 | |
| 15 enum PushPermissionStatus { | |
| 16 PushPermissionGranted = 0, | |
|
mlamouri (slow - plz ping)
2014/10/17 09:22:01
nit: do you need to set to 0? I'm not sure if ther
Miguel Garcia
2014/10/20 09:58:10
I've seen this in many other enums (like notificat
| |
| 17 PushPermissionDenied, | |
| 18 PushPermissionDefault, | |
| 19 | |
| 20 // Used for IPC message range checks. | |
| 21 PushPermissionTypeLast = PushPermissionDefault | |
|
mlamouri (slow - plz ping)
2014/10/17 09:22:02
I think it would be fine to simply use PushPermiss
Miguel Garcia
2014/10/20 09:58:10
I'll ask the security reviewer once I send it out.
| |
| 22 }; | |
| 23 | |
| 24 virtual ~WebPushPermissionCallback() | |
| 25 { | |
| 26 } | |
|
mlamouri (slow - plz ping)
2014/10/17 09:22:01
nit: I think the coding style would require someth
Miguel Garcia
2014/10/20 09:58:10
Done.
| |
| 27 | |
| 28 virtual void onSuccess(PushPermissionStatus) = 0; | |
| 29 virtual void onError() = 0; | |
| 30 }; | |
| 31 | |
| 32 } // namespace blink | |
| 33 #endif // WebPushPermissionCallback_h | |
| OLD | NEW |