chromium/content/public/test/service_worker_host_interceptor.h

// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CONTENT_PUBLIC_TEST_SERVICE_WORKER_HOST_INTERCEPTOR_H_
#define CONTENT_PUBLIC_TEST_SERVICE_WORKER_HOST_INTERCEPTOR_H_

#include "base/functional/callback_forward.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/scoped_refptr.h"
#include "content/public/browser/browser_thread.h"
#include "third_party/blink/public/common/service_worker/service_worker_status_code.h"
#include "third_party/blink/public/mojom/service_worker/service_worker.mojom-test-utils.h"
#include "third_party/blink/public/mojom/service_worker/service_worker.mojom.h"

class GURL;

namespace content {

class BrowserContext;
class ServiceWorkerContextWrapper;
class ServiceWorkerRegistration;
class ServiceWorkerVersion;

// Allows intercepting calls to mojom::ServiceWorkerHost (e.g.
// OpenPaymentHandlerWindow) just before they are dispatched to the
// implementation. This enables browser tests to alter the parameters.
class ServiceWorkerHostInterceptor
    : public blink::mojom::ServiceWorkerHostInterceptorForTesting {};

}  // namespace content

#endif  // CONTENT_PUBLIC_TEST_SERVICE_WORKER_HOST_INTERCEPTOR_H_