chromium/third_party/blink/renderer/core/workers/worker_backing_thread_startup_data.h

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

#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_WORKERS_WORKER_BACKING_THREAD_STARTUP_DATA_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_WORKERS_WORKER_BACKING_THREAD_STARTUP_DATA_H_

#include <optional>

#include "third_party/blink/renderer/platform/wtf/cross_thread_copier.h"

namespace blink {

// WorkerBackingThreadStartupData contains parameters for starting
// WorkerBackingThread.
struct WorkerBackingThreadStartupData {};

}  // namespace blink

namespace WTF {

// This allows to pass std::optional<WorkerBackingThreadStartupData> across
// threads by PostTask().
template <>
struct CrossThreadCopier<std::optional<blink::WorkerBackingThreadStartupData>>
    : public CrossThreadCopierPassThrough<
          std::optional<blink::WorkerBackingThreadStartupData>> {};

// This allows to pass WorkerBackingThreadStartupData across threads by
// PostTask().
template <>
struct CrossThreadCopier<blink::WorkerBackingThreadStartupData>
    : public CrossThreadCopierPassThrough<
          blink::WorkerBackingThreadStartupData> {};

}  // namespace WTF

#endif  // THIRD_PARTY_BLINK_RENDERER_CORE_WORKERS_WORKER_BACKING_THREAD_STARTUP_DATA_H_