#ifndef EXTENSIONS_BROWSER_API_POWER_POWER_API_H_
#define EXTENSIONS_BROWSER_API_POWER_POWER_API_H_
#include <map>
#include <memory>
#include <string>
#include "base/functional/callback.h"
#include "base/memory/raw_ptr.h"
#include "build/chromeos_buildflags.h"
#include "extensions/browser/browser_context_keyed_api_factory.h"
#include "extensions/browser/extension_function.h"
#include "extensions/browser/extension_registry_observer.h"
#include "extensions/common/api/power.h"
#include "extensions/common/extension_id.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "services/device/public/mojom/wake_lock.mojom.h"
namespace content {
class BrowserContext;
}
namespace extensions {
class PowerRequestKeepAwakeFunction : public ExtensionFunction { … };
class PowerReleaseKeepAwakeFunction : public ExtensionFunction { … };
#if BUILDFLAG(IS_CHROMEOS)
class PowerReportActivityFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("power.reportActivity", POWER_REPORTACTIVITY)
protected:
~PowerReportActivityFunction() override = default;
ResponseAction Run() override;
};
#endif
class PowerAPI : public BrowserContextKeyedAPI,
public extensions::ExtensionRegistryObserver { … };
}
#endif