| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_BROWSER_NOTIFICATIONS_BLINK_NOTIFICATION_SERVICE_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_NOTIFICATIONS_BLINK_NOTIFICATION_SERVICE_IMPL_H_ |
| 6 #define CONTENT_BROWSER_NOTIFICATIONS_BLINK_NOTIFICATION_SERVICE_IMPL_H_ | 6 #define CONTENT_BROWSER_NOTIFICATIONS_BLINK_NOTIFICATION_SERVICE_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "mojo/public/cpp/bindings/binding.h" | 9 #include "mojo/public/cpp/bindings/binding.h" |
| 10 #include "mojo/public/cpp/bindings/interface_request.h" | 10 #include "mojo/public/cpp/bindings/interface_request.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 public: | 22 public: |
| 23 BlinkNotificationServiceImpl( | 23 BlinkNotificationServiceImpl( |
| 24 PlatformNotificationContextImpl* notification_context, | 24 PlatformNotificationContextImpl* notification_context, |
| 25 ResourceContext* resource_context, | 25 ResourceContext* resource_context, |
| 26 int render_process_id, | 26 int render_process_id, |
| 27 mojo::InterfaceRequest<blink::mojom::NotificationService> request); | 27 mojo::InterfaceRequest<blink::mojom::NotificationService> request); |
| 28 ~BlinkNotificationServiceImpl() override; | 28 ~BlinkNotificationServiceImpl() override; |
| 29 | 29 |
| 30 // blink::mojom::NotificationService implementation. | 30 // blink::mojom::NotificationService implementation. |
| 31 void GetPermissionStatus( | 31 void GetPermissionStatus( |
| 32 const mojo::String& origin, | 32 const std::string& origin, |
| 33 const GetPermissionStatusCallback& callback) override; | 33 const GetPermissionStatusCallback& callback) override; |
| 34 | 34 |
| 35 private: | 35 private: |
| 36 // Called when an error is detected on binding_. | 36 // Called when an error is detected on binding_. |
| 37 void OnConnectionError(); | 37 void OnConnectionError(); |
| 38 | 38 |
| 39 // The notification context that owns this service instance. | 39 // The notification context that owns this service instance. |
| 40 PlatformNotificationContextImpl* notification_context_; | 40 PlatformNotificationContextImpl* notification_context_; |
| 41 | 41 |
| 42 ResourceContext* resource_context_; | 42 ResourceContext* resource_context_; |
| 43 | 43 |
| 44 int render_process_id_; | 44 int render_process_id_; |
| 45 | 45 |
| 46 mojo::Binding<blink::mojom::NotificationService> binding_; | 46 mojo::Binding<blink::mojom::NotificationService> binding_; |
| 47 | 47 |
| 48 DISALLOW_COPY_AND_ASSIGN(BlinkNotificationServiceImpl); | 48 DISALLOW_COPY_AND_ASSIGN(BlinkNotificationServiceImpl); |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 } // namespace content | 51 } // namespace content |
| 52 | 52 |
| 53 #endif // CONTENT_BROWSER_NOTIFICATIONS_BLINK_NOTIFICATION_SERVICE_IMPL_H_ | 53 #endif // CONTENT_BROWSER_NOTIFICATIONS_BLINK_NOTIFICATION_SERVICE_IMPL_H_ |
| OLD | NEW |