#include "third_party/blink/renderer/modules/handwriting/handwriting_drawing.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/bindings/modules/v8/v8_handwriting_drawing_segment.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_handwriting_prediction.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_handwriting_segment.h"
#include "third_party/blink/renderer/core/dom/dom_exception.h"
#include "third_party/blink/renderer/modules/handwriting/handwriting_recognizer.h"
#include "third_party/blink/renderer/modules/handwriting/handwriting_stroke.h"
#include "third_party/blink/renderer/modules/handwriting/handwriting_type_converters.h"
#include "third_party/blink/renderer/platform/heap/collection_support/heap_vector.h"
namespace blink {
namespace {
void OnRecognitionResult(
ScriptPromiseResolver<IDLSequence<HandwritingPrediction>>* resolver,
ScriptState* script_state,
std::optional<Vector<handwriting::mojom::blink::HandwritingPredictionPtr>>
predictions) { … }
}
HandwritingDrawing::HandwritingDrawing(ExecutionContext* context,
HandwritingRecognizer* recognizer,
const HandwritingHints* hints)
: … { … }
HandwritingDrawing::~HandwritingDrawing() = default;
void HandwritingDrawing::addStroke(HandwritingStroke* stroke) { … }
void HandwritingDrawing::removeStroke(const HandwritingStroke* stroke) { … }
void HandwritingDrawing::clear() { … }
const HeapVector<Member<HandwritingStroke>>& HandwritingDrawing::getStrokes() { … }
ScriptPromise<IDLSequence<HandwritingPrediction>>
HandwritingDrawing::getPrediction(ScriptState* script_state) { … }
void HandwritingDrawing::Trace(Visitor* visitor) const { … }
bool HandwritingDrawing::IsValid() const { … }
}