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

Update to CEF 79.1.36

- Added missing Windows messages to the application service and restored the SendCompMessage function in the FMXExternalPumpBrowser demo.
- Removed TCEFSentinel from the JSEval and JSRTTIExtension demos.
This commit is contained in:
Salvador Díaz Fau
2020-01-30 12:08:50 +01:00
parent b7a4cdd786
commit 23663b10e2
14 changed files with 513 additions and 88 deletions

View File

@ -3,10 +3,10 @@ CEF4Delphi is an open source project created by Salvador D
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 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 79.1.35 which includes Chromium 79.0.3945.130. CEF4Delphi uses CEF 79.1.36 which includes Chromium 79.0.3945.130.
The CEF binaries used by CEF4Delphi are available for download at spotify : The CEF binaries used by CEF4Delphi are available for download at spotify :
* [32 bits](http://opensource.spotify.com/cefbuilds/cef_binary_79.1.35%2Bgfebbb4a%2Bchromium-79.0.3945.130_windows32.tar.bz2) * [32 bits](http://opensource.spotify.com/cefbuilds/cef_binary_79.1.36%2Bg90301bd%2Bchromium-79.0.3945.130_windows32.tar.bz2)
* [64 bits](http://opensource.spotify.com/cefbuilds/cef_binary_79.1.35%2Bgfebbb4a%2Bchromium-79.0.3945.130_windows64.tar.bz2) * [64 bits](http://opensource.spotify.com/cefbuilds/cef_binary_79.1.36%2Bg90301bd%2Bchromium-79.0.3945.130_windows64.tar.bz2)
CEF4Delphi was developed and tested on Delphi 10.3 Rio and it has been tested in Delphi 7, Delphi XE, Delphi 10, Delphi 10.2 and Lazarus 2.0.6/FPC 3.0.4. CEF4Delphi includes VCL, FireMonkey (FMX) and Lazarus components. CEF4Delphi was developed and tested on Delphi 10.3 Rio and it has been tested in Delphi 7, Delphi XE, Delphi 10, Delphi 10.2 and Lazarus 2.0.6/FPC 3.0.4. CEF4Delphi includes VCL, FireMonkey (FMX) and Lazarus components.

View File

@ -81,7 +81,7 @@ uses
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
Winapi.Messages, Winapi.Windows, Winapi.Messages, Winapi.Windows,
{$ENDIF} {$ENDIF}
uCEFConstants; uCEFApplication, uCEFConstants;
class procedure TFMXApplicationService.AddPlatformService; class procedure TFMXApplicationService.AddPlatformService;
begin begin
@ -156,6 +156,23 @@ begin
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
if PeekMessage(TempMsg, 0, 0, 0, PM_NOREMOVE) then if PeekMessage(TempMsg, 0, 0, 0, PM_NOREMOVE) then
case TempMsg.Message of case TempMsg.Message of
WM_MOVE,
WM_MOVING :
if not(Application.Terminated) and
(Application.MainForm <> nil) and
(Application.MainForm is TFMXExternalPumpBrowserFrm) then
TFMXExternalPumpBrowserFrm(Application.MainForm).NotifyMoveOrResizeStarted;
WM_ENTERMENULOOP :
if (TempMsg.wParam = 0) and
(GlobalCEFApp <> nil) then
GlobalCEFApp.OsmodalLoop := True;
WM_EXITMENULOOP :
if (TempMsg.wParam = 0) and
(GlobalCEFApp <> nil) then
GlobalCEFApp.OsmodalLoop := False;
WM_CAPTURECHANGED, WM_CAPTURECHANGED,
WM_CANCELMODE : WM_CANCELMODE :
if not(Application.Terminated) and if not(Application.Terminated) and
@ -180,6 +197,12 @@ begin
(Application.MainForm <> nil) and (Application.MainForm <> nil) and
(Application.MainForm is TFMXExternalPumpBrowserFrm) then (Application.MainForm is TFMXExternalPumpBrowserFrm) then
TFMXExternalPumpBrowserFrm(Application.MainForm).HandleSYSKEYUP(TempMsg); TFMXExternalPumpBrowserFrm(Application.MainForm).HandleSYSKEYUP(TempMsg);
CEF_PENDINGRESIZE :
if not(Application.Terminated) and
(Application.MainForm <> nil) and
(Application.MainForm is TFMXExternalPumpBrowserFrm) then
TFMXExternalPumpBrowserFrm(Application.MainForm).DoResize;
end; end;
{$ENDIF} {$ENDIF}

View File

@ -88,7 +88,7 @@ type
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
procedure chrmosrPaint(Sender: TObject; const browser: ICefBrowser; type_: TCefPaintElementType; dirtyRectsCount: NativeUInt; const dirtyRects: PCefRectArray; const buffer: Pointer; width, height: Integer); procedure chrmosrPaint(Sender: TObject; const browser: ICefBrowser; type_: TCefPaintElementType; dirtyRectsCount: NativeUInt; const dirtyRects: PCefRectArray; const buffer: Pointer; width, height: Integer);
procedure chrmosrCursorChange(Sender: TObject; const browser: ICefBrowser; cursor: TCefCursorHandle; cursorType: TCefCursorType; const customCursorInfo: PCefCursorInfo); procedure chrmosrCursorChange(Sender: TObject; const browser: ICefBrowser; cursor: HICON; cursorType: TCefCursorType; const customCursorInfo: PCefCursorInfo);
procedure chrmosrGetViewRect(Sender: TObject; const browser: ICefBrowser; var rect: TCefRect); procedure chrmosrGetViewRect(Sender: TObject; const browser: ICefBrowser; var rect: TCefRect);
procedure chrmosrGetScreenPoint(Sender: TObject; const browser: ICefBrowser; viewX, viewY: Integer; var screenX, screenY: Integer; out Result: Boolean); procedure chrmosrGetScreenPoint(Sender: TObject; const browser: ICefBrowser; viewX, viewY: Integer; var screenX, screenY: Integer; out Result: Boolean);
procedure chrmosrGetScreenInfo(Sender: TObject; const browser: ICefBrowser; var screenInfo: TCefScreenInfo; out Result: Boolean); procedure chrmosrGetScreenInfo(Sender: TObject; const browser: ICefBrowser; var screenInfo: TCefScreenInfo; out Result: Boolean);
@ -125,12 +125,13 @@ type
procedure LoadURL; procedure LoadURL;
function getModifiers(Shift: TShiftState): TCefEventFlags; function getModifiers(Shift: TShiftState): TCefEventFlags;
function GetButton(Button: TMouseButton): TCefMouseButtonType; function GetButton(Button: TMouseButton): TCefMouseButtonType;
function GetMousePosition(var aPoint : TPointF) : boolean;
procedure InitializeLastClick; procedure InitializeLastClick;
function CancelPreviousClick(const x, y : single; var aCurrentTime : integer) : boolean; function CancelPreviousClick(const x, y : single; var aCurrentTime : integer) : boolean;
function SendCompMessage(aMsg : cardinal; wParam : cardinal = 0; lParam : integer = 0) : boolean;
public public
procedure DoResize; procedure DoResize;
procedure DoBrowserCreated;
procedure NotifyMoveOrResizeStarted; procedure NotifyMoveOrResizeStarted;
procedure SendCaptureLostEvent; procedure SendCaptureLostEvent;
procedure HandleSYSCHAR(const aMessage : TMsg); procedure HandleSYSCHAR(const aMessage : TMsg);
@ -412,6 +413,26 @@ begin
end; end;
end; end;
function TFMXExternalPumpBrowserFrm.GetMousePosition(var aPoint : TPointF) : boolean;
begin
{$IFDEF DELPHI17_UP}
if (FMouseWheelService <> nil) then
begin
aPoint := FMouseWheelService.GetMousePos;
Result := True;
end
else
begin
aPoint.x := 0;
aPoint.y := 0;
Result := False;
end;
{$ELSE}
TempPointF := Platform.GetMousePos;
Result := True;
{$ENDIF}
end;
procedure TFMXExternalPumpBrowserFrm.Panel1MouseLeave(Sender: TObject); procedure TFMXExternalPumpBrowserFrm.Panel1MouseLeave(Sender: TObject);
var var
TempEvent : TCefMouseEvent; TempEvent : TCefMouseEvent;
@ -419,21 +440,11 @@ var
TempPointF : TPointF; TempPointF : TPointF;
TempTime : integer; TempTime : integer;
begin begin
if (GlobalCEFApp <> nil) and (chrmosr <> nil) then if (GlobalCEFApp <> nil) and (chrmosr <> nil) and GetMousePosition(TempPointF) then
begin begin
{$IFDEF DELPHI17_UP}
if (FMouseWheelService <> nil) then
TempPointF := FMouseWheelService.GetMousePos
else
exit;
{$ELSE}
TempPointF := Platform.GetMousePos;
{$ENDIF}
TempPoint.x := round(TempPointF.x); TempPoint.x := round(TempPointF.x);
TempPoint.y := round(TempPointF.y); TempPoint.y := round(TempPointF.y);
TempPoint := Panel1.ScreenToclient(TempPoint);
TempPoint := Panel1.ScreenToclient(TempPoint);
if CancelPreviousClick(TempPoint.x, TempPoint.y, TempTime) then InitializeLastClick; if CancelPreviousClick(TempPoint.x, TempPoint.y, TempTime) then InitializeLastClick;
@ -486,17 +497,8 @@ var
TempEvent : TCefMouseEvent; TempEvent : TCefMouseEvent;
TempPointF : TPointF; TempPointF : TPointF;
begin begin
if Panel1.IsFocused and (GlobalCEFApp <> nil) and (chrmosr <> nil) then if Panel1.IsFocused and (GlobalCEFApp <> nil) and (chrmosr <> nil) and GetMousePosition(TempPointF) then
begin begin
{$IFDEF DELPHI17_UP}
if (FMouseWheelService <> nil) then
TempPointF := FMouseWheelService.GetMousePos
else
exit;
{$ELSE}
TempPointF := Platform.GetMousePos;
{$ENDIF}
TempEvent.x := round(TempPointF.x); TempEvent.x := round(TempPointF.x);
TempEvent.y := round(TempPointF.y); TempEvent.y := round(TempPointF.y);
TempEvent.modifiers := getModifiers(Shift); TempEvent.modifiers := getModifiers(Shift);
@ -525,18 +527,27 @@ end;
procedure TFMXExternalPumpBrowserFrm.chrmosrAfterCreated(Sender: TObject; procedure TFMXExternalPumpBrowserFrm.chrmosrAfterCreated(Sender: TObject;
const browser: ICefBrowser); const browser: ICefBrowser);
begin begin
// Now the browser is fully initialized we can send a message to the // Now the browser is fully initialized we can enable the UI.
// main form to enable the UI. TThread.Queue(nil, procedure
TThread.Queue(nil, DoBrowserCreated); begin
Caption := 'FMX External Pump Browser';
AddressPnl.Enabled := True;
Panel1.SetFocus;
end);
end; end;
procedure TFMXExternalPumpBrowserFrm.chrmosrBeforeClose(Sender: TObject; const browser: ICefBrowser); procedure TFMXExternalPumpBrowserFrm.chrmosrBeforeClose(Sender: TObject; const browser: ICefBrowser);
begin begin
FCanClose := True; FCanClose := True;
{$IFDEF MSWINDOWS}
SendCompMessage(WM_CLOSE);
{$ELSE}
TThread.Queue(nil, procedure TThread.Queue(nil, procedure
begin begin
close close
end); end);
{$ENDIF}
end; end;
procedure TFMXExternalPumpBrowserFrm.chrmosrBeforePopup( Sender : TObject; procedure TFMXExternalPumpBrowserFrm.chrmosrBeforePopup( Sender : TObject;
@ -558,9 +569,10 @@ begin
Result := (targetDisposition in [WOD_NEW_FOREGROUND_TAB, WOD_NEW_BACKGROUND_TAB, WOD_NEW_POPUP, WOD_NEW_WINDOW]); Result := (targetDisposition in [WOD_NEW_FOREGROUND_TAB, WOD_NEW_BACKGROUND_TAB, WOD_NEW_POPUP, WOD_NEW_WINDOW]);
end; end;
// TO-DO: The "cursor" parameter should be TCefCursorHandle but Delphi shows a warning if it's not declared as HICON.
procedure TFMXExternalPumpBrowserFrm.chrmosrCursorChange( Sender : TObject; procedure TFMXExternalPumpBrowserFrm.chrmosrCursorChange( Sender : TObject;
const browser : ICefBrowser; const browser : ICefBrowser;
cursor : TCefCursorHandle; cursor : HICON;
cursorType : TCefCursorType; cursorType : TCefCursorType;
const customCursorInfo : PCefCursorInfo); const customCursorInfo : PCefCursorInfo);
begin begin
@ -606,8 +618,9 @@ var
begin begin
if (GlobalCEFApp <> nil) then if (GlobalCEFApp <> nil) then
begin begin
TempViewPt.x := LogicalToDevice(viewX, GlobalCEFApp.DeviceScaleFactor); // TFMXBufferPanel.ClientToScreen applies the scale factor. No need to call LogicalToDevice to set TempViewPt.
TempViewPt.y := LogicalToDevice(viewY, GlobalCEFApp.DeviceScaleFactor); TempViewPt.x := viewX;
TempViewPt.y := viewY;
TempScreenPt := Panel1.ClientToScreen(TempViewPt); TempScreenPt := Panel1.ClientToScreen(TempViewPt);
screenX := TempScreenPt.x; screenX := TempScreenPt.x;
screenY := TempScreenPt.y; screenY := TempScreenPt.y;
@ -759,7 +772,13 @@ begin
if (type_ = PET_VIEW) then if (type_ = PET_VIEW) then
begin begin
if TempForcedResize or FPendingResize then if TempForcedResize or FPendingResize then
TThread.Queue(nil, DoResize); begin
{$IFDEF MSWINDOWS}
SendCompMessage(CEF_PENDINGRESIZE);
{$ELSE}
TThread.Queue(nil, DoResize);
{$ENDIF}
end;
FResizing := False; FResizing := False;
FPendingResize := False; FPendingResize := False;
@ -910,13 +929,6 @@ begin
end; end;
end; end;
procedure TFMXExternalPumpBrowserFrm.DoBrowserCreated;
begin
Caption := 'FMX External Pump Browser';
AddressPnl.Enabled := True;
Panel1.SetFocus;
end;
function TFMXExternalPumpBrowserFrm.getModifiers(Shift: TShiftState): TCefEventFlags; function TFMXExternalPumpBrowserFrm.getModifiers(Shift: TShiftState): TCefEventFlags;
begin begin
Result := EVENTFLAG_NONE; Result := EVENTFLAG_NONE;
@ -961,6 +973,20 @@ begin
{$ENDIF} {$ENDIF}
end; end;
function TFMXExternalPumpBrowserFrm.SendCompMessage(aMsg, wParam : cardinal; lParam : integer) : boolean;
{$IFDEF MSWINDOWS}
var
TempHandle : TWinWindowHandle;
{$ENDIF}
begin
{$IFDEF MSWINDOWS}
TempHandle := WindowHandleToPlatform(Handle);
Result := WinApi.Windows.PostMessage(TempHandle.Wnd, aMsg, wParam, lParam);
{$ELSE}
Result := False;
{$ENDIF}
end;
procedure TFMXExternalPumpBrowserFrm.SnapshotBtnClick(Sender: TObject); procedure TFMXExternalPumpBrowserFrm.SnapshotBtnClick(Sender: TObject);
begin begin
if SaveDialog1.Execute then Panel1.SaveToFile(SaveDialog1.FileName); if SaveDialog1.Execute then Panel1.SaveToFile(SaveDialog1.FileName);

View File

@ -1,7 +1,7 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<ProjectGuid>{392E1E26-071C-490A-B4C9-403BEE1F6E45}</ProjectGuid> <ProjectGuid>{392E1E26-071C-490A-B4C9-403BEE1F6E45}</ProjectGuid>
<ProjectVersion>18.5</ProjectVersion> <ProjectVersion>18.8</ProjectVersion>
<FrameworkType>VCL</FrameworkType> <FrameworkType>VCL</FrameworkType>
<MainSource>JSEval.dpr</MainSource> <MainSource>JSEval.dpr</MainSource>
<Base>True</Base> <Base>True</Base>
@ -184,12 +184,20 @@
<RemoteDir>classes</RemoteDir> <RemoteDir>classes</RemoteDir>
<Operation>1</Operation> <Operation>1</Operation>
</Platform> </Platform>
<Platform Name="Android64">
<RemoteDir>classes</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass> </DeployClass>
<DeployClass Name="AndroidFileProvider"> <DeployClass Name="AndroidFileProvider">
<Platform Name="Android"> <Platform Name="Android">
<RemoteDir>res\xml</RemoteDir> <RemoteDir>res\xml</RemoteDir>
<Operation>1</Operation> <Operation>1</Operation>
</Platform> </Platform>
<Platform Name="Android64">
<RemoteDir>res\xml</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass> </DeployClass>
<DeployClass Name="AndroidGDBServer"> <DeployClass Name="AndroidGDBServer">
<Platform Name="Android"> <Platform Name="Android">
@ -202,96 +210,242 @@
<RemoteDir>library\lib\armeabi</RemoteDir> <RemoteDir>library\lib\armeabi</RemoteDir>
<Operation>1</Operation> <Operation>1</Operation>
</Platform> </Platform>
<Platform Name="Android64">
<RemoteDir>library\lib\armeabi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidLibnativeArmeabiv7aFile">
<Platform Name="Android64">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass> </DeployClass>
<DeployClass Name="AndroidLibnativeMipsFile"> <DeployClass Name="AndroidLibnativeMipsFile">
<Platform Name="Android"> <Platform Name="Android">
<RemoteDir>library\lib\mips</RemoteDir> <RemoteDir>library\lib\mips</RemoteDir>
<Operation>1</Operation> <Operation>1</Operation>
</Platform> </Platform>
<Platform Name="Android64">
<RemoteDir>library\lib\mips</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass> </DeployClass>
<DeployClass Name="AndroidServiceOutput"> <DeployClass Name="AndroidServiceOutput">
<Platform Name="Android"> <Platform Name="Android">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir> <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation> <Operation>1</Operation>
</Platform> </Platform>
<Platform Name="Android64">
<RemoteDir>library\lib\arm64-v8a</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidServiceOutput_Android32">
<Platform Name="Android64">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass> </DeployClass>
<DeployClass Name="AndroidSplashImageDef"> <DeployClass Name="AndroidSplashImageDef">
<Platform Name="Android"> <Platform Name="Android">
<RemoteDir>res\drawable</RemoteDir> <RemoteDir>res\drawable</RemoteDir>
<Operation>1</Operation> <Operation>1</Operation>
</Platform> </Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass> </DeployClass>
<DeployClass Name="AndroidSplashStyles"> <DeployClass Name="AndroidSplashStyles">
<Platform Name="Android"> <Platform Name="Android">
<RemoteDir>res\values</RemoteDir> <RemoteDir>res\values</RemoteDir>
<Operation>1</Operation> <Operation>1</Operation>
</Platform> </Platform>
<Platform Name="Android64">
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass> </DeployClass>
<DeployClass Name="AndroidSplashStylesV21"> <DeployClass Name="AndroidSplashStylesV21">
<Platform Name="Android"> <Platform Name="Android">
<RemoteDir>res\values-v21</RemoteDir> <RemoteDir>res\values-v21</RemoteDir>
<Operation>1</Operation> <Operation>1</Operation>
</Platform> </Platform>
<Platform Name="Android64">
<RemoteDir>res\values-v21</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_Colors">
<Platform Name="Android">
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass> </DeployClass>
<DeployClass Name="Android_DefaultAppIcon"> <DeployClass Name="Android_DefaultAppIcon">
<Platform Name="Android"> <Platform Name="Android">
<RemoteDir>res\drawable</RemoteDir> <RemoteDir>res\drawable</RemoteDir>
<Operation>1</Operation> <Operation>1</Operation>
</Platform> </Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass> </DeployClass>
<DeployClass Name="Android_LauncherIcon144"> <DeployClass Name="Android_LauncherIcon144">
<Platform Name="Android"> <Platform Name="Android">
<RemoteDir>res\drawable-xxhdpi</RemoteDir> <RemoteDir>res\drawable-xxhdpi</RemoteDir>
<Operation>1</Operation> <Operation>1</Operation>
</Platform> </Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass> </DeployClass>
<DeployClass Name="Android_LauncherIcon36"> <DeployClass Name="Android_LauncherIcon36">
<Platform Name="Android"> <Platform Name="Android">
<RemoteDir>res\drawable-ldpi</RemoteDir> <RemoteDir>res\drawable-ldpi</RemoteDir>
<Operation>1</Operation> <Operation>1</Operation>
</Platform> </Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-ldpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass> </DeployClass>
<DeployClass Name="Android_LauncherIcon48"> <DeployClass Name="Android_LauncherIcon48">
<Platform Name="Android"> <Platform Name="Android">
<RemoteDir>res\drawable-mdpi</RemoteDir> <RemoteDir>res\drawable-mdpi</RemoteDir>
<Operation>1</Operation> <Operation>1</Operation>
</Platform> </Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-mdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass> </DeployClass>
<DeployClass Name="Android_LauncherIcon72"> <DeployClass Name="Android_LauncherIcon72">
<Platform Name="Android"> <Platform Name="Android">
<RemoteDir>res\drawable-hdpi</RemoteDir> <RemoteDir>res\drawable-hdpi</RemoteDir>
<Operation>1</Operation> <Operation>1</Operation>
</Platform> </Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-hdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass> </DeployClass>
<DeployClass Name="Android_LauncherIcon96"> <DeployClass Name="Android_LauncherIcon96">
<Platform Name="Android"> <Platform Name="Android">
<RemoteDir>res\drawable-xhdpi</RemoteDir> <RemoteDir>res\drawable-xhdpi</RemoteDir>
<Operation>1</Operation> <Operation>1</Operation>
</Platform> </Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_NotificationIcon24">
<Platform Name="Android">
<RemoteDir>res\drawable-mdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-mdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_NotificationIcon36">
<Platform Name="Android">
<RemoteDir>res\drawable-hdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-hdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_NotificationIcon48">
<Platform Name="Android">
<RemoteDir>res\drawable-xhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_NotificationIcon72">
<Platform Name="Android">
<RemoteDir>res\drawable-xxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_NotificationIcon96">
<Platform Name="Android">
<RemoteDir>res\drawable-xxxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xxxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass> </DeployClass>
<DeployClass Name="Android_SplashImage426"> <DeployClass Name="Android_SplashImage426">
<Platform Name="Android"> <Platform Name="Android">
<RemoteDir>res\drawable-small</RemoteDir> <RemoteDir>res\drawable-small</RemoteDir>
<Operation>1</Operation> <Operation>1</Operation>
</Platform> </Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-small</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass> </DeployClass>
<DeployClass Name="Android_SplashImage470"> <DeployClass Name="Android_SplashImage470">
<Platform Name="Android"> <Platform Name="Android">
<RemoteDir>res\drawable-normal</RemoteDir> <RemoteDir>res\drawable-normal</RemoteDir>
<Operation>1</Operation> <Operation>1</Operation>
</Platform> </Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-normal</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass> </DeployClass>
<DeployClass Name="Android_SplashImage640"> <DeployClass Name="Android_SplashImage640">
<Platform Name="Android"> <Platform Name="Android">
<RemoteDir>res\drawable-large</RemoteDir> <RemoteDir>res\drawable-large</RemoteDir>
<Operation>1</Operation> <Operation>1</Operation>
</Platform> </Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-large</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass> </DeployClass>
<DeployClass Name="Android_SplashImage960"> <DeployClass Name="Android_SplashImage960">
<Platform Name="Android"> <Platform Name="Android">
<RemoteDir>res\drawable-xlarge</RemoteDir> <RemoteDir>res\drawable-xlarge</RemoteDir>
<Operation>1</Operation> <Operation>1</Operation>
</Platform> </Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xlarge</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_Strings">
<Platform Name="Android">
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass> </DeployClass>
<DeployClass Name="DebugSymbols"> <DeployClass Name="DebugSymbols">
<Platform Name="iOSSimulator"> <Platform Name="iOSSimulator">
@ -380,6 +534,9 @@
<Platform Name="Android"> <Platform Name="Android">
<Operation>0</Operation> <Operation>0</Operation>
</Platform> </Platform>
<Platform Name="Android64">
<Operation>0</Operation>
</Platform>
<Platform Name="iOSDevice32"> <Platform Name="iOSDevice32">
<Operation>0</Operation> <Operation>0</Operation>
</Platform> </Platform>
@ -412,6 +569,17 @@
<Operation>1</Operation> <Operation>1</Operation>
</Platform> </Platform>
</DeployClass> </DeployClass>
<DeployClass Name="iPad_Launch1024x768">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Launch1536"> <DeployClass Name="iPad_Launch1536">
<Platform Name="iOSDevice32"> <Platform Name="iOSDevice32">
<Operation>1</Operation> <Operation>1</Operation>
@ -423,6 +591,39 @@
<Operation>1</Operation> <Operation>1</Operation>
</Platform> </Platform>
</DeployClass> </DeployClass>
<DeployClass Name="iPad_Launch1536x2048">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Launch1668">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Launch1668x2388">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Launch2048"> <DeployClass Name="iPad_Launch2048">
<Platform Name="iOSDevice32"> <Platform Name="iOSDevice32">
<Operation>1</Operation> <Operation>1</Operation>
@ -434,6 +635,61 @@
<Operation>1</Operation> <Operation>1</Operation>
</Platform> </Platform>
</DeployClass> </DeployClass>
<DeployClass Name="iPad_Launch2048x1536">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Launch2048x2732">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Launch2224">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Launch2388x1668">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Launch2732x2048">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Launch768"> <DeployClass Name="iPad_Launch768">
<Platform Name="iOSDevice32"> <Platform Name="iOSDevice32">
<Operation>1</Operation> <Operation>1</Operation>
@ -445,6 +701,116 @@
<Operation>1</Operation> <Operation>1</Operation>
</Platform> </Platform>
</DeployClass> </DeployClass>
<DeployClass Name="iPad_Launch768x1024">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch1125">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch1136x640">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch1242">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch1242x2688">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch1334">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch1792">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch2208">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch2436">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch2688x1242">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch320"> <DeployClass Name="iPhone_Launch320">
<Platform Name="iOSDevice32"> <Platform Name="iOSDevice32">
<Operation>1</Operation> <Operation>1</Operation>
@ -478,10 +844,35 @@
<Operation>1</Operation> <Operation>1</Operation>
</Platform> </Platform>
</DeployClass> </DeployClass>
<DeployClass Name="iPhone_Launch750">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch828">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectAndroidManifest"> <DeployClass Name="ProjectAndroidManifest">
<Platform Name="Android"> <Platform Name="Android">
<Operation>1</Operation> <Operation>1</Operation>
</Platform> </Platform>
<Platform Name="Android64">
<Operation>1</Operation>
</Platform>
</DeployClass> </DeployClass>
<DeployClass Name="ProjectiOSDeviceDebug"> <DeployClass Name="ProjectiOSDeviceDebug">
<Platform Name="iOSDevice32"> <Platform Name="iOSDevice32">
@ -574,6 +965,10 @@
<RemoteDir>library\lib\armeabi-v7a</RemoteDir> <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation> <Operation>1</Operation>
</Platform> </Platform>
<Platform Name="Android64">
<RemoteDir>library\lib\arm64-v8a</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice32"> <Platform Name="iOSDevice32">
<Operation>1</Operation> <Operation>1</Operation>
</Platform> </Platform>
@ -598,6 +993,12 @@
<Operation>0</Operation> <Operation>0</Operation>
</Platform> </Platform>
</DeployClass> </DeployClass>
<DeployClass Name="ProjectOutput_Android32">
<Platform Name="Android64">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectUWPManifest"> <DeployClass Name="ProjectUWPManifest">
<Platform Name="Win32"> <Platform Name="Win32">
<Operation>1</Operation> <Operation>1</Operation>
@ -635,6 +1036,7 @@
<ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/> <ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="OSX64" Name="$(PROJECTNAME).app"/> <ProjectRoot Platform="OSX64" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/> <ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="Android64" Name="$(PROJECTNAME)"/>
</Deployment> </Deployment>
<Platforms> <Platforms>
<Platform value="Win32">True</Platform> <Platform value="Win32">True</Platform>

View File

@ -79,9 +79,4 @@ object JSEvalFrm: TJSEvalFrm
Left = 16 Left = 16
Top = 96 Top = 96
end end
object CEFSentinel1: TCEFSentinel
OnClose = CEFSentinel1Close
Left = 16
Top = 160
end
end end

View File

@ -51,7 +51,7 @@ uses
Controls, Forms, Dialogs, StdCtrls, ExtCtrls, Types, ComCtrls, ClipBrd, EncdDecd, Controls, Forms, Dialogs, StdCtrls, ExtCtrls, Types, ComCtrls, ClipBrd, EncdDecd,
{$ENDIF} {$ENDIF}
uCEFChromium, uCEFWindowParent, uCEFInterfaces, uCEFApplication, uCEFTypes, uCEFConstants, uCEFChromium, uCEFWindowParent, uCEFInterfaces, uCEFApplication, uCEFTypes, uCEFConstants,
uCEFWinControl, uCEFSentinel; uCEFWinControl, uCEFSentinel, uCEFChromiumCore;
const const
MINIBROWSER_SHOWTEXTVIEWER = WM_APP + $101; MINIBROWSER_SHOWTEXTVIEWER = WM_APP + $101;
@ -74,7 +74,6 @@ type
GoBtn: TButton; GoBtn: TButton;
AddressEdt: TEdit; AddressEdt: TEdit;
Timer1: TTimer; Timer1: TTimer;
CEFSentinel1: TCEFSentinel;
procedure Chromium1AfterCreated(Sender: TObject; const browser: ICefBrowser); procedure Chromium1AfterCreated(Sender: TObject; const browser: ICefBrowser);
procedure GoBtnClick(Sender: TObject); procedure GoBtnClick(Sender: TObject);
procedure FormShow(Sender: TObject); procedure FormShow(Sender: TObject);
@ -103,7 +102,6 @@ type
var aAction : TCefCloseBrowserAction); var aAction : TCefCloseBrowserAction);
procedure Chromium1BeforeClose(Sender: TObject; procedure Chromium1BeforeClose(Sender: TObject;
const browser: ICefBrowser); const browser: ICefBrowser);
procedure CEFSentinel1Close(Sender: TObject);
private private
{ Private declarations } { Private declarations }
@ -180,14 +178,7 @@ uses
// ================= // =================
// 1. FormCloseQuery sets CanClose to FALSE calls TChromium.CloseBrowser which triggers the TChromium.OnClose event. // 1. FormCloseQuery sets CanClose to FALSE calls TChromium.CloseBrowser which triggers the TChromium.OnClose event.
// 2. TChromium.OnClose sends a CEFBROWSER_DESTROY message to destroy CEFWindowParent1 in the main thread, which triggers the TChromium.OnBeforeClose event. // 2. TChromium.OnClose sends a CEFBROWSER_DESTROY message to destroy CEFWindowParent1 in the main thread, which triggers the TChromium.OnBeforeClose event.
// 3. TChromium.OnBeforeClose calls TCEFSentinel.Start, which will trigger TCEFSentinel.OnClose when the renderer processes are closed. // 3. TChromium.OnBeforeClose sets FCanClose := True and sends WM_CLOSE to the form.
// 4. TCEFSentinel.OnClose sets FCanClose := True and sends WM_CLOSE to the form.
procedure TJSEvalFrm.CEFSentinel1Close(Sender: TObject);
begin
FCanClose := True;
PostMessage(Handle, WM_CLOSE, 0, 0);
end;
procedure TJSEvalFrm.Chromium1AfterCreated(Sender: TObject; const browser: ICefBrowser); procedure TJSEvalFrm.Chromium1AfterCreated(Sender: TObject; const browser: ICefBrowser);
begin begin
@ -197,10 +188,11 @@ end;
procedure TJSEvalFrm.Chromium1BeforeClose(Sender: TObject; procedure TJSEvalFrm.Chromium1BeforeClose(Sender: TObject;
const browser: ICefBrowser); const browser: ICefBrowser);
begin begin
CEFSentinel1.Start; FCanClose := True;
PostMessage(Handle, WM_CLOSE, 0, 0);
end; end;
procedure TJSEvalFrm.Chromium1BeforeContextMenu(Sender : TObject; procedure TJSEvalFrm.Chromium1BeforeContextMenu( Sender : TObject;
const browser : ICefBrowser; const browser : ICefBrowser;
const frame : ICefFrame; const frame : ICefFrame;
const params : ICefContextMenuParams; const params : ICefContextMenuParams;
@ -232,7 +224,7 @@ begin
aAction := cbaDelay; aAction := cbaDelay;
end; end;
procedure TJSEvalFrm.Chromium1ContextMenuCommand(Sender : TObject; procedure TJSEvalFrm.Chromium1ContextMenuCommand( Sender : TObject;
const browser : ICefBrowser; const browser : ICefBrowser;
const frame : ICefFrame; const frame : ICefFrame;
const params : ICefContextMenuParams; const params : ICefContextMenuParams;

View File

@ -89,9 +89,4 @@ object JSRTTIExtensionFrm: TJSRTTIExtensionFrm
Left = 32 Left = 32
Top = 288 Top = 288
end end
object CEFSentinel1: TCEFSentinel
OnClose = CEFSentinel1Close
Left = 32
Top = 352
end
end end

View File

@ -50,7 +50,7 @@ uses
Controls, Forms, Dialogs, StdCtrls, ExtCtrls, ComCtrls, Controls, Forms, Dialogs, StdCtrls, ExtCtrls, ComCtrls,
{$ENDIF} {$ENDIF}
uCEFChromium, uCEFWindowParent, uCEFInterfaces, uCEFApplication, uCEFTypes, uCEFConstants, uCEFChromium, uCEFWindowParent, uCEFInterfaces, uCEFApplication, uCEFTypes, uCEFConstants,
uCEFWinControl, uCEFSentinel; uCEFWinControl, uCEFSentinel, uCEFChromiumCore;
const const
MINIBROWSER_SHOWTEXTVIEWER = WM_APP + $100; MINIBROWSER_SHOWTEXTVIEWER = WM_APP + $100;
@ -72,7 +72,6 @@ type
CEFWindowParent1: TCEFWindowParent; CEFWindowParent1: TCEFWindowParent;
Chromium1: TChromium; Chromium1: TChromium;
Timer1: TTimer; Timer1: TTimer;
CEFSentinel1: TCEFSentinel;
procedure FormShow(Sender: TObject); procedure FormShow(Sender: TObject);
procedure GoBtnClick(Sender: TObject); procedure GoBtnClick(Sender: TObject);
procedure Chromium1BeforeContextMenu(Sender: TObject; procedure Chromium1BeforeContextMenu(Sender: TObject;
@ -101,7 +100,6 @@ type
var aAction : TCefCloseBrowserAction); var aAction : TCefCloseBrowserAction);
procedure Chromium1BeforeClose(Sender: TObject; procedure Chromium1BeforeClose(Sender: TObject;
const browser: ICefBrowser); const browser: ICefBrowser);
procedure CEFSentinel1Close(Sender: TObject);
protected protected
FText : string; FText : string;
// Variables to control when can we destroy the form safely // Variables to control when can we destroy the form safely
@ -157,8 +155,7 @@ uses
// ================= // =================
// 1. FormCloseQuery sets CanClose to FALSE calls TChromium.CloseBrowser which triggers the TChromium.OnClose event. // 1. FormCloseQuery sets CanClose to FALSE calls TChromium.CloseBrowser which triggers the TChromium.OnClose event.
// 2. TChromium.OnClose sends a CEFBROWSER_DESTROY message to destroy CEFWindowParent1 in the main thread, which triggers the TChromium.OnBeforeClose event. // 2. TChromium.OnClose sends a CEFBROWSER_DESTROY message to destroy CEFWindowParent1 in the main thread, which triggers the TChromium.OnBeforeClose event.
// 3. TChromium.OnBeforeClose calls TCEFSentinel.Start, which will trigger TCEFSentinel.OnClose when the renderer processes are closed. // 3. TChromium.OnBeforeClose sets FCanClose := True and sends WM_CLOSE to the form.
// 4. TCEFSentinel.OnClose sets FCanClose := True and sends WM_CLOSE to the form.
procedure GlobalCEFApp_OnWebKitInitialized; procedure GlobalCEFApp_OnWebKitInitialized;
begin begin
@ -187,12 +184,6 @@ begin
Chromium1.LoadURL(Edit1.Text); Chromium1.LoadURL(Edit1.Text);
end; end;
procedure TJSRTTIExtensionFrm.CEFSentinel1Close(Sender: TObject);
begin
FCanClose := True;
PostMessage(Handle, WM_CLOSE, 0, 0);
end;
procedure TJSRTTIExtensionFrm.Chromium1AfterCreated(Sender: TObject; const browser: ICefBrowser); procedure TJSRTTIExtensionFrm.Chromium1AfterCreated(Sender: TObject; const browser: ICefBrowser);
begin begin
PostMessage(Handle, CEF_AFTERCREATED, 0, 0); PostMessage(Handle, CEF_AFTERCREATED, 0, 0);
@ -351,7 +342,8 @@ end;
procedure TJSRTTIExtensionFrm.Chromium1BeforeClose( procedure TJSRTTIExtensionFrm.Chromium1BeforeClose(
Sender: TObject; const browser: ICefBrowser); Sender: TObject; const browser: ICefBrowser);
begin begin
CEFSentinel1.Start; FCanClose := True;
PostMessage(Handle, WM_CLOSE, 0, 0);
end; end;
procedure TJSRTTIExtensionFrm.Chromium1Close( procedure TJSRTTIExtensionFrm.Chromium1Close(

View File

@ -331,7 +331,7 @@ begin
PostMessage(Handle, WM_CLOSE, 0, 0); PostMessage(Handle, WM_CLOSE, 0, 0);
end; end;
procedure TForm1.chrmosrBeforePopup(Sender : TObject; procedure TForm1.chrmosrBeforePopup( Sender : TObject;
const browser : ICefBrowser; const browser : ICefBrowser;
const frame : ICefFrame; const frame : ICefFrame;
const targetUrl : ustring; const targetUrl : ustring;
@ -350,7 +350,7 @@ begin
Result := (targetDisposition in [WOD_NEW_FOREGROUND_TAB, WOD_NEW_BACKGROUND_TAB, WOD_NEW_POPUP, WOD_NEW_WINDOW]); Result := (targetDisposition in [WOD_NEW_FOREGROUND_TAB, WOD_NEW_BACKGROUND_TAB, WOD_NEW_POPUP, WOD_NEW_WINDOW]);
end; end;
procedure TForm1.chrmosrCursorChange(Sender : TObject; procedure TForm1.chrmosrCursorChange( Sender : TObject;
const browser : ICefBrowser; const browser : ICefBrowser;
cursor : HICON; cursor : HICON;
cursorType : TCefCursorType; cursorType : TCefCursorType;
@ -359,7 +359,7 @@ begin
Panel1.Cursor := CefCursorToWindowsCursor(cursorType); Panel1.Cursor := CefCursorToWindowsCursor(cursorType);
end; end;
procedure TForm1.chrmosrGetScreenInfo(Sender : TObject; procedure TForm1.chrmosrGetScreenInfo( Sender : TObject;
const browser : ICefBrowser; const browser : ICefBrowser;
var screenInfo : TCefScreenInfo; var screenInfo : TCefScreenInfo;
out Result : Boolean); out Result : Boolean);
@ -386,7 +386,7 @@ begin
Result := False; Result := False;
end; end;
procedure TForm1.chrmosrGetScreenPoint(Sender : TObject; procedure TForm1.chrmosrGetScreenPoint( Sender : TObject;
const browser : ICefBrowser; const browser : ICefBrowser;
viewX : Integer; viewX : Integer;
viewY : Integer; viewY : Integer;
@ -409,7 +409,7 @@ begin
Result := False; Result := False;
end; end;
procedure TForm1.chrmosrGetViewRect(Sender : TObject; procedure TForm1.chrmosrGetViewRect( Sender : TObject;
const browser : ICefBrowser; const browser : ICefBrowser;
var rect : TCefRect); var rect : TCefRect);
begin begin

View File

@ -21,7 +21,7 @@
</CompilerOptions> </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."/> <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"/> <License Value="MPL 1.1"/>
<Version Major="79" Minor="1" Release="35"/> <Version Major="79" Minor="1" Release="36"/>
<Files Count="147"> <Files Count="147">
<Item1> <Item1>
<Filename Value="..\source\uCEFAccessibilityHandler.pas"/> <Filename Value="..\source\uCEFAccessibilityHandler.pas"/>

View File

@ -62,7 +62,7 @@ uses
const const
CEF_SUPPORTED_VERSION_MAJOR = 79; CEF_SUPPORTED_VERSION_MAJOR = 79;
CEF_SUPPORTED_VERSION_MINOR = 1; CEF_SUPPORTED_VERSION_MINOR = 1;
CEF_SUPPORTED_VERSION_RELEASE = 35; CEF_SUPPORTED_VERSION_RELEASE = 36;
CEF_SUPPORTED_VERSION_BUILD = 0; CEF_SUPPORTED_VERSION_BUILD = 0;
CEF_CHROMEELF_VERSION_MAJOR = 79; CEF_CHROMEELF_VERSION_MAJOR = 79;

View File

@ -2,9 +2,9 @@
"UpdateLazPackages" : [ "UpdateLazPackages" : [
{ {
"ForceNotify" : true, "ForceNotify" : true,
"InternalVersion" : 85, "InternalVersion" : 86,
"Name" : "cef4delphi_lazarus.lpk", "Name" : "cef4delphi_lazarus.lpk",
"Version" : "79.1.35.0" "Version" : "79.1.36.0"
} }
], ],
"UpdatePackageData" : { "UpdatePackageData" : {