chromium/chrome/browser/content_extraction/inner_text.cc

// 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.

#include "chrome/browser/content_extraction/inner_text.h"

#include "base/functional/bind.h"
#include "base/metrics/histogram_functions.h"
#include "content/public/browser/render_frame_host.h"
#include "mojo/public/cpp/bindings/callback_helpers.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "services/service_manager/public/cpp/interface_provider.h"
#include "third_party/blink/public/mojom/content_extraction/inner_text.mojom.h"

namespace content_extraction {

Segments;

namespace {

// Returns the number of bytes needed for the combined text.
size_t CalculateTotalStringSize(const blink::mojom::InnerTextFrame& frame) {}

// Appends the text segments to `result.inner_text` as well as setting
// the node offset.
void AppendFrameSegments(const blink::mojom::InnerTextFrame& frame,
                         InnerTextResult& result) {}

void OnGotInnerText(base::TimeTicks start_time,
                    mojo::Remote<blink::mojom::InnerTextAgent> remote_interface,
                    InnerTextCallback callback,
                    blink::mojom::InnerTextFramePtr mojo_frame) {}

}  // namespace

void GetInnerText(content::RenderFrameHost& host,
                  std::optional<int> node_id,
                  InnerTextCallback callback) {}

namespace internal {

bool IsInnerTextFrameValid(const blink::mojom::InnerTextFramePtr& frame) {}

std::unique_ptr<InnerTextResult> CreateInnerTextResult(
    const blink::mojom::InnerTextFrame& frame) {}

}  // namespace internal
}  // namespace content_extraction