#include "content/browser/scheduler/responsiveness/watcher.h"
#include <variant>
#include "base/cpu_reduction_experiment.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/functional/overloaded.h"
#include "base/pending_task.h"
#include "base/power_monitor/power_monitor.h"
#include "build/build_config.h"
#include "content/browser/scheduler/responsiveness/calculator.h"
#include "content/browser/scheduler/responsiveness/message_loop_observer.h"
#include "content/browser/scheduler/responsiveness/native_event_observer.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/common/content_client.h"
namespace content {
namespace responsiveness {
Watcher::Metadata::Metadata(const void* identifier,
bool was_blocked_or_low_priority,
base::TimeTicks execution_start_time)
: … { … }
std::unique_ptr<Calculator> Watcher::CreateCalculator() { … }
std::unique_ptr<MetricSource> Watcher::CreateMetricSource() { … }
void Watcher::WillRunTaskOnUIThread(const base::PendingTask* task,
bool was_blocked_or_low_priority) { … }
void Watcher::DidRunTaskOnUIThread(const base::PendingTask* task) { … }
void Watcher::WillRunTaskOnIOThread(const base::PendingTask* task,
bool was_blocked_or_low_priority) { … }
void Watcher::DidRunTaskOnIOThread(const base::PendingTask* task) { … }
void Watcher::WillRunTask(const base::PendingTask* task,
bool was_blocked_or_low_priority,
std::vector<Metadata>* currently_running_metadata) { … }
void Watcher::DidRunTask(const base::PendingTask* task,
std::vector<Metadata>* currently_running_metadata,
int* mismatched_task_identifiers,
TaskOrEventFinishedCallback callback) { … }
void Watcher::WillRunEventOnUIThread(const void* opaque_identifier) { … }
void Watcher::DidRunEventOnUIThread(const void* opaque_identifier) { … }
Watcher::Watcher() = default;
Watcher::~Watcher() = default;
void Watcher::SetUp() { … }
void Watcher::Destroy() { … }
void Watcher::OnFirstIdle() { … }
void Watcher::SetUpOnIOThread() { … }
void Watcher::TearDownOnUIThread() { … }
void Watcher::FinishDestroyMetricSource() { … }
void Watcher::TearDownOnIOThread() { … }
}
}