mac: Add applicationSupportsSecureRestorableState

Requests that any state restoration archive be created with secure
encoding (macOS 12+ only). See https://crrev.com/c737387656 for
details. This also fixes an issue with macOS default behavior
incorrectly restoring windows after hard reset (holding down the
power button).
This commit is contained in:
Marshall Greenblatt
2024-11-27 10:51:05 -05:00
parent e3e90f9cf6
commit e33296a451
2 changed files with 16 additions and 0 deletions

View File

@@ -522,6 +522,14 @@ void RemoveMenuItem(NSMenu* menu, SEL action_selector) {
} }
return NO; return NO;
} }
// Requests that any state restoration archive be created with secure encoding
// (macOS 12+ only). See https://crrev.com/c737387656 for details. This also
// fixes an issue with macOS default behavior incorrectly restoring windows
// after hard reset (holding down the power button).
- (BOOL)applicationSupportsSecureRestorableState:(NSApplication*)app {
return YES;
}
@end @end
namespace client { namespace client {

View File

@@ -119,6 +119,14 @@
} }
return NO; return NO;
} }
// Requests that any state restoration archive be created with secure encoding
// (macOS 12+ only). See https://crrev.com/c737387656 for details. This also
// fixes an issue with macOS default behavior incorrectly restoring windows
// after hard reset (holding down the power button).
- (BOOL)applicationSupportsSecureRestorableState:(NSApplication*)app {
return YES;
}
@end @end
// Entry point function for the browser process. // Entry point function for the browser process.