feat: add BrowserWindow.isTabletMode API (#25209)
This commit is contained in:
parent
2dd7ad268b
commit
c50ded2b71
7 changed files with 32 additions and 0 deletions
|
@ -60,6 +60,7 @@
|
|||
#include "ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h"
|
||||
#include "ui/views/window/native_frame_view.h"
|
||||
#elif defined(OS_WIN)
|
||||
#include "base/win/win_util.h"
|
||||
#include "shell/browser/ui/views/win_frame_view.h"
|
||||
#include "shell/browser/ui/win/electron_desktop_native_widget_aura.h"
|
||||
#include "skia/ext/skia_utils_win.h"
|
||||
|
@ -901,6 +902,14 @@ bool NativeWindowViews::IsKiosk() {
|
|||
return IsFullscreen();
|
||||
}
|
||||
|
||||
bool NativeWindowViews::IsTabletMode() const {
|
||||
#if defined(OS_WIN)
|
||||
return base::win::IsWindows10TabletMode(GetAcceleratedWidget());
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
SkColor NativeWindowViews::GetBackgroundColor() {
|
||||
return root_view_->background()->get_color();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue