mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2024-11-16 00:05:55 +01:00
New TChromium and TFMXChromium properties
Added these properties to test the Adobe Flash Plugin. TChromium.RunAllFlashInAllowMode TChromium.AllowOutdatedPlugins TChromium.AlwaysAuthorizePlugins
This commit is contained in:
parent
8402ba077f
commit
381f43394b
@ -83,6 +83,9 @@ type
|
|||||||
FDoNotTrack : boolean;
|
FDoNotTrack : boolean;
|
||||||
FSendReferrer : boolean;
|
FSendReferrer : boolean;
|
||||||
FHyperlinkAuditing : boolean;
|
FHyperlinkAuditing : boolean;
|
||||||
|
FRunAllFlashInAllowMode : boolean;
|
||||||
|
FAllowOutdatedPlugins : boolean;
|
||||||
|
FAlwaysAuthorizePlugins : boolean;
|
||||||
FCookiePrefs : integer;
|
FCookiePrefs : integer;
|
||||||
FImagesPrefs : integer;
|
FImagesPrefs : integer;
|
||||||
FZoomStep : byte;
|
FZoomStep : byte;
|
||||||
@ -235,6 +238,9 @@ type
|
|||||||
procedure SetDoNotTrack(aValue : boolean);
|
procedure SetDoNotTrack(aValue : boolean);
|
||||||
procedure SetSendReferrer(aValue : boolean);
|
procedure SetSendReferrer(aValue : boolean);
|
||||||
procedure SetHyperlinkAuditing(aValue : boolean);
|
procedure SetHyperlinkAuditing(aValue : boolean);
|
||||||
|
procedure SetRunAllFlashInAllowMode(aValue : boolean);
|
||||||
|
procedure SetAllowOutdatedPlugins(aValue : boolean);
|
||||||
|
procedure SetAlwaysAuthorizePlugins(aValue : boolean);
|
||||||
procedure SetWebRTCIPHandlingPolicy(aValue : TCefWebRTCHandlingPolicy);
|
procedure SetWebRTCIPHandlingPolicy(aValue : TCefWebRTCHandlingPolicy);
|
||||||
procedure SetWebRTCMultipleRoutes(aValue : TCefState);
|
procedure SetWebRTCMultipleRoutes(aValue : TCefState);
|
||||||
procedure SetWebRTCNonProxiedUDP(aValue : TCefState);
|
procedure SetWebRTCNonProxiedUDP(aValue : TCefState);
|
||||||
@ -553,6 +559,9 @@ type
|
|||||||
property DoNotTrack : boolean read FDoNotTrack write SetDoNotTrack;
|
property DoNotTrack : boolean read FDoNotTrack write SetDoNotTrack;
|
||||||
property SendReferrer : boolean read FSendReferrer write SetSendReferrer;
|
property SendReferrer : boolean read FSendReferrer write SetSendReferrer;
|
||||||
property HyperlinkAuditing : boolean read FHyperlinkAuditing write SetHyperlinkAuditing;
|
property HyperlinkAuditing : boolean read FHyperlinkAuditing write SetHyperlinkAuditing;
|
||||||
|
property RunAllFlashInAllowMode : boolean read FRunAllFlashInAllowMode write SetRunAllFlashInAllowMode;
|
||||||
|
property AllowOutdatedPlugins : boolean read FAllowOutdatedPlugins write SetAllowOutdatedPlugins;
|
||||||
|
property AlwaysAuthorizePlugins : boolean read FAlwaysAuthorizePlugins write SetAlwaysAuthorizePlugins;
|
||||||
property HasValidMainFrame : boolean read GetHasValidMainFrame;
|
property HasValidMainFrame : boolean read GetHasValidMainFrame;
|
||||||
property FrameCount : NativeUInt read GetFrameCount;
|
property FrameCount : NativeUInt read GetFrameCount;
|
||||||
property DragOperations : TCefDragOperations read FDragOperations write FDragOperations;
|
property DragOperations : TCefDragOperations read FDragOperations write FDragOperations;
|
||||||
@ -712,6 +721,9 @@ begin
|
|||||||
FDoNotTrack := True;
|
FDoNotTrack := True;
|
||||||
FSendReferrer := True;
|
FSendReferrer := True;
|
||||||
FHyperlinkAuditing := False;
|
FHyperlinkAuditing := False;
|
||||||
|
FRunAllFlashInAllowMode := False;
|
||||||
|
FAllowOutdatedPlugins := False;
|
||||||
|
FAlwaysAuthorizePlugins := False;
|
||||||
FCookiePrefs := CEF_CONTENT_SETTING_ALLOW;
|
FCookiePrefs := CEF_CONTENT_SETTING_ALLOW;
|
||||||
FImagesPrefs := CEF_CONTENT_SETTING_ALLOW;
|
FImagesPrefs := CEF_CONTENT_SETTING_ALLOW;
|
||||||
FZoomStep := ZOOM_STEP_DEF;
|
FZoomStep := ZOOM_STEP_DEF;
|
||||||
@ -1712,6 +1724,33 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TChromium.SetRunAllFlashInAllowMode(aValue : boolean);
|
||||||
|
begin
|
||||||
|
if (FRunAllFlashInAllowMode <> aValue) then
|
||||||
|
begin
|
||||||
|
FRunAllFlashInAllowMode := aValue;
|
||||||
|
FUpdatePreferences := True;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TChromium.SetAllowOutdatedPlugins(aValue : boolean);
|
||||||
|
begin
|
||||||
|
if (FAllowOutdatedPlugins <> aValue) then
|
||||||
|
begin
|
||||||
|
FAllowOutdatedPlugins := aValue;
|
||||||
|
FUpdatePreferences := True;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TChromium.SetAlwaysAuthorizePlugins(aValue : boolean);
|
||||||
|
begin
|
||||||
|
if (FAlwaysAuthorizePlugins <> aValue) then
|
||||||
|
begin
|
||||||
|
FAlwaysAuthorizePlugins := aValue;
|
||||||
|
FUpdatePreferences := True;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TChromium.SetWebRTCIPHandlingPolicy(aValue : TCefWebRTCHandlingPolicy);
|
procedure TChromium.SetWebRTCIPHandlingPolicy(aValue : TCefWebRTCHandlingPolicy);
|
||||||
begin
|
begin
|
||||||
if (FWebRTCIPHandlingPolicy <> aValue) then
|
if (FWebRTCIPHandlingPolicy <> aValue) then
|
||||||
@ -2090,6 +2129,12 @@ begin
|
|||||||
UpdatePreference(aBrowser, 'enable_do_not_track', FDoNotTrack);
|
UpdatePreference(aBrowser, 'enable_do_not_track', FDoNotTrack);
|
||||||
UpdatePreference(aBrowser, 'enable_referrers', FSendReferrer);
|
UpdatePreference(aBrowser, 'enable_referrers', FSendReferrer);
|
||||||
UpdatePreference(aBrowser, 'enable_a_ping', FHyperlinkAuditing);
|
UpdatePreference(aBrowser, 'enable_a_ping', FHyperlinkAuditing);
|
||||||
|
UpdatePreference(aBrowser, 'plugins.run_all_flash_in_allow_mode', FRunAllFlashInAllowMode);
|
||||||
|
UpdatePreference(aBrowser, 'plugins.allow_outdated', FAllowOutdatedPlugins);
|
||||||
|
UpdatePreference(aBrowser, 'plugins.always_authorize', FAlwaysAuthorizePlugins);
|
||||||
|
|
||||||
|
if FRunAllFlashInAllowMode then
|
||||||
|
UpdatePreference(aBrowser, 'profile.default_content_setting_values.plugins', 1);
|
||||||
|
|
||||||
case FWebRTCIPHandlingPolicy of
|
case FWebRTCIPHandlingPolicy of
|
||||||
hpDefaultPublicAndPrivateInterfaces :
|
hpDefaultPublicAndPrivateInterfaces :
|
||||||
|
@ -79,6 +79,9 @@ type
|
|||||||
FDoNotTrack : boolean;
|
FDoNotTrack : boolean;
|
||||||
FSendReferrer : boolean;
|
FSendReferrer : boolean;
|
||||||
FHyperlinkAuditing : boolean;
|
FHyperlinkAuditing : boolean;
|
||||||
|
FRunAllFlashInAllowMode : boolean;
|
||||||
|
FAllowOutdatedPlugins : boolean;
|
||||||
|
FAlwaysAuthorizePlugins : boolean;
|
||||||
FCookiePrefs : integer;
|
FCookiePrefs : integer;
|
||||||
FImagesPrefs : integer;
|
FImagesPrefs : integer;
|
||||||
FZoomStep : byte;
|
FZoomStep : byte;
|
||||||
@ -225,6 +228,9 @@ type
|
|||||||
procedure SetDoNotTrack(aValue : boolean);
|
procedure SetDoNotTrack(aValue : boolean);
|
||||||
procedure SetSendReferrer(aValue : boolean);
|
procedure SetSendReferrer(aValue : boolean);
|
||||||
procedure SetHyperlinkAuditing(aValue : boolean);
|
procedure SetHyperlinkAuditing(aValue : boolean);
|
||||||
|
procedure SetRunAllFlashInAllowMode(aValue : boolean);
|
||||||
|
procedure SetAllowOutdatedPlugins(aValue : boolean);
|
||||||
|
procedure SetAlwaysAuthorizePlugins(aValue : boolean);
|
||||||
procedure SetWebRTCIPHandlingPolicy(aValue : TCefWebRTCHandlingPolicy);
|
procedure SetWebRTCIPHandlingPolicy(aValue : TCefWebRTCHandlingPolicy);
|
||||||
procedure SetWebRTCMultipleRoutes(aValue : TCefState);
|
procedure SetWebRTCMultipleRoutes(aValue : TCefState);
|
||||||
procedure SetWebRTCNonProxiedUDP(aValue : TCefState);
|
procedure SetWebRTCNonProxiedUDP(aValue : TCefState);
|
||||||
@ -525,6 +531,9 @@ type
|
|||||||
property DoNotTrack : boolean read FDoNotTrack write SetDoNotTrack;
|
property DoNotTrack : boolean read FDoNotTrack write SetDoNotTrack;
|
||||||
property SendReferrer : boolean read FSendReferrer write SetSendReferrer;
|
property SendReferrer : boolean read FSendReferrer write SetSendReferrer;
|
||||||
property HyperlinkAuditing : boolean read FHyperlinkAuditing write SetHyperlinkAuditing;
|
property HyperlinkAuditing : boolean read FHyperlinkAuditing write SetHyperlinkAuditing;
|
||||||
|
property RunAllFlashInAllowMode : boolean read FRunAllFlashInAllowMode write SetRunAllFlashInAllowMode;
|
||||||
|
property AllowOutdatedPlugins : boolean read FAllowOutdatedPlugins write SetAllowOutdatedPlugins;
|
||||||
|
property AlwaysAuthorizePlugins : boolean read FAlwaysAuthorizePlugins write SetAlwaysAuthorizePlugins;
|
||||||
property HasValidMainFrame : boolean read GetHasValidMainFrame;
|
property HasValidMainFrame : boolean read GetHasValidMainFrame;
|
||||||
property FrameCount : NativeUInt read GetFrameCount;
|
property FrameCount : NativeUInt read GetFrameCount;
|
||||||
property DragOperations : TCefDragOperations read FDragOperations write FDragOperations;
|
property DragOperations : TCefDragOperations read FDragOperations write FDragOperations;
|
||||||
@ -675,6 +684,9 @@ begin
|
|||||||
FDoNotTrack := True;
|
FDoNotTrack := True;
|
||||||
FSendReferrer := True;
|
FSendReferrer := True;
|
||||||
FHyperlinkAuditing := False;
|
FHyperlinkAuditing := False;
|
||||||
|
FRunAllFlashInAllowMode := False;
|
||||||
|
FAllowOutdatedPlugins := False;
|
||||||
|
FAlwaysAuthorizePlugins := False;
|
||||||
FCookiePrefs := CEF_CONTENT_SETTING_ALLOW;
|
FCookiePrefs := CEF_CONTENT_SETTING_ALLOW;
|
||||||
FImagesPrefs := CEF_CONTENT_SETTING_ALLOW;
|
FImagesPrefs := CEF_CONTENT_SETTING_ALLOW;
|
||||||
FZoomStep := ZOOM_STEP_DEF;
|
FZoomStep := ZOOM_STEP_DEF;
|
||||||
@ -1527,6 +1539,33 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TFMXChromium.SetRunAllFlashInAllowMode(aValue : boolean);
|
||||||
|
begin
|
||||||
|
if (FRunAllFlashInAllowMode <> aValue) then
|
||||||
|
begin
|
||||||
|
FRunAllFlashInAllowMode := aValue;
|
||||||
|
FUpdatePreferences := True;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFMXChromium.SetAllowOutdatedPlugins(aValue : boolean);
|
||||||
|
begin
|
||||||
|
if (FAllowOutdatedPlugins <> aValue) then
|
||||||
|
begin
|
||||||
|
FAllowOutdatedPlugins := aValue;
|
||||||
|
FUpdatePreferences := True;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFMXChromium.SetAlwaysAuthorizePlugins(aValue : boolean);
|
||||||
|
begin
|
||||||
|
if (FAlwaysAuthorizePlugins <> aValue) then
|
||||||
|
begin
|
||||||
|
FAlwaysAuthorizePlugins := aValue;
|
||||||
|
FUpdatePreferences := True;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TFMXChromium.SetWebRTCIPHandlingPolicy(aValue : TCefWebRTCHandlingPolicy);
|
procedure TFMXChromium.SetWebRTCIPHandlingPolicy(aValue : TCefWebRTCHandlingPolicy);
|
||||||
begin
|
begin
|
||||||
if (FWebRTCIPHandlingPolicy <> aValue) then
|
if (FWebRTCIPHandlingPolicy <> aValue) then
|
||||||
@ -1856,6 +1895,12 @@ begin
|
|||||||
UpdatePreference(aBrowser, 'enable_do_not_track', FDoNotTrack);
|
UpdatePreference(aBrowser, 'enable_do_not_track', FDoNotTrack);
|
||||||
UpdatePreference(aBrowser, 'enable_referrers', FSendReferrer);
|
UpdatePreference(aBrowser, 'enable_referrers', FSendReferrer);
|
||||||
UpdatePreference(aBrowser, 'enable_a_ping', FHyperlinkAuditing);
|
UpdatePreference(aBrowser, 'enable_a_ping', FHyperlinkAuditing);
|
||||||
|
UpdatePreference(aBrowser, 'plugins.run_all_flash_in_allow_mode', FRunAllFlashInAllowMode);
|
||||||
|
UpdatePreference(aBrowser, 'plugins.allow_outdated', FAllowOutdatedPlugins);
|
||||||
|
UpdatePreference(aBrowser, 'plugins.always_authorize', FAlwaysAuthorizePlugins);
|
||||||
|
|
||||||
|
if FRunAllFlashInAllowMode then
|
||||||
|
UpdatePreference(aBrowser, 'profile.default_content_setting_values.plugins', 1);
|
||||||
|
|
||||||
case FWebRTCIPHandlingPolicy of
|
case FWebRTCIPHandlingPolicy of
|
||||||
hpDefaultPublicAndPrivateInterfaces :
|
hpDefaultPublicAndPrivateInterfaces :
|
||||||
|
Loading…
Reference in New Issue
Block a user