| 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_
|
|
|