chromium/third_party/blink/renderer/modules/content_extraction/inner_text_builder.h

// Copyright 2023 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_CONTENT_EXTRACTION_INNER_TEXT_BUILDER_H_
#define THIRD_PARTY_BLINK_RENDERER_MODULES_CONTENT_EXTRACTION_INNER_TEXT_BUILDER_H_

#include <optional>

#include "base/memory/stack_allocated.h"
#include "third_party/blink/public/common/tokens/tokens.h"
#include "third_party/blink/public/mojom/content_extraction/inner_text.mojom-blink.h"
#include "third_party/blink/renderer/core/dom/text_visitor.h"
#include "third_party/blink/renderer/modules/modules_export.h"
#include "third_party/blink/renderer/platform/heap/collection_support/heap_vector.h"
#include "third_party/blink/renderer/platform/heap/member.h"

namespace blink {

class HTMLElement;
class HTMLIFrameElement;
class LocalFrame;

// Builds mojom::blink::InnerTextFrame for a frame, and all suitable
// iframes. See the mojom for details on the format.
//
// An InnerTextBuilder is created per Frame. Internally it tracks all iframes
// and will build results for them as well.
class MODULES_EXPORT InnerTextBuilder final : public TextVisitor {};

// An alternative implementation wrapping DocumentChunker passage extraction.
// This will be used only when one or more of the relevant optional parameters
// are specified on InnerTextParams.
class MODULES_EXPORT InnerTextPassagesBuilder final {};

}  // namespace blink

#endif  // THIRD_PARTY_BLINK_RENDERER_MODULES_CONTENT_EXTRACTION_INNER_TEXT_BUILDER_H_