| 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_RENDERER_PUSH_MESSAGING_PUSH_MESSAGING_CLIENT_H_ | 5 #ifndef CONTENT_RENDERER_PUSH_MESSAGING_PUSH_MESSAGING_CLIENT_H_ |
| 6 #define CONTENT_RENDERER_PUSH_MESSAGING_PUSH_MESSAGING_CLIENT_H_ | 6 #define CONTENT_RENDERER_PUSH_MESSAGING_PUSH_MESSAGING_CLIENT_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 ~PushMessagingClient() override; | 37 ~PushMessagingClient() override; |
| 38 | 38 |
| 39 private: | 39 private: |
| 40 // RenderFrameObserver implementation. | 40 // RenderFrameObserver implementation. |
| 41 void OnDestruct() override; | 41 void OnDestruct() override; |
| 42 | 42 |
| 43 // WebPushClient implementation. | 43 // WebPushClient implementation. |
| 44 void Subscribe( | 44 void Subscribe( |
| 45 blink::WebServiceWorkerRegistration* service_worker_registration, | 45 blink::WebServiceWorkerRegistration* service_worker_registration, |
| 46 const blink::WebPushSubscriptionOptions& options, | 46 const blink::WebPushSubscriptionOptions& options, |
| 47 bool user_gesture, |
| 47 std::unique_ptr<blink::WebPushSubscriptionCallbacks> callbacks) override; | 48 std::unique_ptr<blink::WebPushSubscriptionCallbacks> callbacks) override; |
| 48 | 49 |
| 49 void DidGetManifest( | 50 void DidGetManifest( |
| 50 blink::WebServiceWorkerRegistration* service_worker_registration, | 51 blink::WebServiceWorkerRegistration* service_worker_registration, |
| 51 const blink::WebPushSubscriptionOptions& options, | 52 const blink::WebPushSubscriptionOptions& options, |
| 53 bool user_gesture, |
| 52 std::unique_ptr<blink::WebPushSubscriptionCallbacks> callbacks, | 54 std::unique_ptr<blink::WebPushSubscriptionCallbacks> callbacks, |
| 53 const GURL& manifest_url, | 55 const GURL& manifest_url, |
| 54 const Manifest& manifest, | 56 const Manifest& manifest, |
| 55 const ManifestDebugInfo&); | 57 const ManifestDebugInfo&); |
| 56 | 58 |
| 57 void DoSubscribe( | 59 void DoSubscribe( |
| 58 blink::WebServiceWorkerRegistration* service_worker_registration, | 60 blink::WebServiceWorkerRegistration* service_worker_registration, |
| 59 const PushSubscriptionOptions& options, | 61 const PushSubscriptionOptions& options, |
| 62 bool user_gesture, |
| 60 std::unique_ptr<blink::WebPushSubscriptionCallbacks> callbacks); | 63 std::unique_ptr<blink::WebPushSubscriptionCallbacks> callbacks); |
| 61 | 64 |
| 62 void DidSubscribe( | 65 void DidSubscribe( |
| 63 std::unique_ptr<blink::WebPushSubscriptionCallbacks> callbacks, | 66 std::unique_ptr<blink::WebPushSubscriptionCallbacks> callbacks, |
| 64 content::PushRegistrationStatus status, | 67 content::PushRegistrationStatus status, |
| 65 const base::Optional<GURL>& endpoint, | 68 const base::Optional<GURL>& endpoint, |
| 66 const base::Optional<content::PushSubscriptionOptions>& options, | 69 const base::Optional<content::PushSubscriptionOptions>& options, |
| 67 const base::Optional<std::vector<uint8_t>>& p256dh, | 70 const base::Optional<std::vector<uint8_t>>& p256dh, |
| 68 const base::Optional<std::vector<uint8_t>>& auth); | 71 const base::Optional<std::vector<uint8_t>>& auth); |
| 69 | 72 |
| 70 mojom::PushMessagingPtr push_messaging_manager_; | 73 mojom::PushMessagingPtr push_messaging_manager_; |
| 71 | 74 |
| 72 DISALLOW_COPY_AND_ASSIGN(PushMessagingClient); | 75 DISALLOW_COPY_AND_ASSIGN(PushMessagingClient); |
| 73 }; | 76 }; |
| 74 | 77 |
| 75 } // namespace content | 78 } // namespace content |
| 76 | 79 |
| 77 #endif // CONTENT_RENDERER_PUSH_MESSAGING_PUSH_MESSAGING_CLIENT_H_ | 80 #endif // CONTENT_RENDERER_PUSH_MESSAGING_PUSH_MESSAGING_CLIENT_H_ |
| OLD | NEW |