#include "third_party/blink/renderer/modules/ai/ai_writer_factory.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "third_party/blink/public/mojom/ai/ai_manager.mojom-blink.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_ai_writer_create_options.h"
#include "third_party/blink/renderer/core/dom/abort_signal.h"
#include "third_party/blink/renderer/modules/ai/ai.h"
#include "third_party/blink/renderer/modules/ai/ai_writer.h"
#include "third_party/blink/renderer/modules/ai/exception_helpers.h"
#include "third_party/blink/renderer/platform/heap/persistent.h"
#include "third_party/blink/renderer/platform/heap/self_keep_alive.h"
#include "third_party/blink/renderer/platform/mojo/heap_mojo_receiver.h"
#include "third_party/blink/renderer/platform/wtf/functional.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
namespace blink {
namespace {
const char kExceptionMessageUnableToCreateWriter[] = …;
class CreateWriterClient : public GarbageCollected<CreateWriterClient>,
public mojom::blink::AIManagerCreateWriterClient,
public ContextLifecycleObserver { … };
}
AIWriterFactory::AIWriterFactory(AI* ai)
: … { … }
void AIWriterFactory::Trace(Visitor* visitor) const { … }
ScriptPromise<AIWriter> AIWriterFactory::create(
ScriptState* script_state,
const AIWriterCreateOptions* options,
ExceptionState& exception_state) { … }
}