Skip to content

Commit

Permalink
Update to CEF 85.3.5
Browse files Browse the repository at this point in the history
- Added the workaround to the issue #301 to the MiniBrowser demo.
  • Loading branch information
salvadordf committed Sep 10, 2020
1 parent d444bb2 commit c7d0200
Show file tree
Hide file tree
Showing 15 changed files with 165 additions and 31 deletions.
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -3,10 +3,10 @@ CEF4Delphi is an open source project created by Salvador Díaz Fau to embed Chro

CEF4Delphi is based on DCEF3, made by Henri Gourvest. The original license of DCEF3 still applies to CEF4Delphi. Read the license terms in the first lines of any *.pas file.

CEF4Delphi uses CEF 85.2.11 which includes Chromium 85.0.4183.83.
CEF4Delphi uses CEF 85.3.5 which includes Chromium 85.0.4183.102.
The CEF binaries used by CEF4Delphi are available for download at spotify :
* [32 bits](http://opensource.spotify.com/cefbuilds/cef_binary_85.2.11%2Bg0202816%2Bchromium-85.0.4183.83_windows32.tar.bz2)
* [64 bits](http://opensource.spotify.com/cefbuilds/cef_binary_85.2.11%2Bg0202816%2Bchromium-85.0.4183.83_windows64.tar.bz2)
* [32 bits](http://opensource.spotify.com/cefbuilds/cef_binary_85.3.5%2Bgd7ff358%2Bchromium-85.0.4183.102_windows32.tar.bz2)
* [64 bits](http://opensource.spotify.com/cefbuilds/cef_binary_85.3.5%2Bgd7ff358%2Bchromium-85.0.4183.102_windows64.tar.bz2)


CEF4Delphi was developed and tested on Delphi 10.4 and it has been tested in Delphi 7, Delphi XE, Delphi 10, Delphi 10.2, Delphi 10.3 and Lazarus 2.0.10/FPC 3.2.0. CEF4Delphi includes VCL, FireMonkey (FMX) and Lazarus components.
Expand Down
4 changes: 4 additions & 0 deletions demos/Delphi_VCL/MiniBrowser/uMiniBrowser.pas
Expand Up @@ -283,6 +283,10 @@ procedure CreateGlobalCEFApp;
GlobalCEFApp.LogSeverity := LOGSEVERITY_INFO;
GlobalCEFApp.cache := 'cache';
GlobalCEFApp.EnablePrintPreview := True;

// Workaround for the issue #301
// https://github.com/salvadordf/CEF4Delphi/issues/301
GlobalCEFApp.DisableFeatures := 'OutOfBlinkCors';
end;

procedure TMiniBrowserFrm.BackBtnClick(Sender: TObject);
Expand Down
72 changes: 71 additions & 1 deletion demos/Delphi_VCL/ToolBoxBrowser2/ToolBoxBrowser2.dproj
@@ -1,7 +1,7 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{699A2237-C3B7-4C84-AC7C-9F9BC9BCC85E}</ProjectGuid>
<ProjectVersion>18.8</ProjectVersion>
<ProjectVersion>19.0</ProjectVersion>
<FrameworkType>VCL</FrameworkType>
<MainSource>ToolBoxBrowser2.dpr</MainSource>
<Base>True</Base>
Expand Down Expand Up @@ -654,6 +654,16 @@
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Launch2x">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Launch768x1024">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
Expand All @@ -665,6 +675,16 @@
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_LaunchDark2x">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch1125">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
Expand Down Expand Up @@ -764,6 +784,16 @@
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch2x">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch320">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
Expand All @@ -775,6 +805,16 @@
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch3x">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch640">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
Expand Down Expand Up @@ -819,6 +859,26 @@
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_LaunchDark2x">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_LaunchDark3x">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectAndroidManifest">
<Platform Name="Android">
<Operation>1</Operation>
Expand Down Expand Up @@ -866,6 +926,16 @@
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSLaunchScreen">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen</RemoteDir>
<Operation>64</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen</RemoteDir>
<Operation>64</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSResource">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
Expand Down
2 changes: 1 addition & 1 deletion demos/Lazarus/MiniBrowser/MiniBrowser.lps
Expand Up @@ -23,7 +23,7 @@
<IsVisibleTab Value="True"/>
<EditorIndex Value="1"/>
<TopLine Value="293"/>
<CursorPos X="44" Y="306"/>
<CursorPos X="52" Y="310"/>
<UsageCount Value="27"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
Expand Down
6 changes: 5 additions & 1 deletion demos/Lazarus/MiniBrowser/uMiniBrowser.pas
Expand Up @@ -303,7 +303,11 @@ procedure CreateGlobalCEFApp;
GlobalCEFApp.cache := 'cache';
GlobalCEFApp.LogFile := 'debug.log';
GlobalCEFApp.LogSeverity := LOGSEVERITY_INFO;
GlobalCEFApp.EnablePrintPreview := True;
GlobalCEFApp.EnablePrintPreview := True;

// Workaround for the issue #301
// https://github.com/salvadordf/CEF4Delphi/issues/301
GlobalCEFApp.DisableFeatures := 'OutOfBlinkCors';
end;

procedure TMiniBrowserFrm.BackBtnClick(Sender: TObject);
Expand Down
2 changes: 1 addition & 1 deletion packages/cef4delphi_lazarus.lpk
Expand Up @@ -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="85" Minor="2" Release="11"/>
<Version Major="85" Minor="3" Release="5"/>
<Files Count="189">
<Item1>
<Filename Value="..\source\uCEFAccessibilityHandler.pas"/>
Expand Down
6 changes: 3 additions & 3 deletions source/uCEFApplicationCore.pas
Expand Up @@ -58,14 +58,14 @@ interface

const
CEF_SUPPORTED_VERSION_MAJOR = 85;
CEF_SUPPORTED_VERSION_MINOR = 2;
CEF_SUPPORTED_VERSION_RELEASE = 11;
CEF_SUPPORTED_VERSION_MINOR = 3;
CEF_SUPPORTED_VERSION_RELEASE = 5;
CEF_SUPPORTED_VERSION_BUILD = 0;

CEF_CHROMEELF_VERSION_MAJOR = 85;
CEF_CHROMEELF_VERSION_MINOR = 0;
CEF_CHROMEELF_VERSION_RELEASE = 4183;
CEF_CHROMEELF_VERSION_BUILD = 83;
CEF_CHROMEELF_VERSION_BUILD = 102;

{$IFDEF MSWINDOWS}
LIBCEF_DLL = 'libcef.dll';
Expand Down
4 changes: 2 additions & 2 deletions source/uCEFChromiumCore.pas
Expand Up @@ -138,7 +138,7 @@ TChromiumCore = class(TComponent, IChromiumEvents)
FAcceptLanguageList : ustring;
FAcceptCookies : TCefCookiePref;
FBlock3rdPartyCookies : boolean;
FDefaultWindowInfoExStyle : cardinal;
FDefaultWindowInfoExStyle : DWORD;
FNetworkPredictions : TCefNetworkPredictionOptions;
FQuicAllowed : boolean;
FJavascriptEnabled : boolean;
Expand Down Expand Up @@ -880,7 +880,7 @@ TChromiumCore = class(TComponent, IChromiumEvents)
property AcceptCookies : TCefCookiePref read FAcceptCookies write SetAcceptCookies;
property Block3rdPartyCookies : boolean read FBlock3rdPartyCookies write SetBlock3rdPartyCookies;
property MultiBrowserMode : boolean read FMultiBrowserMode write SetMultiBrowserMode;
property DefaultWindowInfoExStyle : cardinal read FDefaultWindowInfoExStyle write FDefaultWindowInfoExStyle;
property DefaultWindowInfoExStyle : DWORD read FDefaultWindowInfoExStyle write FDefaultWindowInfoExStyle;
property Offline : boolean read FOffline write SetOffline;
property NetworkPredictions : TCefNetworkPredictionOptions read FNetworkPredictions write SetNetworkPredictions;
property QuicAllowed : boolean read FQuicAllowed write SetQuicAllowed;
Expand Down
2 changes: 2 additions & 0 deletions source/uCEFInterfaces.pas
Expand Up @@ -2894,6 +2894,7 @@ TCefMediaSourceInfo = record
procedure OnWindowCreated(const window: ICefWindow);
procedure OnWindowDestroyed(const window: ICefWindow);
procedure OnGetParentWindow(const window: ICefWindow; var is_menu, can_activate_menu: boolean; var aResult : ICefWindow);
procedure OnGetInitialBounds(const window: ICefWindow; var aResult : TCefRect);
procedure OnIsFrameless(const window: ICefWindow; var aResult : boolean);
procedure OnCanResize(const window: ICefWindow; var aResult : boolean);
procedure OnCanMaximize(const window: ICefWindow; var aResult : boolean);
Expand All @@ -2908,6 +2909,7 @@ TCefMediaSourceInfo = record
procedure doOnWindowCreated(const window: ICefWindow);
procedure doOnWindowDestroyed(const window: ICefWindow);
procedure doOnGetParentWindow(const window: ICefWindow; var is_menu, can_activate_menu: boolean; var aResult : ICefWindow);
procedure doOnGetInitialBounds(const window: ICefWindow; var aResult : TCefRect);
procedure doOnIsFrameless(const window: ICefWindow; var aResult : boolean);
procedure doOnCanResize(const window: ICefWindow; var aResult : boolean);
procedure doOnCanMaximize(const window: ICefWindow; var aResult : boolean);
Expand Down
12 changes: 6 additions & 6 deletions source/uCEFMiscFunctions.pas
Expand Up @@ -140,9 +140,9 @@ function cef_string_utf16_copy(const src: PChar16; src_len: NativeUInt; output:
function cef_string_copy(const src: PCefChar; src_len: NativeUInt; output: PCefString): Integer;

{$IFDEF MSWINDOWS}
procedure WindowInfoAsChild(var aWindowInfo : TCefWindowInfo; aParent : TCefWindowHandle; aRect : TRect; const aWindowName : ustring = ''; aExStyle : cardinal = 0);
procedure WindowInfoAsPopUp(var aWindowInfo : TCefWindowInfo; aParent : TCefWindowHandle; const aWindowName : ustring = ''; aExStyle : cardinal = 0);
procedure WindowInfoAsWindowless(var aWindowInfo : TCefWindowInfo; aParent : TCefWindowHandle; const aWindowName : ustring = ''; aExStyle : cardinal = 0);
procedure WindowInfoAsChild(var aWindowInfo : TCefWindowInfo; aParent : TCefWindowHandle; aRect : TRect; const aWindowName : ustring = ''; aExStyle : DWORD = 0);
procedure WindowInfoAsPopUp(var aWindowInfo : TCefWindowInfo; aParent : TCefWindowHandle; const aWindowName : ustring = ''; aExStyle : DWORD = 0);
procedure WindowInfoAsWindowless(var aWindowInfo : TCefWindowInfo; aParent : TCefWindowHandle; const aWindowName : ustring = ''; aExStyle : DWORD = 0);
{$ENDIF}

{$IFDEF MACOS}
Expand Down Expand Up @@ -626,7 +626,7 @@ function cef_string_copy(const src: PCefChar; src_len: NativeUInt; output: PCefS
end;

{$IFDEF MSWINDOWS}
procedure WindowInfoAsChild(var aWindowInfo : TCefWindowInfo; aParent : TCefWindowHandle; aRect : TRect; const aWindowName : ustring; aExStyle : cardinal);
procedure WindowInfoAsChild(var aWindowInfo : TCefWindowInfo; aParent : TCefWindowHandle; aRect : TRect; const aWindowName : ustring; aExStyle : DWORD);
begin
aWindowInfo.ex_style := aExStyle;
aWindowInfo.window_name := CefString(aWindowName);
Expand All @@ -643,7 +643,7 @@ procedure WindowInfoAsChild(var aWindowInfo : TCefWindowInfo; aParent : TCefWind
aWindowInfo.window := 0;
end;

procedure WindowInfoAsPopUp(var aWindowInfo : TCefWindowInfo; aParent : TCefWindowHandle; const aWindowName : ustring; aExStyle : cardinal);
procedure WindowInfoAsPopUp(var aWindowInfo : TCefWindowInfo; aParent : TCefWindowHandle; const aWindowName : ustring; aExStyle : DWORD);
begin
aWindowInfo.ex_style := aExStyle;
aWindowInfo.window_name := CefString(aWindowName);
Expand All @@ -660,7 +660,7 @@ procedure WindowInfoAsPopUp(var aWindowInfo : TCefWindowInfo; aParent : TCefWind
aWindowInfo.window := 0;
end;

procedure WindowInfoAsWindowless(var aWindowInfo : TCefWindowInfo; aParent : TCefWindowHandle; const aWindowName : ustring; aExStyle : cardinal);
procedure WindowInfoAsWindowless(var aWindowInfo : TCefWindowInfo; aParent : TCefWindowHandle; const aWindowName : ustring; aExStyle : DWORD);
begin
aWindowInfo.ex_style := aExStyle;
aWindowInfo.window_name := CefString(aWindowName);
Expand Down
1 change: 1 addition & 0 deletions source/uCEFTypes.pas
Expand Up @@ -3358,6 +3358,7 @@ TCefWindowDelegate = record
on_window_created : procedure(self: PCefWindowDelegate; window: PCefWindow); stdcall;
on_window_destroyed : procedure(self: PCefWindowDelegate; window: PCefWindow); stdcall;
get_parent_window : function(self: PCefWindowDelegate; window: PCefWindow; is_menu, can_activate_menu: PInteger): PCefWindow; stdcall;
get_initial_bounds : function(self: PCefWindowDelegate; window: PCefWindow): TCefRect; stdcall;
is_frameless : function(self: PCefWindowDelegate; window: PCefWindow): Integer; stdcall;
can_resize : function(self: PCefWindowDelegate; window: PCefWindow): Integer; stdcall;
can_maximize : function(self: PCefWindowDelegate; window: PCefWindow): Integer; stdcall;
Expand Down
21 changes: 11 additions & 10 deletions source/uCEFViewsFrameworkEvents.pas
Expand Up @@ -87,16 +87,17 @@ interface
TOnMenuButtonPressedEvent = procedure(const Sender: TObject; const menu_button: ICefMenuButton; const screen_point: TCefPoint; const button_pressed_lock: ICefMenuButtonPressedLock) of object;

// ICefWindowDelegate
TOnWindowCreatedEvent = procedure(const Sender: TObject; const window: ICefWindow) of object;
TOnWindowDestroyedEvent = procedure(const Sender: TObject; const window: ICefWindow) of object;
TOnGetParentWindowEvent = procedure(const Sender: TObject; const window: ICefWindow; var is_menu, can_activate_menu: boolean; var aResult : ICefWindow) of object;
TOnIsFramelessEvent = procedure(const Sender: TObject; const window: ICefWindow; var aResult : boolean) of object;
TOnCanResizeEvent = procedure(const Sender: TObject; const window: ICefWindow; var aResult : boolean) of object;
TOnCanMaximizeEvent = procedure(const Sender: TObject; const window: ICefWindow; var aResult : boolean) of object;
TOnCanMinimizeEvent = procedure(const Sender: TObject; const window: ICefWindow; var aResult : boolean) of object;
TOnCanCloseEvent = procedure(const Sender: TObject; const window: ICefWindow; var aResult : boolean) of object;
TOnAcceleratorEvent = procedure(const Sender: TObject; const window: ICefWindow; command_id: Integer; var aResult : boolean) of object;
TOnWindowKeyEventEvent = procedure(const Sender: TObject; const window: ICefWindow; const event: TCefKeyEvent; var aResult : boolean) of object;
TOnWindowCreatedEvent = procedure(const Sender: TObject; const window: ICefWindow) of object;
TOnWindowDestroyedEvent = procedure(const Sender: TObject; const window: ICefWindow) of object;
TOnGetParentWindowEvent = procedure(const Sender: TObject; const window: ICefWindow; var is_menu, can_activate_menu: boolean; var aResult : ICefWindow) of object;
TOnGetInitialBoundsEvent = procedure(const Sender: TObject; const window: ICefWindow; var aResult : TCefRect) of object;
TOnIsFramelessEvent = procedure(const Sender: TObject; const window: ICefWindow; var aResult : boolean) of object;
TOnCanResizeEvent = procedure(const Sender: TObject; const window: ICefWindow; var aResult : boolean) of object;
TOnCanMaximizeEvent = procedure(const Sender: TObject; const window: ICefWindow; var aResult : boolean) of object;
TOnCanMinimizeEvent = procedure(const Sender: TObject; const window: ICefWindow; var aResult : boolean) of object;
TOnCanCloseEvent = procedure(const Sender: TObject; const window: ICefWindow; var aResult : boolean) of object;
TOnAcceleratorEvent = procedure(const Sender: TObject; const window: ICefWindow; command_id: Integer; var aResult : boolean) of object;
TOnWindowKeyEventEvent = procedure(const Sender: TObject; const window: ICefWindow; const event: TCefKeyEvent; var aResult : boolean) of object;

implementation

Expand Down

0 comments on commit c7d0200

Please sign in to comment.