1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-06-22 22:17:48 +02:00

Added TChromiumCore.AlwaysOpenPDFExternally

This commit is contained in:
salvadordf
2022-10-05 17:36:09 +02:00
parent ea30ee5032
commit cf66869a80
2 changed files with 68 additions and 54 deletions

View File

@ -113,6 +113,7 @@ type
FHyperlinkAuditing : boolean;
FAllowOutdatedPlugins : boolean;
FAlwaysAuthorizePlugins : boolean;
FAlwaysOpenPDFExternally : boolean;
FSpellChecking : boolean;
FSpellCheckerDicts : ustring;
FZoomStep : byte;
@ -398,6 +399,7 @@ type
procedure SetHyperlinkAuditing(aValue : boolean);
procedure SetAllowOutdatedPlugins(aValue : boolean);
procedure SetAlwaysAuthorizePlugins(aValue : boolean);
procedure SetAlwaysOpenPDFExternally(aValue : boolean);
procedure SetSpellChecking(aValue : boolean);
procedure SetSpellCheckerDicts(const aValue : ustring);
procedure SetWebRTCIPHandlingPolicy(aValue : TCefWebRTCHandlingPolicy);
@ -949,6 +951,7 @@ type
property HyperlinkAuditing : boolean read FHyperlinkAuditing write SetHyperlinkAuditing;
property AllowOutdatedPlugins : boolean read FAllowOutdatedPlugins write SetAllowOutdatedPlugins;
property AlwaysAuthorizePlugins : boolean read FAlwaysAuthorizePlugins write SetAlwaysAuthorizePlugins;
property AlwaysOpenPDFExternally : boolean read FAlwaysOpenPDFExternally write SetAlwaysOpenPDFExternally;
property SpellChecking : boolean read FSpellChecking write SetSpellChecking;
property SpellCheckerDicts : ustring read FSpellCheckerDicts write SetSpellCheckerDicts;
property HasValidMainFrame : boolean read GetHasValidMainFrame;
@ -1310,6 +1313,7 @@ begin
FSendReferrer := True;
FAllowOutdatedPlugins := False;
FAlwaysAuthorizePlugins := False;
FAlwaysOpenPDFExternally := False;
FSpellChecking := True;
FSpellCheckerDicts := '';
FZoomStep := ZOOM_STEP_DEF;
@ -3248,6 +3252,15 @@ begin
end;
end;
procedure TChromiumCore.SetAlwaysOpenPDFExternally(aValue : boolean);
begin
if (FAlwaysOpenPDFExternally <> aValue) then
begin
FAlwaysOpenPDFExternally := aValue;
FUpdatePreferences := True;
end;
end;
procedure TChromiumCore.SetSpellChecking(aValue : boolean);
begin
if (FSpellChecking <> aValue) then
@ -4081,6 +4094,7 @@ begin
UpdatePreference(aBrowser, 'enable_a_ping', FHyperlinkAuditing);
UpdatePreference(aBrowser, 'plugins.allow_outdated', FAllowOutdatedPlugins);
UpdatePreference(aBrowser, 'plugins.always_authorize', FAlwaysAuthorizePlugins);
UpdatePreference(aBrowser, 'plugins.always_open_pdf_externally', FAlwaysOpenPDFExternally);
UpdatePreference(aBrowser, 'browser.enable_spellchecking', FSpellChecking);
UpdateStringListPref(aBrowser, 'spellcheck.dictionaries', FSpellCheckerDicts);
UpdatePreference(aBrowser, 'settings.force_google_safesearch', FSafeSearch);

View File

@ -2,7 +2,7 @@
"UpdateLazPackages" : [
{
"ForceNotify" : true,
"InternalVersion" : 437,
"InternalVersion" : 438,
"Name" : "cef4delphi_lazarus.lpk",
"Version" : "106.0.26.0"
}