chore: convert View APIs away from base::Bind (#18035)

This commit is contained in:
Shelley Vohr 2019-04-29 17:40:39 -07:00 committed by Cheng Zhao
parent 4a3771ff7f
commit 4ee201c56e
14 changed files with 40 additions and 32 deletions

View file

@ -73,8 +73,9 @@ void ElectronBindings::BindProcess(v8::Isolate* isolate,
process->SetMethod("getSystemVersion",
&base::SysInfo::OperatingSystemVersion);
process->SetMethod("getIOCounters", &GetIOCounters);
process->SetMethod("getCPUUsage", base::Bind(&ElectronBindings::GetCPUUsage,
base::Unretained(metrics)));
process->SetMethod("getCPUUsage",
base::BindRepeating(&ElectronBindings::GetCPUUsage,
base::Unretained(metrics)));
#if defined(MAS_BUILD)
process->SetReadOnly("mas", true);
@ -97,8 +98,9 @@ void ElectronBindings::BindTo(v8::Isolate* isolate,
#if defined(OS_POSIX)
dict.SetMethod("setFdLimit", &base::IncreaseFdLimitTo);
#endif
dict.SetMethod("activateUvLoop", base::Bind(&ElectronBindings::ActivateUVLoop,
base::Unretained(this)));
dict.SetMethod("activateUvLoop",
base::BindRepeating(&ElectronBindings::ActivateUVLoop,
base::Unretained(this)));
mate::Dictionary versions;
if (dict.Get("versions", &versions)) {