chromium/third_party/blink/renderer/modules/clipboard/clipboard_promise.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_MODULES_CLIPBOARD_CLIPBOARD_PROMISE_H_
#define THIRD_PARTY_BLINK_RENDERER_MODULES_CLIPBOARD_CLIPBOARD_PROMISE_H_

#include <utility>

#include "base/sequence_checker.h"
#include "base/task/single_thread_task_runner.h"
#include "third_party/blink/public/mojom/permissions/permission.mojom-blink.h"
#include "third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h"
#include "third_party/blink/renderer/core/dom/dom_exception.h"
#include "third_party/blink/renderer/core/execution_context/execution_context_lifecycle_observer.h"
#include "third_party/blink/renderer/core/fileapi/blob.h"
#include "third_party/blink/renderer/modules/clipboard/clipboard_item.h"
#include "third_party/blink/renderer/modules/clipboard/clipboard_reader.h"
#include "third_party/blink/renderer/platform/mojo/heap_mojo_remote.h"
#include "third_party/blink/renderer/platform/mojo/heap_mojo_wrapper_mode.h"

namespace blink {

class ClipboardWriter;
class LocalFrame;
class ExceptionState;
class ExecutionContext;
class ClipboardUnsanitizedFormats;

// Represents a promise to execute Async Clipboard API functions off the main
// thread. It handles read and write operations on the clipboard, including
// reading and writing text and blobs for different MIME types. This class also
// interacts with the `PermissionService` to check for read and write
// permissions. It uses a `ClipboardItem` object to read/write supported MIME
// types. Spec: https://w3c.github.io/clipboard-apis/#async-clipboard-api
class ClipboardPromise final : public GarbageCollected<ClipboardPromise>,
                               public ExecutionContextLifecycleObserver {};

}  // namespace blink

#endif  // THIRD_PARTY_BLINK_RENDERER_MODULES_CLIPBOARD_CLIPBOARD_PROMISE_H_