chromium/base/message_loop/message_pump.cc

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

#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) {}

// This stores the current state of |kAlignWakeUps| and leeway. The last bit
// represents if |kAlignWakeUps| is enabled, and the other bits represent the
// leeway value applied to delayed tasks in milliseconds. An atomic is used here
// because the value is queried from multiple threads.
std::atomic<uint64_t> g_align_wake_ups_and_leeway =;
#if BUILDFLAG(IS_WIN)
bool g_explicit_high_resolution_timer_win = true;
#endif  // BUILDFLAG(IS_WIN)

MessagePump::MessagePumpFactory* message_pump_for_ui_factory_ =;

}  // namespace

MessagePump::MessagePump() = default;

MessagePump::~MessagePump() = default;

bool MessagePump::HandleNestedNativeLoopWithApplicationTasks(
    bool application_tasks_desired) {}

// static
void MessagePump::OverrideMessagePumpForUIFactory(MessagePumpFactory* factory) {}

// static
bool MessagePump::IsMessagePumpForUIFactoryOveridden() {}

// static
std::unique_ptr<MessagePump> MessagePump::Create(MessagePumpType type) {}

// static
void MessagePump::InitializeFeatures() {}

// static
void MessagePump::OverrideAlignWakeUpsState(bool enabled, TimeDelta leeway) {}

// static
void MessagePump::ResetAlignWakeUpsState() {}

// static
bool MessagePump::GetAlignWakeUpsEnabled() {}

// static
TimeDelta MessagePump::GetLeewayIgnoringThreadOverride() {}

// static
TimeDelta MessagePump::GetLeewayForCurrentThread() {}

TimeTicks MessagePump::AdjustDelayedRunTime(TimeTicks earliest_time,
                                            TimeTicks run_time,
                                            TimeTicks latest_time) {}

}  // namespace base