| 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_DISPATCHER_H_ | 5 #ifndef CONTENT_RENDERER_PUSH_MESSAGING_PUSH_MESSAGING_DISPATCHER_H_ |
| 6 #define CONTENT_RENDERER_PUSH_MESSAGING_PUSH_MESSAGING_DISPATCHER_H_ | 6 #define CONTENT_RENDERER_PUSH_MESSAGING_PUSH_MESSAGING_DISPATCHER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 struct ManifestDebugInfo; | 32 struct ManifestDebugInfo; |
| 33 struct PushSubscriptionOptions; | 33 struct PushSubscriptionOptions; |
| 34 | 34 |
| 35 class PushMessagingDispatcher : public RenderFrameObserver, | 35 class PushMessagingDispatcher : public RenderFrameObserver, |
| 36 public blink::WebPushClient { | 36 public blink::WebPushClient { |
| 37 public: | 37 public: |
| 38 explicit PushMessagingDispatcher(RenderFrame* render_frame); | 38 explicit PushMessagingDispatcher(RenderFrame* render_frame); |
| 39 ~PushMessagingDispatcher() override; | 39 ~PushMessagingDispatcher() override; |
| 40 | 40 |
| 41 private: | 41 private: |
| 42 // RenderFrame::Observer implementation. | 42 // RenderFrameObserver implementation. |
| 43 bool OnMessageReceived(const IPC::Message& message) override; | 43 bool OnMessageReceived(const IPC::Message& message) override; |
| 44 void OnDestruct() override; |
| 44 | 45 |
| 45 // WebPushClient implementation. | 46 // WebPushClient implementation. |
| 46 void subscribe( | 47 void subscribe( |
| 47 blink::WebServiceWorkerRegistration* service_worker_registration, | 48 blink::WebServiceWorkerRegistration* service_worker_registration, |
| 48 const blink::WebPushSubscriptionOptions& options, | 49 const blink::WebPushSubscriptionOptions& options, |
| 49 blink::WebPushSubscriptionCallbacks* callbacks) override; | 50 blink::WebPushSubscriptionCallbacks* callbacks) override; |
| 50 | 51 |
| 51 void DidGetManifest( | 52 void DidGetManifest( |
| 52 blink::WebServiceWorkerRegistration* service_worker_registration, | 53 blink::WebServiceWorkerRegistration* service_worker_registration, |
| 53 const blink::WebPushSubscriptionOptions& options, | 54 const blink::WebPushSubscriptionOptions& options, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 70 | 71 |
| 71 IDMap<blink::WebPushSubscriptionCallbacks, IDMapOwnPointer> | 72 IDMap<blink::WebPushSubscriptionCallbacks, IDMapOwnPointer> |
| 72 subscription_callbacks_; | 73 subscription_callbacks_; |
| 73 | 74 |
| 74 DISALLOW_COPY_AND_ASSIGN(PushMessagingDispatcher); | 75 DISALLOW_COPY_AND_ASSIGN(PushMessagingDispatcher); |
| 75 }; | 76 }; |
| 76 | 77 |
| 77 } // namespace content | 78 } // namespace content |
| 78 | 79 |
| 79 #endif // CONTENT_RENDERER_PUSH_MESSAGING_PUSH_MESSAGING_DISPATCHER_H_ | 80 #endif // CONTENT_RENDERER_PUSH_MESSAGING_PUSH_MESSAGING_DISPATCHER_H_ |
| OLD | NEW |