Expose TopLevelWindow to JavaScript
This commit is contained in:
parent
cfed9fa4b9
commit
71ebd99dfa
6 changed files with 24 additions and 2 deletions
|
@ -70,7 +70,6 @@ v8::Local<v8::Value> ToBuffer(v8::Isolate* isolate, void* val, int size) {
|
|||
} // namespace
|
||||
|
||||
TopLevelWindow::TopLevelWindow(v8::Isolate* isolate,
|
||||
v8::Local<v8::Object> wrapper,
|
||||
const mate::Dictionary& options)
|
||||
: weak_factory_(this) {
|
||||
// The parent window.
|
||||
|
@ -101,6 +100,15 @@ TopLevelWindow::TopLevelWindow(v8::Isolate* isolate,
|
|||
#endif
|
||||
}
|
||||
|
||||
TopLevelWindow::TopLevelWindow(v8::Isolate* isolate,
|
||||
v8::Local<v8::Object> wrapper,
|
||||
const mate::Dictionary& options)
|
||||
: TopLevelWindow(isolate, options) {
|
||||
InitWith(isolate, wrapper);
|
||||
// Init window after everything has been setup.
|
||||
window()->InitFromOptions(options);
|
||||
}
|
||||
|
||||
TopLevelWindow::~TopLevelWindow() {
|
||||
if (!window_->IsClosed())
|
||||
window_->CloseImmediately();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue