Add BrowserWindow.prototype.setContentProtection(enable)

This commit is contained in:
Milan Burda 2016-06-22 10:40:01 +02:00
parent fd40f3d344
commit c243cf0c0f
8 changed files with 28 additions and 0 deletions

View file

@ -941,6 +941,11 @@ void NativeWindowMac::SetIgnoreMouseEvents(bool ignore) {
[window_ setIgnoresMouseEvents:ignore];
}
void NativeWindowMac::SetContentProtection(bool enable) {
[window_ setSharingType:enable ? NSWindowSharingNone
: NSWindowSharingReadOnly];
}
bool NativeWindowMac::HasModalDialog() {
return [window_ attachedSheet] != nil;
}