feat: add BrowserWindow.isTabletMode API (#25209)

This commit is contained in:
Cheng Zhao 2020-09-22 14:40:42 +09:00 committed by GitHub
parent 2dd7ad268b
commit c50ded2b71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 32 additions and 0 deletions

View file

@ -622,6 +622,10 @@ bool BaseWindow::IsKiosk() {
return window_->IsKiosk();
}
bool BaseWindow::IsTabletMode() const {
return window_->IsTabletMode();
}
void BaseWindow::SetBackgroundColor(const std::string& color_name) {
SkColor color = ParseHexColor(color_name);
window_->SetBackgroundColor(color);
@ -1160,6 +1164,7 @@ void BaseWindow::BuildPrototype(v8::Isolate* isolate,
.SetMethod("isSimpleFullScreen", &BaseWindow::IsSimpleFullScreen)
.SetMethod("setKiosk", &BaseWindow::SetKiosk)
.SetMethod("isKiosk", &BaseWindow::IsKiosk)
.SetMethod("isTabletMode", &BaseWindow::IsTabletMode)
.SetMethod("setBackgroundColor", &BaseWindow::SetBackgroundColor)
.SetMethod("getBackgroundColor", &BaseWindow::GetBackgroundColor)
.SetMethod("setHasShadow", &BaseWindow::SetHasShadow)