feat(NativeWindowMac): addTabbedWindow

Add support for the [`NSWindow addTabbedWindow`][nsw] method on MacOSX

This plays nicely with the changes from #9052 and #9725

Usage samples available in [this commit][c] in my fork of
`electron-quick-start`

[nsw]: 1855947-addtabbedwindow
[c]: 79f06591df
This commit is contained in:
Daniel Ma 2017-09-13 12:15:14 -07:00 committed by Cheng Zhao
parent 68d35dbeb1
commit 1bb042a661
8 changed files with 46 additions and 0 deletions

View file

@ -938,6 +938,10 @@ void Window::ToggleTabBar() {
window_->ToggleTabBar();
}
void Window::AddTabbedWindow(NativeWindow* window) {
window_->AddTabbedWindow(window);
}
void Window::SetVibrancy(mate::Arguments* args) {
std::string type;
@ -1085,6 +1089,7 @@ void Window::BuildPrototype(v8::Isolate* isolate,
.SetMethod("selectNextTab", &Window::SelectNextTab)
.SetMethod("moveTabToNewWindow", &Window::MoveTabToNewWindow)
.SetMethod("toggleTabBar", &Window::ToggleTabBar)
.SetMethod("addTabbedWindow", &Window::AddTabbedWindow)
#endif
.SetMethod("setVibrancy", &Window::SetVibrancy)
.SetMethod("_setTouchBarItems", &Window::SetTouchBar)