Index: public/platform/WebPushPermissionCallback.h |
diff --git a/public/platform/WebPushPermissionCallback.h b/public/platform/WebPushPermissionCallback.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..11ddf8a0ce17f5bbd6c898e83e7f3eb027e388c3 |
--- /dev/null |
+++ b/public/platform/WebPushPermissionCallback.h |
@@ -0,0 +1,33 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef WebPushPermissionCallback_h |
+#define WebPushPermissionCallback_h |
+ |
+// Interface to be used by the embedder in order |
+// to inform Blink when once the permission status for push has been checked. |
+namespace blink { |
+ |
+class WebPushPermissionCallback { |
+ public: |
+ |
+ enum PushPermissionStatus { |
+ 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
|
+ PushPermissionDenied, |
+ PushPermissionDefault, |
+ |
+ // Used for IPC message range checks. |
+ 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.
|
+ }; |
+ |
+ virtual ~WebPushPermissionCallback() |
+ { |
+ } |
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.
|
+ |
+ virtual void onSuccess(PushPermissionStatus) = 0; |
+ virtual void onError() = 0; |
+}; |
+ |
+} // namespace blink |
+#endif // WebPushPermissionCallback_h |