mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2024-11-24 08:02:15 +02:00
Update to CEF 118.6.6
This commit is contained in:
parent
9c94220a5d
commit
d5d5387124
14
README.md
14
README.md
@ -3,15 +3,15 @@ CEF4Delphi is an open source project created by Salvador Díaz Fau to embed Chro
|
||||
|
||||
CEF4Delphi is based on DCEF3 and fpCEF3. The original license of those projects still applies to CEF4Delphi. Read the license terms in the LICENSE.md file.
|
||||
|
||||
CEF4Delphi uses CEF 117.2.5 which includes Chromium 117.0.5938.152.
|
||||
CEF4Delphi uses CEF 118.6.6 which includes Chromium 117.0.5993.96.
|
||||
|
||||
The CEF binaries used by CEF4Delphi are available for download at Spotify :
|
||||
* [Windows 32 bits](https://cef-builds.spotifycdn.com/cef_binary_117.2.5%2Bgda4c36a%2Bchromium-117.0.5938.152_windows32.tar.bz2)
|
||||
* [Windows 64 bits](https://cef-builds.spotifycdn.com/cef_binary_117.2.5%2Bgda4c36a%2Bchromium-117.0.5938.152_windows64.tar.bz2)
|
||||
* [Linux x86 64 bits](https://cef-builds.spotifycdn.com/cef_binary_117.2.5%2Bgda4c36a%2Bchromium-117.0.5938.152_linux64.tar.bz2)
|
||||
* [Linux ARM 32 bits](https://cef-builds.spotifycdn.com/cef_binary_117.2.5%2Bgda4c36a%2Bchromium-117.0.5938.152_linuxarm.tar.bz2)
|
||||
* [Linux ARM 64 bits](https://cef-builds.spotifycdn.com/cef_binary_117.2.5%2Bgda4c36a%2Bchromium-117.0.5938.152_linuxarm64.tar.bz2)
|
||||
* [MacOS x86 64 bits](https://cef-builds.spotifycdn.com/cef_binary_117.2.5%2Bgda4c36a%2Bchromium-117.0.5938.152_macosx64.tar.bz2)
|
||||
* [Windows 32 bits](https://cef-builds.spotifycdn.com/cef_binary_118.6.6%2Bg3cffa57%2Bchromium-117.0.5993.96_windows32.tar.bz2)
|
||||
* [Windows 64 bits](https://cef-builds.spotifycdn.com/cef_binary_118.6.6%2Bg3cffa57%2Bchromium-118.0.5993.96_windows64.tar.bz2)
|
||||
* [Linux x86 64 bits](https://cef-builds.spotifycdn.com/cef_binary_118.6.6%2Bg3cffa57%2Bchromium-117.0.5993.96_linux64.tar.bz2)
|
||||
* [Linux ARM 32 bits](https://cef-builds.spotifycdn.com/cef_binary_118.6.6%2Bg3cffa57%2Bchromium-117.0.5993.96_linuxarm.tar.bz2)
|
||||
* [Linux ARM 64 bits](https://cef-builds.spotifycdn.com/cef_binary_118.6.6%2Bg3cffa57%2Bchromium-117.0.5993.96_linuxarm64.tar.bz2)
|
||||
* [MacOS x86 64 bits](https://cef-builds.spotifycdn.com/cef_binary_118.6.6%2Bg3cffa57%2Bchromium-117.0.5993.96_macosx64.tar.bz2)
|
||||
|
||||
CEF4Delphi was developed and tested on Delphi 11.3 and it has been tested in Delphi 7, Delphi XE, Delphi 10, Delphi 10.2, Delphi 10.3, Delphi 10.4 and Lazarus 2.2.6/FPC 3.2.2. CEF4Delphi includes VCL, FireMonkey (FMX) and Lazarus components.
|
||||
|
||||
|
@ -54,6 +54,9 @@ const
|
||||
MINIBROWSER_CONTEXTMENU_GETNAVIGATION = MENU_ID_USER_FIRST + 12;
|
||||
MINIBROWSER_CONTEXTMENU_MUTEAUDIO = MENU_ID_USER_FIRST + 13;
|
||||
MINIBROWSER_CONTEXTMENU_UNMUTEAUDIO = MENU_ID_USER_FIRST + 14;
|
||||
MINIBROWSER_CONTEXTMENU_INCZOOM = MENU_ID_USER_FIRST + 15;
|
||||
MINIBROWSER_CONTEXTMENU_DECZOOM = MENU_ID_USER_FIRST + 16;
|
||||
MINIBROWSER_CONTEXTMENU_RESETZOOM = MENU_ID_USER_FIRST + 17;
|
||||
|
||||
DEVTOOLS_SCREENSHOT_MSGID = 1;
|
||||
DEVTOOLS_MHTML_MSGID = 2;
|
||||
@ -407,6 +410,16 @@ begin
|
||||
model.AddItem(MINIBROWSER_CONTEXTMENU_UNMUTEAUDIO, 'Unmute audio')
|
||||
else
|
||||
model.AddItem(MINIBROWSER_CONTEXTMENU_MUTEAUDIO, 'Mute audio');
|
||||
|
||||
model.AddSeparator;
|
||||
if Chromium1.CanIncZoom then
|
||||
model.AddItem(MINIBROWSER_CONTEXTMENU_INCZOOM, 'Increment zoom');
|
||||
|
||||
if Chromium1.CanDecZoom then
|
||||
model.AddItem(MINIBROWSER_CONTEXTMENU_DECZOOM, 'Decrement zoom');
|
||||
|
||||
if Chromium1.CanResetZoom then
|
||||
model.AddItem(MINIBROWSER_CONTEXTMENU_RESETZOOM, 'Reset zoom');
|
||||
end
|
||||
else
|
||||
model.AddItem(MINIBROWSER_CONTEXTMENU_SHOWDEVTOOLS, 'Show DevTools');
|
||||
@ -585,6 +598,16 @@ begin
|
||||
|
||||
MINIBROWSER_CONTEXTMENU_MUTEAUDIO :
|
||||
Chromium1.AudioMuted := True;
|
||||
|
||||
MINIBROWSER_CONTEXTMENU_INCZOOM :
|
||||
Chromium1.IncZoomCommand;
|
||||
|
||||
MINIBROWSER_CONTEXTMENU_DECZOOM :
|
||||
Chromium1.DecZoomCommand;
|
||||
|
||||
MINIBROWSER_CONTEXTMENU_RESETZOOM :
|
||||
Chromium1.ResetZoomCommand;
|
||||
|
||||
end
|
||||
else
|
||||
case commandId of
|
||||
@ -1436,7 +1459,6 @@ var
|
||||
TempLanguageList : ustring;
|
||||
begin
|
||||
TempLanguageList := Chromium1.AcceptLanguageList;
|
||||
if (length(TempLanguageList) = 0) then TempLanguageList := Chromium1.Options.AcceptLanguageList;
|
||||
if (length(TempLanguageList) = 0) then TempLanguageList := GlobalCEFApp.AcceptLanguageList;
|
||||
|
||||
Chromium1.AcceptLanguageList := InputBox('Language', 'Accept language list', TempLanguageList);
|
||||
|
@ -79,7 +79,10 @@ const
|
||||
MINIBROWSER_CONTEXTMENU_TAKESNAPSHOT = MENU_ID_USER_FIRST + 11;
|
||||
MINIBROWSER_CONTEXTMENU_GETNAVIGATION = MENU_ID_USER_FIRST + 12;
|
||||
MINIBROWSER_CONTEXTMENU_MUTEAUDIO = MENU_ID_USER_FIRST + 13;
|
||||
MINIBROWSER_CONTEXTMENU_UNMUTEAUDIO = MENU_ID_USER_FIRST + 14;
|
||||
MINIBROWSER_CONTEXTMENU_UNMUTEAUDIO = MENU_ID_USER_FIRST + 14;
|
||||
MINIBROWSER_CONTEXTMENU_INCZOOM = MENU_ID_USER_FIRST + 15;
|
||||
MINIBROWSER_CONTEXTMENU_DECZOOM = MENU_ID_USER_FIRST + 16;
|
||||
MINIBROWSER_CONTEXTMENU_RESETZOOM = MENU_ID_USER_FIRST + 17;
|
||||
|
||||
DEVTOOLS_SCREENSHOT_MSGID = 1;
|
||||
DEVTOOLS_MHTML_MSGID = 2;
|
||||
@ -409,7 +412,6 @@ var
|
||||
TempLanguageList : ustring;
|
||||
begin
|
||||
TempLanguageList := Chromium1.AcceptLanguageList;
|
||||
if (length(TempLanguageList) = 0) then TempLanguageList := Chromium1.Options.AcceptLanguageList;
|
||||
if (length(TempLanguageList) = 0) then TempLanguageList := GlobalCEFApp.AcceptLanguageList;
|
||||
|
||||
Chromium1.AcceptLanguageList := InputBox('Language', 'Accept language list', TempLanguageList);
|
||||
@ -519,7 +521,17 @@ begin
|
||||
if Chromium1.AudioMuted then
|
||||
model.AddItem(MINIBROWSER_CONTEXTMENU_UNMUTEAUDIO, 'Unmute audio')
|
||||
else
|
||||
model.AddItem(MINIBROWSER_CONTEXTMENU_MUTEAUDIO, 'Mute audio');
|
||||
model.AddItem(MINIBROWSER_CONTEXTMENU_MUTEAUDIO, 'Mute audio');
|
||||
|
||||
model.AddSeparator;
|
||||
if Chromium1.CanIncZoom then
|
||||
model.AddItem(MINIBROWSER_CONTEXTMENU_INCZOOM, 'Increment zoom');
|
||||
|
||||
if Chromium1.CanDecZoom then
|
||||
model.AddItem(MINIBROWSER_CONTEXTMENU_DECZOOM, 'Decrement zoom');
|
||||
|
||||
if Chromium1.CanResetZoom then
|
||||
model.AddItem(MINIBROWSER_CONTEXTMENU_RESETZOOM, 'Reset zoom');
|
||||
end
|
||||
else
|
||||
model.AddItem(MINIBROWSER_CONTEXTMENU_SHOWDEVTOOLS, 'Show DevTools');
|
||||
@ -679,7 +691,16 @@ begin
|
||||
Chromium1.AudioMuted := False;
|
||||
|
||||
MINIBROWSER_CONTEXTMENU_MUTEAUDIO :
|
||||
Chromium1.AudioMuted := True;
|
||||
Chromium1.AudioMuted := True;
|
||||
|
||||
MINIBROWSER_CONTEXTMENU_INCZOOM :
|
||||
Chromium1.IncZoomCommand;
|
||||
|
||||
MINIBROWSER_CONTEXTMENU_DECZOOM :
|
||||
Chromium1.DecZoomCommand;
|
||||
|
||||
MINIBROWSER_CONTEXTMENU_RESETZOOM :
|
||||
Chromium1.ResetZoomCommand;
|
||||
end
|
||||
else
|
||||
case commandId of
|
||||
|
Binary file not shown.
@ -21,7 +21,7 @@
|
||||
</CompilerOptions>
|
||||
<Description Value="CEF4Delphi is an open source project created by Salvador Díaz Fau to embed Chromium-based browsers in applications made with Delphi or Lazarus/FPC."/>
|
||||
<License Value="MPL 1.1"/>
|
||||
<Version Major="117" Minor="2" Release="5"/>
|
||||
<Version Major="118" Minor="6" Release="6"/>
|
||||
<Files Count="214">
|
||||
<Item1>
|
||||
<Filename Value="..\source\uCEFAccessibilityHandler.pas"/>
|
||||
|
@ -90,6 +90,7 @@ type
|
||||
FAcceptLanguageList : ustring;
|
||||
FCookieableSchemesList : ustring;
|
||||
FCookieableSchemesExcludeDefaults : boolean;
|
||||
FChromePolicyId : ustring;
|
||||
|
||||
// Fields used to set command line switches
|
||||
FSingleProcess : boolean;
|
||||
@ -669,11 +670,10 @@ type
|
||||
property BackgroundColor : TCefColor read FBackgroundColor write FBackgroundColor;
|
||||
/// <summary>
|
||||
/// Comma delimited ordered list of language codes without any whitespace that
|
||||
/// will be used in the "Accept-Language" HTTP header. May be overridden on a
|
||||
/// per-browser basis using the TCefBrowserSettings.accept_language_list value.
|
||||
/// If both values are empty then "en-US,en" will be used. Can be overridden
|
||||
/// for individual ICefRequestContext instances via the
|
||||
/// TCefRequestContextSettings.accept_language_list value.
|
||||
/// will be used in the "Accept-Language" HTTP request header and
|
||||
/// "navigator.language" JS attribute. Can be overridden for individual
|
||||
/// ICefRequestContext instances via the
|
||||
/// TCefRequestContextSettingsCefRequestContextSettings.accept_language_list value.
|
||||
/// </summary>
|
||||
property AcceptLanguageList : ustring read FAcceptLanguageList write FAcceptLanguageList;
|
||||
/// <summary>
|
||||
@ -693,6 +693,19 @@ type
|
||||
/// </summary>
|
||||
property CookieableSchemesExcludeDefaults : boolean read FCookieableSchemesExcludeDefaults write FCookieableSchemesExcludeDefaults;
|
||||
/// <summary>
|
||||
/// <para>Specify an ID to enable Chrome policy management via Platform and OS-user
|
||||
/// policies. On Windows, this is a registry key like
|
||||
/// "SOFTWARE\\Policies\\Google\\Chrome". On MacOS, this is a bundle ID like
|
||||
/// "com.google.Chrome". On Linux, this is an absolute directory path like
|
||||
/// "/etc/opt/chrome/policies". Only supported with the Chrome runtime. See
|
||||
/// https://support.google.com/chrome/a/answer/9037717 for details.</para>
|
||||
/// <para>Chrome Browser Cloud Management integration, when enabled via the
|
||||
/// "enable-chrome-browser-cloud-management" command-line flag, will also use
|
||||
/// the specified ID. See https://support.google.com/chrome/a/answer/9116814
|
||||
/// for details.</para>
|
||||
/// </summary>
|
||||
property ChromePolicyId : ustring read FChromePolicyId write FChromePolicyId;
|
||||
/// <summary>
|
||||
/// Runs the renderer and plugins in the same process as the browser.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
@ -1727,6 +1740,7 @@ begin
|
||||
FAcceptLanguageList := '';
|
||||
FCookieableSchemesList := '';
|
||||
FCookieableSchemesExcludeDefaults := False;
|
||||
FChromePolicyId := '';
|
||||
|
||||
// Fields used to set command line switches
|
||||
FSingleProcess := False;
|
||||
@ -2674,6 +2688,7 @@ begin
|
||||
aSettings.accept_language_list := CefString(FAcceptLanguageList);
|
||||
aSettings.cookieable_schemes_list := CefString(FCookieableSchemesList);
|
||||
aSettings.cookieable_schemes_exclude_defaults := Ord(FCookieableSchemesExcludeDefaults);
|
||||
aSettings.chrome_policy_id := CefString(FChromePolicyId);
|
||||
end;
|
||||
|
||||
function TCefApplicationCore.InitializeLibrary(const aApp : ICefApp) : boolean;
|
||||
|
@ -59,6 +59,9 @@ type
|
||||
function HasView: Boolean;
|
||||
function GetClient: ICefClient;
|
||||
function GetRequestContext: ICefRequestContext;
|
||||
function CanZoom(command: TCefZoomCommand): boolean;
|
||||
procedure Zoom(command: TCefZoomCommand);
|
||||
function GetDefaultZoomLevel: Double;
|
||||
function GetZoomLevel: Double;
|
||||
procedure SetZoomLevel(const zoomLevel: Double);
|
||||
procedure RunFileDialog(mode: TCefFileDialogMode; const title, defaultFilePath: ustring; const acceptFilters: TStrings; const callback: ICefRunFileDialogCallback);
|
||||
@ -535,6 +538,21 @@ begin
|
||||
Result := TCefRequestContextRef.UnWrap(PCefBrowserHost(FData)^.get_request_context(PCefBrowserHost(FData)));
|
||||
end;
|
||||
|
||||
function TCefBrowserHostRef.CanZoom(command: TCefZoomCommand): boolean;
|
||||
begin
|
||||
Result := (PCefBrowserHost(FData)^.can_zoom(PCefBrowserHost(FData), command) <> 0);
|
||||
end;
|
||||
|
||||
procedure TCefBrowserHostRef.Zoom(command: TCefZoomCommand);
|
||||
begin
|
||||
PCefBrowserHost(FData)^.zoom(PCefBrowserHost(FData), command);
|
||||
end;
|
||||
|
||||
function TCefBrowserHostRef.GetDefaultZoomLevel: Double;
|
||||
begin
|
||||
Result := PCefBrowserHost(FData)^.get_default_zoom_level(PCefBrowserHost(FData));
|
||||
end;
|
||||
|
||||
procedure TCefBrowserHostRef.GetNavigationEntries(const visitor: ICefNavigationEntryVisitor; currentOnly: Boolean);
|
||||
begin
|
||||
PCefBrowserHost(FData)^.get_navigation_entries(PCefBrowserHost(FData), CefGetData(visitor), Ord(currentOnly));
|
||||
|
@ -345,6 +345,10 @@ type
|
||||
function GetZoomLevel : double;
|
||||
function GetZoomPct : double;
|
||||
function GetZoomStep : byte;
|
||||
function GetDefaultZoomLevel : double;
|
||||
function GetCanIncZoom: boolean;
|
||||
function GetCanDecZoom: boolean;
|
||||
function GetCanResetZoom: boolean;
|
||||
function GetIsPopUp : boolean;
|
||||
function GetWindowHandle : TCefWindowHandle;
|
||||
function GetOpenerWindowHandle : TCefWindowHandle;
|
||||
@ -1215,6 +1219,24 @@ type
|
||||
/// </summary>
|
||||
procedure ReadZoom;
|
||||
/// <summary>
|
||||
/// Execute a zoom IN command in this browser. If called on the CEF UI thread the
|
||||
/// change will be applied immediately. Otherwise, the change will be applied
|
||||
/// asynchronously on the CEF UI thread.
|
||||
/// </summary>
|
||||
procedure IncZoomCommand;
|
||||
/// <summary>
|
||||
/// Execute a zoom OUT command in this browser. If called on the CEF UI thread the
|
||||
/// change will be applied immediately. Otherwise, the change will be applied
|
||||
/// asynchronously on the CEF UI thread.
|
||||
/// </summary>
|
||||
procedure DecZoomCommand;
|
||||
/// <summary>
|
||||
/// Execute a zoom RESET command in this browser. If called on the CEF UI thread the
|
||||
/// change will be applied immediately. Otherwise, the change will be applied
|
||||
/// asynchronously on the CEF UI thread.
|
||||
/// </summary>
|
||||
procedure ResetZoomCommand;
|
||||
/// <summary>
|
||||
/// Notify the browser that the widget has been resized. The browser will
|
||||
/// first call ICefRenderHandler.GetViewRect to get the new size and then
|
||||
/// call ICefRenderHandler.OnPaint asynchronously with the updated
|
||||
@ -1833,6 +1855,27 @@ type
|
||||
/// </summary>
|
||||
property ZoomLevel : double read GetZoomLevel write SetZoomLevel;
|
||||
/// <summary>
|
||||
/// Get the default zoom level. This value will be 0.0 by default but can be
|
||||
/// configured with the Chrome runtime. This function can only be called on
|
||||
/// the CEF UI thread.
|
||||
/// </summary>
|
||||
property DefaultZoomLevel : double read GetDefaultZoomLevel;
|
||||
/// <summary>
|
||||
/// Returns true (1) if this browser can execute the zoom IN command.
|
||||
/// This function can only be called on the CEF UI thread.
|
||||
/// </summary>
|
||||
property CanIncZoom : boolean read GetCanIncZoom;
|
||||
/// <summary>
|
||||
/// Returns true (1) if this browser can execute the zoom OUT command.
|
||||
/// This function can only be called on the CEF UI thread.
|
||||
/// </summary>
|
||||
property CanDecZoom : boolean read GetCanDecZoom;
|
||||
/// <summary>
|
||||
/// Returns true (1) if this browser can execute the zoom RESET command.
|
||||
/// This function can only be called on the CEF UI thread.
|
||||
/// </summary>
|
||||
property CanResetZoom : boolean read GetCanResetZoom;
|
||||
/// <summary>
|
||||
/// Returns the current zoom value. This property is based on the CefBrowserHost.ZoomLevel value which can only be read in the CEF UI thread.
|
||||
/// </summary>
|
||||
property ZoomPct : double read GetZoomPct write SetZoomPct;
|
||||
@ -5027,8 +5070,8 @@ begin
|
||||
aSettings.databases := FOptions.Databases;
|
||||
aSettings.webgl := FOptions.Webgl;
|
||||
aSettings.background_color := FOptions.BackgroundColor;
|
||||
aSettings.accept_language_list := CefString(FOptions.AcceptLanguageList);
|
||||
aSettings.chrome_status_bubble := FOptions.ChromeStatusBubble;
|
||||
aSettings.chrome_zoom_bubble := FOptions.ChromeZoomBubble;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -5605,6 +5648,32 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TChromiumCore.GetDefaultZoomLevel : double;
|
||||
begin
|
||||
if Initialized then
|
||||
Result := Browser.Host.DefaultZoomLevel
|
||||
else
|
||||
Result := 0;
|
||||
end;
|
||||
|
||||
function TChromiumCore.GetCanIncZoom: boolean;
|
||||
begin
|
||||
Result := Initialized and
|
||||
Browser.Host.CanZoom(CEF_ZOOM_COMMAND_IN);
|
||||
end;
|
||||
|
||||
function TChromiumCore.GetCanDecZoom: boolean;
|
||||
begin
|
||||
Result := Initialized and
|
||||
Browser.Host.CanZoom(CEF_ZOOM_COMMAND_OUT);
|
||||
end;
|
||||
|
||||
function TChromiumCore.GetCanResetZoom: boolean;
|
||||
begin
|
||||
Result := Initialized and
|
||||
Browser.Host.CanZoom(CEF_ZOOM_COMMAND_RESET);
|
||||
end;
|
||||
|
||||
procedure TChromiumCore.SetZoomLevel(const aValue : double);
|
||||
begin
|
||||
if CefCurrentlyOn(TID_UI) then
|
||||
@ -5629,7 +5698,6 @@ begin
|
||||
ExecuteSetZoomStepTask(aValue);
|
||||
end;
|
||||
|
||||
// Increments the Zoom Step value and triggers the TChromium.OnZoomPctAvailable event with the new value
|
||||
procedure TChromiumCore.IncZoomStep;
|
||||
begin
|
||||
if CefCurrentlyOn(TID_UI) then
|
||||
@ -5638,7 +5706,6 @@ begin
|
||||
ExecuteUpdateZoomStepTask(True);
|
||||
end;
|
||||
|
||||
// Decrements the Zoom Step value and triggers the TChromium.OnZoomPctAvailable event with the new value
|
||||
procedure TChromiumCore.DecZoomStep;
|
||||
begin
|
||||
if CefCurrentlyOn(TID_UI) then
|
||||
@ -5647,7 +5714,6 @@ begin
|
||||
ExecuteUpdateZoomStepTask(False);
|
||||
end;
|
||||
|
||||
// Increments the Zoom Percent value and triggers the TChromium.OnZoomPctAvailable event with the new value
|
||||
procedure TChromiumCore.IncZoomPct;
|
||||
begin
|
||||
if CefCurrentlyOn(TID_UI) then
|
||||
@ -5656,7 +5722,6 @@ begin
|
||||
ExecuteUpdateZoomPctTask(True);
|
||||
end;
|
||||
|
||||
// Decrements the Zoom Percent value and triggers the TChromium.OnZoomPctAvailable event with the new value
|
||||
procedure TChromiumCore.DecZoomPct;
|
||||
begin
|
||||
if CefCurrentlyOn(TID_UI) then
|
||||
@ -5665,25 +5730,21 @@ begin
|
||||
ExecuteUpdateZoomPctTask(False);
|
||||
end;
|
||||
|
||||
// Sets the Zoom Step to the default value and triggers the TChromium.OnZoomPctAvailable event
|
||||
procedure TChromiumCore.ResetZoomStep;
|
||||
begin
|
||||
ZoomStep := ZOOM_STEP_DEF;
|
||||
end;
|
||||
|
||||
// Sets the Zoom Level to the default value and triggers the TChromium.OnZoomPctAvailable event
|
||||
procedure TChromiumCore.ResetZoomLevel;
|
||||
begin
|
||||
ZoomLevel := 0;
|
||||
end;
|
||||
|
||||
// Sets the Zoom Percent to the default value and triggers the TChromium.OnZoomPctAvailable event
|
||||
procedure TChromiumCore.ResetZoomPct;
|
||||
begin
|
||||
ZoomPct := ZoomStepValues[ZOOM_STEP_DEF];
|
||||
end;
|
||||
|
||||
// Triggers the TChromium.OnZoomPctAvailable event with the current Zoom Percent value
|
||||
procedure TChromiumCore.ReadZoom;
|
||||
begin
|
||||
if CefCurrentlyOn(TID_UI) then
|
||||
@ -5692,6 +5753,24 @@ begin
|
||||
ExecuteReadZoomTask;
|
||||
end;
|
||||
|
||||
procedure TChromiumCore.IncZoomCommand;
|
||||
begin
|
||||
if Initialized then
|
||||
Browser.Host.Zoom(CEF_ZOOM_COMMAND_IN);
|
||||
end;
|
||||
|
||||
procedure TChromiumCore.DecZoomCommand;
|
||||
begin
|
||||
if Initialized then
|
||||
Browser.Host.Zoom(CEF_ZOOM_COMMAND_OUT);
|
||||
end;
|
||||
|
||||
procedure TChromiumCore.ResetZoomCommand;
|
||||
begin
|
||||
if Initialized then
|
||||
Browser.Host.Zoom(CEF_ZOOM_COMMAND_RESET);
|
||||
end;
|
||||
|
||||
function TChromiumCore.ExecuteUpdateZoomStepTask(aInc : boolean) : boolean;
|
||||
var
|
||||
TempTask : ICefTask;
|
||||
@ -6678,9 +6757,6 @@ begin
|
||||
|
||||
TempLanguagesList := FAcceptLanguageList;
|
||||
|
||||
if (length(TempLanguagesList) = 0) and (FOptions <> nil) then
|
||||
TempLanguagesList := FOptions.AcceptLanguageList;
|
||||
|
||||
if (length(TempLanguagesList) = 0) then
|
||||
TempLanguagesList := GlobalCEFApp.AcceptLanguageList;
|
||||
|
||||
|
@ -38,8 +38,8 @@ type
|
||||
FDatabases : TCefState;
|
||||
FWebgl : TCefState;
|
||||
FBackgroundColor : TCefColor;
|
||||
FAcceptLanguageList : ustring;
|
||||
FChromeStatusBubble : TCefState;
|
||||
FChromeZoomBubble : TCefState;
|
||||
|
||||
public
|
||||
/// <summary>
|
||||
@ -123,13 +123,6 @@ type
|
||||
/// </summary>
|
||||
property BackgroundColor : TCefColor read FBackgroundColor write FBackgroundColor default 0;
|
||||
/// <summary>
|
||||
/// Comma delimited ordered list of language codes without any whitespace that
|
||||
/// will be used in the "Accept-Language" HTTP header. May be set globally
|
||||
/// using the TCefSettings.accept_language_list value. If both values are
|
||||
/// empty then "en-US,en" will be used.
|
||||
/// </summary>
|
||||
property AcceptLanguageList : ustring read FAcceptLanguageList write FAcceptLanguageList;
|
||||
/// <summary>
|
||||
/// The maximum rate in frames per second (fps) that ICefRenderHandler.OnPaint
|
||||
/// will be called for a windowless browser. The actual fps may be lower if
|
||||
/// the browser cannot generate frames at the requested rate. The minimum
|
||||
@ -147,6 +140,11 @@ type
|
||||
/// https://www.chromium.org/user-experience/status-bubble/
|
||||
/// </summary>
|
||||
property ChromeStatusBubble : TCefState read FChromeStatusBubble write FChromeStatusBubble default STATE_DEFAULT;
|
||||
/// <summary>
|
||||
/// Controls whether the Chrome zoom bubble will be shown when zooming. Only
|
||||
/// supported with the Chrome runtime.
|
||||
/// </summary>
|
||||
property ChromeZoomBubble : TCefState read FChromeZoomBubble write FChromeZoomBubble default STATE_DEFAULT;
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -167,6 +165,7 @@ begin
|
||||
FWebgl := STATE_DEFAULT;
|
||||
FBackgroundColor := 0;
|
||||
FChromeStatusBubble := STATE_DEFAULT;
|
||||
FChromeZoomBubble := STATE_DEFAULT;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
@ -36,6 +36,7 @@ type
|
||||
function GetFileName: ustring;
|
||||
function GetFileContents(const writer: ICefStreamWriter): NativeUInt;
|
||||
function GetFileNames(var names: TStrings): Integer;
|
||||
function GetFilePaths(var paths: TStrings): Integer;
|
||||
procedure SetLinkUrl(const url: ustring);
|
||||
procedure SetLinkTitle(const title: ustring);
|
||||
procedure SetLinkMetadata(const data: ustring);
|
||||
@ -120,6 +121,24 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TCefDragDataRef.GetFilePaths(var paths: TStrings): Integer;
|
||||
var
|
||||
TempSL : ICefStringList;
|
||||
begin
|
||||
Result := 0;
|
||||
|
||||
if (paths <> nil) then
|
||||
begin
|
||||
TempSL := TCefStringListOwn.Create;
|
||||
|
||||
if (PCefDragData(FData)^.get_file_paths(FData, TempSL.Handle) <> 0) then
|
||||
begin
|
||||
TempSL.CopyToStrings(paths);
|
||||
Result := paths.Count;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TCefDragDataRef.GetFragmentBaseUrl: ustring;
|
||||
begin
|
||||
Result := CefStringFreeAndGet(PCefDragData(FData)^.get_fragment_base_url(FData));
|
||||
|
@ -845,15 +845,32 @@ type
|
||||
/// </summary>
|
||||
function GetRequestContext: ICefRequestContext;
|
||||
/// <summary>
|
||||
/// Get the current zoom level. The default zoom level is 0.0. This function
|
||||
/// can only be called on the UI thread.
|
||||
/// Returns true (1) if this browser can execute the specified zoom command.
|
||||
/// This function can only be called on the UI thread.
|
||||
/// </summary>
|
||||
function CanZoom(command: TCefZoomCommand): boolean;
|
||||
/// <summary>
|
||||
/// Execute a zoom command in this browser. If called on the UI thread the
|
||||
/// change will be applied immediately. Otherwise, the change will be applied
|
||||
/// asynchronously on the UI thread.
|
||||
/// </summary>
|
||||
procedure Zoom(command: TCefZoomCommand);
|
||||
/// <summary>
|
||||
/// Get the default zoom level. This value will be 0.0 by default but can be
|
||||
/// configured with the Chrome runtime. This function can only be called on
|
||||
/// the UI thread.
|
||||
/// </summary>
|
||||
function GetDefaultZoomLevel: Double;
|
||||
/// <summary>
|
||||
/// Get the current zoom level. This function can only be called on the UI
|
||||
/// thread.
|
||||
/// </summary>
|
||||
function GetZoomLevel: Double;
|
||||
/// <summary>
|
||||
/// Change the zoom level to the specified value. Specify 0.0 to reset the
|
||||
/// zoom level. If called on the UI thread the change will be applied
|
||||
/// immediately. Otherwise, the change will be applied asynchronously on the
|
||||
/// UI thread.
|
||||
/// zoom level to the default. If called on the UI thread the change will be
|
||||
/// applied immediately. Otherwise, the change will be applied asynchronously
|
||||
/// on the UI thread.
|
||||
/// </summary>
|
||||
procedure SetZoomLevel(const zoomLevel: Double);
|
||||
/// <summary>
|
||||
@ -1305,6 +1322,12 @@ type
|
||||
/// </summary>
|
||||
property ZoomLevel : Double read GetZoomLevel write SetZoomLevel;
|
||||
/// <summary>
|
||||
/// Get the default zoom level. This value will be 0.0 by default but can be
|
||||
/// configured with the Chrome runtime. This function can only be called on
|
||||
/// the UI thread.
|
||||
/// </summary>
|
||||
property DefaultZoomLevel : Double read GetDefaultZoomLevel;
|
||||
/// <summary>
|
||||
/// Returns the request context for this browser.
|
||||
/// </summary>
|
||||
property RequestContext : ICefRequestContext read GetRequestContext;
|
||||
@ -7642,6 +7665,11 @@ type
|
||||
/// </summary>
|
||||
function GetFileNames(var names: TStrings): Integer;
|
||||
/// <summary>
|
||||
/// Retrieve the list of file paths that are being dragged into the browser
|
||||
/// window.
|
||||
/// </summary>
|
||||
function GetFilePaths(var paths: TStrings): Integer;
|
||||
/// <summary>
|
||||
/// Set the link URL that is being dragged.
|
||||
/// </summary>
|
||||
procedure SetLinkUrl(const url: ustring);
|
||||
|
@ -2638,6 +2638,18 @@ type
|
||||
CEF_GESTURE_COMMAND_FORWARD
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the zoom commands supported by ICefBrowserHost.Zoom.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_types.h">CEF source file: /include/internal/cef_types.h (cef_zoom_command_t)</see></para>
|
||||
/// </remarks>
|
||||
TCefZoomCommand = (
|
||||
CEF_ZOOM_COMMAND_OUT,
|
||||
CEF_ZOOM_COMMAND_RESET,
|
||||
CEF_ZOOM_COMMAND_IN
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the gesture commands.
|
||||
/// </summary>
|
||||
@ -3128,11 +3140,10 @@ type
|
||||
background_color : TCefColor;
|
||||
/// <summary>
|
||||
/// Comma delimited ordered list of language codes without any whitespace that
|
||||
/// will be used in the "Accept-Language" HTTP header. May be overridden on a
|
||||
/// per-browser basis using the TCefBrowserSettings.accept_language_list value.
|
||||
/// If both values are empty then "en-US,en" will be used. Can be overridden
|
||||
/// for individual ICefRequestContext instances via the
|
||||
/// TCefRequestContextSettings.accept_language_list value.
|
||||
/// will be used in the "Accept-Language" HTTP request header and
|
||||
/// "navigator.language" JS attribute. Can be overridden for individual
|
||||
/// ICefRequestContext instances via the
|
||||
/// TCefRequestContextSettingsCefRequestContextSettings.accept_language_list value.
|
||||
/// </summary>
|
||||
accept_language_list : TCefString;
|
||||
/// <summary>
|
||||
@ -3148,6 +3159,20 @@ type
|
||||
/// </summary>
|
||||
cookieable_schemes_list : TCefString;
|
||||
cookieable_schemes_exclude_defaults : integer;
|
||||
|
||||
/// <summary>
|
||||
/// <para>Specify an ID to enable Chrome policy management via Platform and OS-user
|
||||
/// policies. On Windows, this is a registry key like
|
||||
/// "SOFTWARE\\Policies\\Google\\Chrome". On MacOS, this is a bundle ID like
|
||||
/// "com.google.Chrome". On Linux, this is an absolute directory path like
|
||||
/// "/etc/opt/chrome/policies". Only supported with the Chrome runtime. See
|
||||
/// https://support.google.com/chrome/a/answer/9037717 for details.</para>
|
||||
/// <para>Chrome Browser Cloud Management integration, when enabled via the
|
||||
/// "enable-chrome-browser-cloud-management" command-line flag, will also use
|
||||
/// the specified ID. See https://support.google.com/chrome/a/answer/9116814
|
||||
/// for details.</para>
|
||||
/// </summary>
|
||||
chrome_policy_id : TCefString;
|
||||
end;
|
||||
|
||||
/// <summary>
|
||||
@ -3498,18 +3523,16 @@ type
|
||||
/// </summary>
|
||||
background_color : TCefColor;
|
||||
/// <summary>
|
||||
/// Comma delimited ordered list of language codes without any whitespace that
|
||||
/// will be used in the "Accept-Language" HTTP header. May be set globally
|
||||
/// using the TCefSettings.accept_language_list value. If both values are
|
||||
/// empty then "en-US,en" will be used.
|
||||
/// </summary>
|
||||
accept_language_list : TCefString;
|
||||
/// <summary>
|
||||
/// Controls whether the Chrome status bubble will be used. Only supported
|
||||
/// with the Chrome runtime. For details about the status bubble see
|
||||
/// https://www.chromium.org/user-experience/status-bubble/
|
||||
/// </summary>
|
||||
chrome_status_bubble : TCefState;
|
||||
/// <summary>
|
||||
/// Controls whether the Chrome zoom bubble will be shown when zooming. Only
|
||||
/// supported with the Chrome runtime.
|
||||
/// </summary>
|
||||
chrome_zoom_bubble : TCefState;
|
||||
end;
|
||||
|
||||
/// <summary>
|
||||
@ -3916,6 +3939,12 @@ type
|
||||
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_types.h">CEF source file: /include/internal/cef_types.h (cef_content_setting_types_t)</see></para>
|
||||
/// </remarks>
|
||||
TCefContentSettingTypes = (
|
||||
/// <summary>
|
||||
/// This setting governs whether cookies are enabled by the user in the
|
||||
/// provided context. However, it may be overridden by other settings. This
|
||||
/// enum should NOT be read directly to determine whether cookies are enabled;
|
||||
/// the client should instead rely on the CookieSettings API.
|
||||
/// </summary>
|
||||
CEF_CONTENT_SETTING_TYPE_COOKIES = 0,
|
||||
CEF_CONTENT_SETTING_TYPE_IMAGES,
|
||||
CEF_CONTENT_SETTING_TYPE_JAVASCRIPT,
|
||||
@ -3934,6 +3963,12 @@ type
|
||||
CEF_CONTENT_SETTING_TYPE_PROTOCOL_HANDLERS,
|
||||
CEF_CONTENT_SETTING_TYPE_DEPRECATED_PPAPI_BROKER,
|
||||
CEF_CONTENT_SETTING_TYPE_AUTOMATIC_DOWNLOADS,
|
||||
|
||||
/// <summary>
|
||||
/// Advanced device-specific functions on MIDI devices. MIDI-SysEx
|
||||
/// communications can be used for changing the MIDI device's persistent state
|
||||
/// such as firmware.
|
||||
/// </summary>
|
||||
CEF_CONTENT_SETTING_TYPE_MIDI_SYSEX,
|
||||
CEF_CONTENT_SETTING_TYPE_SSL_CERT_DECISIONS,
|
||||
CEF_CONTENT_SETTING_TYPE_PROTECTED_MEDIA_IDENTIFIER,
|
||||
@ -3953,8 +3988,9 @@ type
|
||||
/// </summary>
|
||||
CEF_CONTENT_SETTING_TYPE_ADS_DATA,
|
||||
/// <summary>
|
||||
/// This is special-cased in the permissions layer to always allow, and as
|
||||
/// such doesn't have associated prefs data.
|
||||
/// MIDI stands for Musical Instrument Digital Interface. It is a standard
|
||||
/// that allows electronic musical instruments, computers, and other devices
|
||||
/// to communicate with each other.
|
||||
/// </summary>
|
||||
CEF_CONTENT_SETTING_TYPE_MIDI,
|
||||
/// <summary>
|
||||
@ -4021,10 +4057,6 @@ type
|
||||
/// </summary>
|
||||
CEF_CONTENT_SETTING_TYPE_IDLE_DETECTION,
|
||||
/// <summary>
|
||||
/// Setting for enabling auto-select of all screens for getDisplayMediaSet.
|
||||
/// </summary>
|
||||
CEF_CONTENT_SETTING_TYPE_GET_DISPLAY_MEDIA_SET_SELECT_ALL_SCREENS,
|
||||
/// <summary>
|
||||
/// Content settings for access to serial ports. The "guard" content setting
|
||||
/// stores whether to allow sites to ask for permission to access a port. The
|
||||
/// permissions granted to access particular ports are stored in the "chooser
|
||||
@ -4133,11 +4165,12 @@ type
|
||||
/// </summary>
|
||||
CEF_CONTENT_SETTING_TYPE_WINDOW_MANAGEMENT,
|
||||
/// <summary>
|
||||
/// Stores whether to allow insecure websites to make local network requests.
|
||||
/// See also: https://wicg.github.io/local-network-access
|
||||
/// Stores whether to allow insecure websites to make private network
|
||||
/// requests.
|
||||
/// See also: https://wicg.github.io/cors-rfc1918
|
||||
/// Set through enterprise policies only.
|
||||
/// </summary>
|
||||
CEF_CONTENT_SETTING_TYPE_INSECURE_LOCAL_NETWORK,
|
||||
CEF_CONTENT_SETTING_TYPE_INSECURE_PRIVATE_NETWORK,
|
||||
/// <summary>
|
||||
/// Content setting which stores whether or not a site can access low-level
|
||||
/// locally installed font data using the Local Fonts Access API.
|
||||
@ -4276,13 +4309,29 @@ type
|
||||
/// </summary>
|
||||
CEF_CONTENT_SETTING_TYPE_HTTPS_ENFORCED,
|
||||
/// <summary>
|
||||
/// Setting for enabling the `getAllScreensMedia` API. Spec link:
|
||||
/// https://github.com/screen-share/capture-all-screens
|
||||
/// </summary>
|
||||
CEF_CONTENT_SETTING_TYPE_ALL_SCREEN_CAPTURE,
|
||||
/// <summary>
|
||||
/// Stores per origin metadata for cookie controls.
|
||||
/// </summary>
|
||||
CEF_CONTENT_SETTING_TYPE_COOKIE_CONTROLS_METADATA,
|
||||
/// <summary>
|
||||
/// Setting for supporting 3PCD.
|
||||
/// Content Setting for 3PC accesses granted via 3PC deprecation trial.
|
||||
/// </summary>
|
||||
CEF_CONTENT_SETTING_TYPE_TPCD_SUPPORT,
|
||||
/// <summary>
|
||||
/// Content setting used to indicate whether entering picture-in-picture
|
||||
/// automatically should be enabled.
|
||||
/// </summary>
|
||||
CEF_CONTENT_SETTING_TYPE_AUTO_PICTURE_IN_PICTURE,
|
||||
/// <summary>
|
||||
/// Content Setting for 3PC accesses granted by metadata delivered via the
|
||||
/// component updater service. This type will only be used when
|
||||
/// `net::features::kTpcdMetadataGrants` is enabled.
|
||||
/// </summary>
|
||||
CEF_CONTENT_SETTING_TYPE_TPCD_METADATA_GRANTS,
|
||||
CEF_CONTENT_SETTING_TYPE_NUM_TYPES
|
||||
);
|
||||
|
||||
@ -5878,6 +5927,7 @@ type
|
||||
get_file_name : function(self: PCefDragData): PCefStringUserFree; stdcall;
|
||||
get_file_contents : function(self: PCefDragData; writer: PCefStreamWriter): NativeUInt; stdcall;
|
||||
get_file_names : function(self: PCefDragData; names: TCefStringList): Integer; stdcall;
|
||||
get_file_paths : function(self: PCefDragData; paths: TCefStringList): Integer; stdcall;
|
||||
set_link_url : procedure(self: PCefDragData; const url: PCefString); stdcall;
|
||||
set_link_title : procedure(self: PCefDragData; const title: PCefString); stdcall;
|
||||
set_link_metadata : procedure(self: PCefDragData; const data: PCefString); stdcall;
|
||||
@ -6830,6 +6880,9 @@ type
|
||||
has_view : function(self: PCefBrowserHost): Integer; stdcall;
|
||||
get_client : function(self: PCefBrowserHost): PCefClient; stdcall;
|
||||
get_request_context : function(self: PCefBrowserHost): PCefRequestContext; stdcall;
|
||||
can_zoom : function(self: PCefBrowserHost; command: TCefZoomCommand): Integer; stdcall;
|
||||
zoom : procedure(self: PCefBrowserHost; command: TCefZoomCommand); stdcall;
|
||||
get_default_zoom_level : function(self: PCefBrowserHost): Double; stdcall;
|
||||
get_zoom_level : function(self: PCefBrowserHost): Double; stdcall;
|
||||
set_zoom_level : procedure(self: PCefBrowserHost; zoomLevel: Double); stdcall;
|
||||
run_file_dialog : procedure(self: PCefBrowserHost; mode: TCefFileDialogMode; const title, default_file_path: PCefString; accept_filters: TCefStringList; callback: PCefRunFileDialogCallback); stdcall;
|
||||
|
@ -1,9 +1,9 @@
|
||||
CEF_SUPPORTED_VERSION_MAJOR = 117;
|
||||
CEF_SUPPORTED_VERSION_MINOR = 2;
|
||||
CEF_SUPPORTED_VERSION_RELEASE = 5;
|
||||
CEF_SUPPORTED_VERSION_MAJOR = 118;
|
||||
CEF_SUPPORTED_VERSION_MINOR = 6;
|
||||
CEF_SUPPORTED_VERSION_RELEASE = 6;
|
||||
CEF_SUPPORTED_VERSION_BUILD = 0;
|
||||
|
||||
CEF_CHROMEELF_VERSION_MAJOR = CEF_SUPPORTED_VERSION_MAJOR;
|
||||
CEF_CHROMEELF_VERSION_MINOR = 0;
|
||||
CEF_CHROMEELF_VERSION_RELEASE = 5938;
|
||||
CEF_CHROMEELF_VERSION_BUILD = 152;
|
||||
CEF_CHROMEELF_VERSION_RELEASE = 5993;
|
||||
CEF_CHROMEELF_VERSION_BUILD = 96;
|
||||
|
@ -2,9 +2,9 @@
|
||||
"UpdateLazPackages" : [
|
||||
{
|
||||
"ForceNotify" : true,
|
||||
"InternalVersion" : 529,
|
||||
"InternalVersion" : 530,
|
||||
"Name" : "cef4delphi_lazarus.lpk",
|
||||
"Version" : "117.2.5"
|
||||
"Version" : "118.6.6"
|
||||
}
|
||||
],
|
||||
"UpdatePackageData" : {
|
||||
|
Loading…
Reference in New Issue
Block a user