#ifndef EXTENSIONS_BROWSER_API_SYSTEM_INFO_SYSTEM_INFO_API_H_
#define EXTENSIONS_BROWSER_API_SYSTEM_INFO_SYSTEM_INFO_API_H_
#include "base/memory/raw_ptr.h"
#include "extensions/browser/browser_context_keyed_api_factory.h"
#include "extensions/browser/event_router.h"
namespace extensions {
class SystemInfoAPI : public BrowserContextKeyedAPI,
public EventRouter::Observer {
public:
static BrowserContextKeyedAPIFactory<SystemInfoAPI>* GetFactoryInstance();
explicit SystemInfoAPI(content::BrowserContext* context);
SystemInfoAPI(const SystemInfoAPI&) = delete;
SystemInfoAPI& operator=(const SystemInfoAPI&) = delete;
~SystemInfoAPI() override;
void Shutdown() override;
void OnListenerAdded(const EventListenerInfo& details) override;
void OnListenerRemoved(const EventListenerInfo& details) override;
private:
friend class BrowserContextKeyedAPIFactory<SystemInfoAPI>;
static const char* service_name() { return "SystemInfoAPI"; }
static const bool kServiceIsNULLWhileTesting = true;
raw_ptr<content::BrowserContext> browser_context_;
};
}
#endif