feat: allow windows to be excluded from the windows menu (#17404)

* feat: allow windows to be excluded from the windows menu

* excludedfromWindowsMenu => excludedFromShownWindowsMenu

* implement no-op for win & linux
This commit is contained in:
Shelley Vohr 2019-03-27 08:10:23 -04:00 committed by GitHub
parent ec5e0ef06e
commit 4e57a732a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 57 additions and 0 deletions

View file

@ -567,6 +567,14 @@ void TopLevelWindow::SetSkipTaskbar(bool skip) {
window_->SetSkipTaskbar(skip);
}
void TopLevelWindow::SetExcludedFromShownWindowsMenu(bool excluded) {
window_->SetExcludedFromShownWindowsMenu(excluded);
}
bool TopLevelWindow::IsExcludedFromShownWindowsMenu() {
return window_->IsExcludedFromShownWindowsMenu();
}
void TopLevelWindow::SetSimpleFullScreen(bool simple_fullscreen) {
window_->SetSimpleFullScreen(simple_fullscreen);
}
@ -1133,6 +1141,9 @@ void TopLevelWindow::BuildPrototype(v8::Isolate* isolate,
.SetMethod("addTabbedWindow", &TopLevelWindow::AddTabbedWindow)
.SetMethod("setWindowButtonVisibility",
&TopLevelWindow::SetWindowButtonVisibility)
.SetProperty("excludedFromShownWindowsMenu",
&TopLevelWindow::IsExcludedFromShownWindowsMenu,
&TopLevelWindow::SetExcludedFromShownWindowsMenu)
#endif
.SetMethod("setAutoHideMenuBar", &TopLevelWindow::SetAutoHideMenuBar)
.SetMethod("isMenuBarAutoHide", &TopLevelWindow::IsMenuBarAutoHide)