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

Unified Diff: content/renderer/notifications/notification_service_worker_client_impl.h

Issue 1904163002: Move Web Notifications to use Mojo Base URL: https://chromium.googlesource.com/chromium/src.git@skbitmap-blink
Patch Set: it works \o/ 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/renderer/notifications/notification_service_worker_client_impl.h
diff --git a/content/renderer/notifications/notification_service_worker_client_impl.h b/content/renderer/notifications/notification_service_worker_client_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..39b710170a00392ff68e96e6c7816ab16d06ddc0
--- /dev/null
+++ b/content/renderer/notifications/notification_service_worker_client_impl.h
@@ -0,0 +1,45 @@
+// 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_RENDERER_NOTIFICATIONS_NOTIFICATION_SERVICE_WORKER_CLIENT_IMPL_H_
+#define CONTENT_RENDERER_NOTIFICATIONS_NOTIFICATION_SERVICE_WORKER_CLIENT_IMPL_H_
+
+#include "base/compiler_specific.h"
+#include "base/macros.h"
+#include "content/common/notification_service_worker_client.mojom-blink.h"
+#include "mojo/public/cpp/bindings/interface_request.h"
+#include "mojo/public/cpp/bindings/strong_binding.h"
+
+namespace content {
+
+// Notification client implementing the Mojo service responsible for invoking
+// notification-specific events on a Service Worker.
+class NotificationServiceWorkerClientImpl
+ : public NON_EXPORTED_BASE(mojom::blink::NotificationServiceWorkerClient) {
+ public:
+ static void Create(mojo::InterfaceRequest<
+ mojom::blink::NotificationServiceWorkerClient> request);
+
+ ~NotificationServiceWorkerClientImpl() override;
+
+ private:
+ explicit NotificationServiceWorkerClientImpl(
+ mojo::InterfaceRequest<mojom::blink::NotificationServiceWorkerClient>
+ request);
+
+ // mojom::blink::NotificationServiceWorkerClient implementation.
+ void Click(blink::mojom::blink::NotificationPtr notification,
+ int32_t action_index,
+ const ClickCallback& callback) override;
+ void Close(blink::mojom::blink::NotificationPtr notification,
+ const CloseCallback& callback) override;
+
+ mojo::StrongBinding<mojom::blink::NotificationServiceWorkerClient> binding_;
+
+ DISALLOW_COPY_AND_ASSIGN(NotificationServiceWorkerClientImpl);
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_NOTIFICATIONS_NOTIFICATION_SERVICE_WORKER_CLIENT_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698