#include "third_party/blink/renderer/platform/scheduler/public/frame_or_worker_scheduler.h"
#include <memory>
#include <utility>
#include "base/feature_list.h"
#include "base/functional/callback.h"
#include "base/not_fatal_until.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/renderer/platform/bindings/source_location.h"
#include "v8/include/v8-isolate.h"
namespace blink {
namespace {
bool IsRegisterJSSourceLocationBlockingBFCache() { … }
}
FrameOrWorkerScheduler::LifecycleObserverHandle::LifecycleObserverHandle(
FrameOrWorkerScheduler* scheduler)
: … { … }
FrameOrWorkerScheduler::LifecycleObserverHandle::~LifecycleObserverHandle() { … }
FrameOrWorkerScheduler::SchedulingAffectingFeatureHandle::
SchedulingAffectingFeatureHandle(
SchedulingPolicy::Feature feature,
SchedulingPolicy policy,
std::unique_ptr<SourceLocation> source_location,
base::WeakPtr<FrameOrWorkerScheduler> scheduler)
: … { … }
FrameOrWorkerScheduler::SchedulingAffectingFeatureHandle::
SchedulingAffectingFeatureHandle(SchedulingAffectingFeatureHandle&& other)
: … { … }
FrameOrWorkerScheduler::SchedulingAffectingFeatureHandle&
FrameOrWorkerScheduler::SchedulingAffectingFeatureHandle::operator=(
SchedulingAffectingFeatureHandle&& other) { … }
SchedulingPolicy
FrameOrWorkerScheduler::SchedulingAffectingFeatureHandle::GetPolicy() const { … }
SchedulingPolicy::Feature
FrameOrWorkerScheduler::SchedulingAffectingFeatureHandle::GetFeature() const { … }
const FeatureAndJSLocationBlockingBFCache& FrameOrWorkerScheduler::
SchedulingAffectingFeatureHandle::GetFeatureAndJSLocationBlockingBFCache()
const { … }
FrameOrWorkerScheduler::FrameOrWorkerScheduler() { … }
FrameOrWorkerScheduler::~FrameOrWorkerScheduler() { … }
FrameOrWorkerScheduler::SchedulingAffectingFeatureHandle
FrameOrWorkerScheduler::RegisterFeature(SchedulingPolicy::Feature feature,
SchedulingPolicy policy) { … }
void FrameOrWorkerScheduler::RegisterStickyFeature(
SchedulingPolicy::Feature feature,
SchedulingPolicy policy) { … }
std::unique_ptr<FrameOrWorkerScheduler::LifecycleObserverHandle>
FrameOrWorkerScheduler::AddLifecycleObserver(
ObserverType type,
OnLifecycleStateChangedCallback callback) { … }
void FrameOrWorkerScheduler::RemoveLifecycleObserver(
LifecycleObserverHandle* handle) { … }
void FrameOrWorkerScheduler::NotifyLifecycleObservers() { … }
base::WeakPtr<FrameOrWorkerScheduler> FrameOrWorkerScheduler::GetWeakPtr() { … }
FrameOrWorkerScheduler::ObserverState::ObserverState(
FrameOrWorkerScheduler::ObserverType observer_type,
FrameOrWorkerScheduler::OnLifecycleStateChangedCallback callback)
: … { … }
FrameOrWorkerScheduler::ObserverState::~ObserverState() = default;
}