You've already forked CEF4Delphi
mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-09-16 08:26:23 +02:00
Add option UseMockKeyChain for Mac. Prevents requiring permissions, but stops encrypting Cookies.
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
unit GlobalCefApplication;
|
unit GlobalCefApplication;
|
||||||
|
|
||||||
{$mode ObjFPC}{$H+}
|
{$mode ObjFPC}{$H+}
|
||||||
|
{$I cef.inc}
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
@@ -32,6 +33,12 @@ begin
|
|||||||
GlobalCEFApp.MultiThreadedMessageLoop := False;
|
GlobalCEFApp.MultiThreadedMessageLoop := False;
|
||||||
GlobalCEFApp.OnScheduleMessagePumpWork := @GlobalCEFApp_OnScheduleMessagePumpWork;
|
GlobalCEFApp.OnScheduleMessagePumpWork := @GlobalCEFApp_OnScheduleMessagePumpWork;
|
||||||
|
|
||||||
|
{$IFDEF MACOSX}
|
||||||
|
(* Enable the below to prevent being asked for permission to access "Chromium Safe Storage"
|
||||||
|
If set to true, Cookies will not be encrypted.
|
||||||
|
*)
|
||||||
|
//GlobalCEFApp.UseMockKeyChain := True;
|
||||||
|
{$ENDIF}
|
||||||
{$IFDEF LINUX}
|
{$IFDEF LINUX}
|
||||||
// This is a workaround for the 'GPU is not usable error' issue :
|
// This is a workaround for the 'GPU is not usable error' issue :
|
||||||
// https://bitbucket.org/chromiumembedded/cef/issues/2964/gpu-is-not-usable-error-during-cef
|
// https://bitbucket.org/chromiumembedded/cef/issues/2964/gpu-is-not-usable-error-during-cef
|
||||||
|
@@ -191,6 +191,7 @@ type
|
|||||||
FDeviceScaleFactor : single;
|
FDeviceScaleFactor : single;
|
||||||
FForcedDeviceScaleFactor : single;
|
FForcedDeviceScaleFactor : single;
|
||||||
FDisableZygote : boolean;
|
FDisableZygote : boolean;
|
||||||
|
FUseMockKeyChain: boolean;
|
||||||
|
|
||||||
FPluginPolicy : TCefPluginPolicySwitch;
|
FPluginPolicy : TCefPluginPolicySwitch;
|
||||||
FDefaultEncoding : ustring;
|
FDefaultEncoding : ustring;
|
||||||
@@ -493,6 +494,7 @@ type
|
|||||||
property DevToolsProtocolLogFile : ustring read FDevToolsProtocolLogFile write FDevToolsProtocolLogFile; // --devtools-protocol-log-file
|
property DevToolsProtocolLogFile : ustring read FDevToolsProtocolLogFile write FDevToolsProtocolLogFile; // --devtools-protocol-log-file
|
||||||
property ForcedDeviceScaleFactor : single read FForcedDeviceScaleFactor write FForcedDeviceScaleFactor; // --device-scale-factor
|
property ForcedDeviceScaleFactor : single read FForcedDeviceScaleFactor write FForcedDeviceScaleFactor; // --device-scale-factor
|
||||||
property DisableZygote : boolean read FDisableZygote write FDisableZygote; // --no-zygote
|
property DisableZygote : boolean read FDisableZygote write FDisableZygote; // --no-zygote
|
||||||
|
property UseMockKeyChain : boolean read FUseMockKeyChain write FUseMockKeyChain; // --use-mock-keychain
|
||||||
|
|
||||||
// Properties used during the CEF initialization
|
// Properties used during the CEF initialization
|
||||||
property WindowsSandboxInfo : Pointer read FWindowsSandboxInfo write FWindowsSandboxInfo;
|
property WindowsSandboxInfo : Pointer read FWindowsSandboxInfo write FWindowsSandboxInfo;
|
||||||
@@ -2141,6 +2143,9 @@ begin
|
|||||||
if FDisableZygote then
|
if FDisableZygote then
|
||||||
ReplaceSwitch(aKeys, aValues, '--no-zygote');
|
ReplaceSwitch(aKeys, aValues, '--no-zygote');
|
||||||
|
|
||||||
|
if FUseMockKeyChain then
|
||||||
|
ReplaceSwitch(aKeys, aValues, '--use-mock-keychain');
|
||||||
|
|
||||||
// The list of features you can enable is here :
|
// The list of features you can enable is here :
|
||||||
// https://chromium.googlesource.com/chromium/src/+/master/chrome/common/chrome_features.cc
|
// https://chromium.googlesource.com/chromium/src/+/master/chrome/common/chrome_features.cc
|
||||||
if (length(FEnableFeatures) > 0) then
|
if (length(FEnableFeatures) > 0) then
|
||||||
|
Reference in New Issue
Block a user