feat: Add new powerMonitor synchronous API (#17144)
`powerMonitor.querySystemIdleState` and `powerMonitor.querySystemIdleTime` had async backing APIs in chromium (1379183
). However, that has changed in ch73. So, this PR deprecates the old async APIs and adds new sync APIs.
This commit is contained in:
parent
29ab74688d
commit
bfa07ec4be
7 changed files with 96 additions and 25 deletions
|
@ -46,8 +46,8 @@ class PowerMonitor : public mate::TrackableObject<PowerMonitor>,
|
|||
void OnResume() override;
|
||||
|
||||
private:
|
||||
ui::IdleState QuerySystemIdleState(v8::Isolate* isolate, int idle_threshold);
|
||||
int QuerySystemIdleTime();
|
||||
ui::IdleState GetSystemIdleState(v8::Isolate* isolate, int idle_threshold);
|
||||
int GetSystemIdleTime();
|
||||
|
||||
#if defined(OS_WIN)
|
||||
// Static callback invoked when a message comes in to our messaging window.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue