OLD | NEW |
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 CONTENT_PUBLIC_BROWSER_PUSH_MESSAGING_SERVICE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_PUSH_MESSAGING_SERVICE_H_ |
6 #define CONTENT_PUBLIC_BROWSER_PUSH_MESSAGING_SERVICE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_PUSH_MESSAGING_SERVICE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 // request should fail. | 70 // request should fail. |
71 virtual void RegisterFromWorker(const GURL& requesting_origin, | 71 virtual void RegisterFromWorker(const GURL& requesting_origin, |
72 int64 service_worker_registration_id, | 72 int64 service_worker_registration_id, |
73 const std::string& sender_id, | 73 const std::string& sender_id, |
74 const RegisterCallback& callback) = 0; | 74 const RegisterCallback& callback) = 0; |
75 | 75 |
76 // Unregister an origin and its associated service worker registration id from | 76 // Unregister an origin and its associated service worker registration id from |
77 // the push service. | 77 // the push service. |
78 virtual void Unregister(const GURL& requesting_origin, | 78 virtual void Unregister(const GURL& requesting_origin, |
79 int64 service_worker_registration_id, | 79 int64 service_worker_registration_id, |
| 80 const std::string& sender_id, |
80 const UnregisterCallback& callback) = 0; | 81 const UnregisterCallback& callback) = 0; |
81 | 82 |
82 // Checks the permission status for the requesting origin. Permission is only | 83 // Checks the permission status for the requesting origin. Permission is only |
83 // ever granted when the requesting origin matches the top level embedding | 84 // ever granted when the requesting origin matches the top level embedding |
84 // origin. | 85 // origin. |
85 virtual blink::WebPushPermissionStatus GetPermissionStatus( | 86 virtual blink::WebPushPermissionStatus GetPermissionStatus( |
86 const GURL& requesting_origin, | 87 const GURL& requesting_origin, |
87 const GURL& embedding_origin) = 0; | 88 const GURL& embedding_origin) = 0; |
88 }; | 89 }; |
89 | 90 |
90 } // namespace content | 91 } // namespace content |
91 | 92 |
92 #endif // CONTENT_PUBLIC_BROWSER_PUSH_MESSAGING_SERVICE_H_ | 93 #endif // CONTENT_PUBLIC_BROWSER_PUSH_MESSAGING_SERVICE_H_ |
OLD | NEW |