Make Wrappable a template class
This commit is contained in:
parent
a8f08e1fab
commit
2ae52d0ff4
52 changed files with 367 additions and 349 deletions
|
@ -14,8 +14,9 @@ namespace atom {
|
|||
|
||||
namespace api {
|
||||
|
||||
PowerMonitor::PowerMonitor() {
|
||||
PowerMonitor::PowerMonitor(v8::Isolate* isolate) {
|
||||
base::PowerMonitor::Get()->AddObserver(this);
|
||||
Init(isolate);
|
||||
}
|
||||
|
||||
PowerMonitor::~PowerMonitor() {
|
||||
|
@ -46,7 +47,12 @@ v8::Local<v8::Value> PowerMonitor::Create(v8::Isolate* isolate) {
|
|||
return v8::Null(isolate);
|
||||
}
|
||||
|
||||
return CreateHandle(isolate, new PowerMonitor).ToV8();
|
||||
return CreateHandle(isolate, new PowerMonitor(isolate)).ToV8();
|
||||
}
|
||||
|
||||
// static
|
||||
void PowerMonitor::BuildPrototype(
|
||||
v8::Isolate* isolate, v8::Local<v8::ObjectTemplate> prototype) {
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue