Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(283)

Unified Diff: content/browser/notifications/blink_notification_service_impl.h

Issue 1904163002: Move Web Notifications to use Mojo Base URL: https://chromium.googlesource.com/chromium/src.git@skbitmap-blink
Patch Set: resolves the promise Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/notifications/blink_notification_service_impl.h
diff --git a/content/browser/notifications/blink_notification_service_impl.h b/content/browser/notifications/blink_notification_service_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..bbd8e1a2483fa56af9200a311bbcecd823d82c1f
--- /dev/null
+++ b/content/browser/notifications/blink_notification_service_impl.h
@@ -0,0 +1,42 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_BROWSER_NOTIFICATIONS_BLINK_NOTIFICATION_SERVICE_IMPL_H_
+#define CONTENT_BROWSER_NOTIFICATIONS_BLINK_NOTIFICATION_SERVICE_IMPL_H_
+
+#include "mojo/public/cpp/bindings/binding.h"
+#include "third_party/WebKit/public/platform/modules/notifications/notification_service.mojom.h"
+
+namespace content {
+
+class BrowserContext;
+class PlatformNotificationContextImpl;
+
+class BlinkNotificationServiceImpl : public blink::mojom::NotificationService {
+ public:
+ BlinkNotificationServiceImpl(
+ PlatformNotificationContextImpl* notification_context,
+ mojo::InterfaceRequest<blink::mojom::NotificationService> request);
+ ~BlinkNotificationServiceImpl() override;
+
+ // blink::mojom::NotificationService implementation.
+ void GetPermissionStatus(
+ const mojo::String& origin,
+ const GetPermissionStatusCallback& callback) override;
+ void ShowPersistent(
+ const mojo::String& origin,
+ blink::mojom::NotificationPtr notification,
+ blink::mojom::NotificationResourcesPtr notification_resources,
+ const ShowPersistentCallback& callback) override;
+
+ private:
+ // The platform notification context owns this instance.
+ PlatformNotificationContextImpl* notification_context_;
+
+ mojo::Binding<blink::mojom::NotificationService> binding_;
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_NOTIFICATIONS_BLINK_NOTIFICATION_SERVICE_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698