You've already forked CEF4Delphi
mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-07-12 22:30:17 +02:00
New TChromium.AcceptLanguageList property
- New menu option to set the Accept Language List in MiniBrowser. - CookieVisitor now blocks some cookies from a custom domain.
This commit is contained in:
@ -123,6 +123,7 @@ type
|
||||
FWebRTCIPHandlingPolicy : TCefWebRTCHandlingPolicy;
|
||||
FWebRTCMultipleRoutes : TCefState;
|
||||
FWebRTCNonProxiedUDP : TCefState;
|
||||
FAcceptLanguageList : ustring;
|
||||
|
||||
{$IFDEF MSWINDOWS}
|
||||
FOldBrowserCompWndPrc : TFNWndProc;
|
||||
@ -321,6 +322,7 @@ type
|
||||
procedure SetSafeSearch(aValue : boolean);
|
||||
procedure SetYouTubeRestrict(aValue : integer);
|
||||
procedure SetPrintingEnabled(aValue : boolean);
|
||||
procedure SetAcceptLanguageList(const aValue : ustring);
|
||||
procedure SetOnRequestContextInitialized(const aValue : TOnRequestContextInitialized);
|
||||
procedure SetOnBeforePluginLoad(const aValue : TOnBeforePluginLoad);
|
||||
|
||||
@ -706,6 +708,7 @@ type
|
||||
property SafeSearch : boolean read FSafeSearch write SetSafeSearch;
|
||||
property YouTubeRestrict : integer read FYouTubeRestrict write SetYouTubeRestrict;
|
||||
property PrintingEnabled : boolean read FPrintingEnabled write SetPrintingEnabled;
|
||||
property AcceptLanguageList : ustring read FAcceptLanguageList write SetAcceptLanguageList;
|
||||
|
||||
property WebRTCIPHandlingPolicy : TCefWebRTCHandlingPolicy read FWebRTCIPHandlingPolicy write SetWebRTCIPHandlingPolicy;
|
||||
property WebRTCMultipleRoutes : TCefState read FWebRTCMultipleRoutes write SetWebRTCMultipleRoutes;
|
||||
@ -930,6 +933,7 @@ begin
|
||||
FSafeSearch := False;
|
||||
FYouTubeRestrict := YOUTUBE_RESTRICT_OFF;
|
||||
FPrintingEnabled := True;
|
||||
FAcceptLanguageList := '';
|
||||
|
||||
{$IFDEF MSWINDOWS}
|
||||
FOldBrowserCompWndPrc := nil;
|
||||
@ -2362,6 +2366,15 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TChromiumCore.SetAcceptLanguageList(const aValue : ustring);
|
||||
begin
|
||||
if (FAcceptLanguageList <> aValue) then
|
||||
begin
|
||||
FAcceptLanguageList := aValue;
|
||||
FUpdatePreferences := True;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TChromiumCore.SetOnRequestContextInitialized(const aValue : TOnRequestContextInitialized);
|
||||
begin
|
||||
FOnRequestContextInitialized := aValue;
|
||||
@ -2968,6 +2981,9 @@ begin
|
||||
UpdatePreference(aBrowser, 'settings.force_youtube_restrict', FYouTubeRestrict);
|
||||
UpdatePreference(aBrowser, 'printing.enabled', FPrintingEnabled);
|
||||
|
||||
if (length(FAcceptLanguageList) > 0) then
|
||||
UpdatePreference(aBrowser, 'intl.accept_languages', FAcceptLanguageList);
|
||||
|
||||
if (FMaxConnectionsPerProxy <> CEF_MAX_CONNECTIONS_PER_PROXY_DEFAULT_VALUE) then
|
||||
UpdatePreference(aBrowser, 'net.max_connections_per_proxy', FMaxConnectionsPerProxy);
|
||||
|
||||
|
Reference in New Issue
Block a user