chromium/base/power_monitor/battery_state_sampler.cc

// Copyright 2022 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/power_monitor/battery_state_sampler.h"

#include "base/power_monitor/power_monitor_buildflags.h"

#if !BUILDFLAG(IS_MAC)
#include "base/power_monitor/timer_sampling_event_source.h"
#endif

namespace base {

namespace {

// Singleton instance of the BatteryStateSampler.
BatteryStateSampler* g_battery_state_sampler =;
bool g_test_instance_installed =;

}  // namespace

BatteryStateSampler::BatteryStateSampler(
    std::unique_ptr<SamplingEventSource> sampling_event_source,
    std::unique_ptr<BatteryLevelProvider> battery_level_provider)
    :{}

BatteryStateSampler::~BatteryStateSampler() {}

// static
BatteryStateSampler* BatteryStateSampler::Get() {}

void BatteryStateSampler::AddObserver(Observer* observer) {}

void BatteryStateSampler::RemoveObserver(Observer* observer) {}

void BatteryStateSampler::Shutdown() {}

// static
std::unique_ptr<base::BatteryStateSampler>
BatteryStateSampler::CreateInstanceForTesting(
    std::unique_ptr<SamplingEventSource> sampling_event_source,
    std::unique_ptr<BatteryLevelProvider> battery_level_provider) {}

// static
bool BatteryStateSampler::HasTestingInstance() {}

#if !BUILDFLAG(IS_MAC)
// static
std::unique_ptr<SamplingEventSource>
BatteryStateSampler::CreateSamplingEventSource() {}
#endif  // !BUILDFLAG(IS_MAC)

void BatteryStateSampler::OnInitialBatteryStateSampled(
    const std::optional<BatteryLevelProvider::BatteryState>& battery_state) {}

void BatteryStateSampler::OnSamplingEvent() {}

void BatteryStateSampler::OnBatteryStateSampled(
    const std::optional<BatteryLevelProvider::BatteryState>& battery_state) {}

}  // namespace base