feat: add thermal states to powerMonitor (#37935)
* feat: add thermal states to powerMonitor * update docs
This commit is contained in:
parent
b2411e05a8
commit
ba835ddac1
5 changed files with 93 additions and 2 deletions
|
@ -21,7 +21,8 @@ class PowerMonitor : public gin::Wrappable<PowerMonitor>,
|
|||
public gin_helper::EventEmitterMixin<PowerMonitor>,
|
||||
public gin_helper::Pinnable<PowerMonitor>,
|
||||
public base::PowerStateObserver,
|
||||
public base::PowerSuspendObserver {
|
||||
public base::PowerSuspendObserver,
|
||||
public base::PowerThermalObserver {
|
||||
public:
|
||||
static v8::Local<v8::Value> Create(v8::Isolate* isolate);
|
||||
|
||||
|
@ -57,6 +58,10 @@ class PowerMonitor : public gin::Wrappable<PowerMonitor>,
|
|||
void OnSuspend() override;
|
||||
void OnResume() override;
|
||||
|
||||
// base::PowerThermalObserver
|
||||
void OnThermalStateChange(DeviceThermalState new_state) override;
|
||||
void OnSpeedLimitChange(int speed_limit) override;
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
// Static callback invoked when a message comes in to our messaging window.
|
||||
static LRESULT CALLBACK WndProcStatic(HWND hwnd,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue