#include "base/message_loop/message_pump.h"
#include "base/check.h"
#include "base/message_loop/message_pump_default.h"
#include "base/message_loop/message_pump_for_io.h"
#include "base/message_loop/message_pump_for_ui.h"
#include "base/notreached.h"
#include "base/task/task_features.h"
#include "base/threading/platform_thread.h"
#include "build/build_config.h"
#if BUILDFLAG(IS_APPLE)
#include "base/message_loop/message_pump_apple.h"
#endif
namespace base {
namespace {
constexpr uint64_t kAlignWakeUpsMask = …;
constexpr uint64_t kLeewayOffset = …;
constexpr uint64_t PackAlignWakeUpsAndLeeway(bool align_wake_ups,
TimeDelta leeway) { … }
std::atomic<uint64_t> g_align_wake_ups_and_leeway = …;
#if BUILDFLAG(IS_WIN)
bool g_explicit_high_resolution_timer_win = true;
#endif
MessagePump::MessagePumpFactory* message_pump_for_ui_factory_ = …;
}
MessagePump::MessagePump() = default;
MessagePump::~MessagePump() = default;
bool MessagePump::HandleNestedNativeLoopWithApplicationTasks(
bool application_tasks_desired) { … }
void MessagePump::OverrideMessagePumpForUIFactory(MessagePumpFactory* factory) { … }
bool MessagePump::IsMessagePumpForUIFactoryOveridden() { … }
std::unique_ptr<MessagePump> MessagePump::Create(MessagePumpType type) { … }
void MessagePump::InitializeFeatures() { … }
void MessagePump::OverrideAlignWakeUpsState(bool enabled, TimeDelta leeway) { … }
void MessagePump::ResetAlignWakeUpsState() { … }
bool MessagePump::GetAlignWakeUpsEnabled() { … }
TimeDelta MessagePump::GetLeewayIgnoringThreadOverride() { … }
TimeDelta MessagePump::GetLeewayForCurrentThread() { … }
TimeTicks MessagePump::AdjustDelayedRunTime(TimeTicks earliest_time,
TimeTicks run_time,
TimeTicks latest_time) { … }
}