| 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 20 matching lines...) Expand all Loading... |
| 31 virtual GURL PushEndpoint() = 0; | 31 virtual GURL PushEndpoint() = 0; |
| 32 | 32 |
| 33 // Register the given |sender_id| with the push messaging service in a | 33 // Register the given |sender_id| with the push messaging service in a |
| 34 // document context. The frame is known and a permission UI may be displayed | 34 // document context. The frame is known and a permission UI may be displayed |
| 35 // to the user. | 35 // to the user. |
| 36 virtual void RegisterFromDocument(const GURL& requesting_origin, | 36 virtual void RegisterFromDocument(const GURL& requesting_origin, |
| 37 int64 service_worker_registration_id, | 37 int64 service_worker_registration_id, |
| 38 const std::string& sender_id, | 38 const std::string& sender_id, |
| 39 int renderer_id, | 39 int renderer_id, |
| 40 int render_frame_id, | 40 int render_frame_id, |
| 41 bool user_gesture, | 41 bool user_visible_only, |
| 42 const RegisterCallback& callback) = 0; | 42 const RegisterCallback& callback) = 0; |
| 43 | 43 |
| 44 // Register the given |sender_id| with the push messaging service. The frame | 44 // Register the given |sender_id| with the push messaging service. The frame |
| 45 // is not known so if permission was not previously granted by the user this | 45 // is not known so if permission was not previously granted by the user this |
| 46 // request should fail. | 46 // request should fail. |
| 47 virtual void RegisterFromWorker(const GURL& requesting_origin, | 47 virtual void RegisterFromWorker(const GURL& requesting_origin, |
| 48 int64 service_worker_registration_id, | 48 int64 service_worker_registration_id, |
| 49 const std::string& sender_id, | 49 const std::string& sender_id, |
| 50 const RegisterCallback& callback) = 0; | 50 const RegisterCallback& callback) = 0; |
| 51 | 51 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 62 // ever granted when the requesting origin matches the top level embedding | 62 // ever granted when the requesting origin matches the top level embedding |
| 63 // origin. | 63 // origin. |
| 64 virtual blink::WebPushPermissionStatus GetPermissionStatus( | 64 virtual blink::WebPushPermissionStatus GetPermissionStatus( |
| 65 const GURL& requesting_origin, | 65 const GURL& requesting_origin, |
| 66 const GURL& embedding_origin) = 0; | 66 const GURL& embedding_origin) = 0; |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 } // namespace content | 69 } // namespace content |
| 70 | 70 |
| 71 #endif // CONTENT_PUBLIC_BROWSER_PUSH_MESSAGING_SERVICE_H_ | 71 #endif // CONTENT_PUBLIC_BROWSER_PUSH_MESSAGING_SERVICE_H_ |
| OLD | NEW |