chromium/third_party/blink/renderer/platform/scheduler/main_thread/find_in_page_budget_pool_controller.cc

// Copyright 2020 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/platform/scheduler/main_thread/find_in_page_budget_pool_controller.h"

#include <memory>

#include "third_party/blink/renderer/platform/scheduler/common/features.h"
#include "third_party/blink/renderer/platform/scheduler/common/task_priority.h"
#include "third_party/blink/renderer/platform/scheduler/main_thread/frame_scheduler_impl.h"
#include "third_party/blink/renderer/platform/scheduler/main_thread/main_thread_scheduler_impl.h"

namespace blink {
namespace scheduler {

namespace {
// We will accumulate at most 1000ms for find-in-page budget.
constexpr base::TimeDelta kFindInPageMaxBudget =;
// At least 25% of the total CPU time will go to find-in-page tasks.
// TODO(rakina): Experiment with this number to figure out the right percentage
// for find-in-page. Currently this is following CompositorPriorityExperiments.
const double kFindInPageBudgetRecoveryRate =;
}  // namespace

const TaskPriority
    FindInPageBudgetPoolController::kFindInPageBudgetNotExhaustedPriority;
const TaskPriority
    FindInPageBudgetPoolController::kFindInPageBudgetExhaustedPriority;

FindInPageBudgetPoolController::FindInPageBudgetPoolController(
    MainThreadSchedulerImpl* scheduler)
    :{}

FindInPageBudgetPoolController::~FindInPageBudgetPoolController() = default;

void FindInPageBudgetPoolController::OnTaskCompleted(
    MainThreadTaskQueue* queue,
    TaskQueue::TaskTiming* task_timing) {}

}  // namespace scheduler
}  // namespace blink