chromium/third_party/blink/renderer/core/editing/finder/find_task_controller.cc

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "third_party/blink/renderer/core/editing/finder/find_task_controller.h"

#include "third_party/blink/public/mojom/frame/find_in_page.mojom-blink.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_idle_request_options.h"
#include "third_party/blink/renderer/core/display_lock/display_lock_document_state.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/dom/range.h"
#include "third_party/blink/renderer/core/editing/ephemeral_range.h"
#include "third_party/blink/renderer/core/editing/finder/find_buffer.h"
#include "third_party/blink/renderer/core/editing/finder/find_options.h"
#include "third_party/blink/renderer/core/editing/finder/text_finder.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/frame/web_local_frame_impl.h"
#include "third_party/blink/renderer/core/scheduler/scripted_idle_task_controller.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/instrumentation/histogram.h"

namespace blink {

namespace {
constexpr base::TimeDelta kFindTaskTimeAllotment =;

// Check if we need to yield after this many matches have been found. We start
// with Start matches and double them every time we yield until we are
// processing Limit matches per yield check.
constexpr int kMatchYieldCheckIntervalStart =;
constexpr int kMatchYieldCheckIntervalLimit =;

}  // namespace

class FindTaskController::FindTask final : public GarbageCollected<FindTask> {};

FindTaskController::FindTaskController(WebLocalFrameImpl& owner_frame,
                                       TextFinder& text_finder)
    :{}

int FindTaskController::GetMatchYieldCheckInterval() const {}

void FindTaskController::StartRequest(
    int identifier,
    const WebString& search_text,
    const mojom::blink::FindOptions& options) {}

void FindTaskController::CancelPendingRequest() {}

void FindTaskController::RequestFindTask(
    int identifier,
    const WebString& search_text,
    const mojom::blink::FindOptions& options) {}

void FindTaskController::DidFinishTask(
    int identifier,
    const WebString& search_text,
    const mojom::blink::FindOptions& options,
    bool finished_whole_request,
    PositionInFlatTree next_starting_position,
    int match_count,
    bool aborted,
    base::TimeTicks task_start_time) {}

LocalFrame* FindTaskController::GetLocalFrame() const {}

bool FindTaskController::ShouldFindMatches(
    int identifier,
    const String& search_text,
    const mojom::blink::FindOptions& options) {}

void FindTaskController::DidFindMatch(int identifier, Range* result_range) {}

void FindTaskController::Trace(Visitor* visitor) const {}

void FindTaskController::ResetLastFindRequestCompletedWithNoMatches() {}

}  // namespace blink