mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2024-11-15 15:55:56 +01:00
Added v8_context_snapshot.bin to the cef binaries checking functions
- Added v8_context_snapshot.bin to the cef binaries checking functions. - Added a the Initialized property to TChromiumWindow and nowCreateBrowser is a function, not procedure.
This commit is contained in:
parent
bb83979092
commit
74b1d6c52a
@ -62,6 +62,7 @@ type
|
||||
FOnAfterCreated : TNotifyEvent;
|
||||
|
||||
function GetChildWindowHandle : THandle; override;
|
||||
function GetBrowserInitialized : boolean;
|
||||
|
||||
procedure OnCloseMsg(var aMessage : TMessage); message CEF_DOONCLOSE;
|
||||
procedure OnAfterCreatedMsg(var aMessage : TMessage); message CEF_AFTERCREATED;
|
||||
@ -72,11 +73,12 @@ type
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
procedure AfterConstruction; override;
|
||||
procedure CreateBrowser;
|
||||
function CreateBrowser : boolean;
|
||||
procedure CloseBrowser(aForceClose : boolean);
|
||||
procedure LoadURL(const aURL : string);
|
||||
|
||||
property ChromiumBrowser : TChromium read FChromium;
|
||||
property Initialized : boolean read GetBrowserInitialized;
|
||||
|
||||
published
|
||||
property OnClose : TNotifyEvent read FOnClose write FOnClose;
|
||||
@ -121,6 +123,11 @@ begin
|
||||
Result := 0;
|
||||
end;
|
||||
|
||||
function TChromiumWindow.GetBrowserInitialized : boolean;
|
||||
begin
|
||||
Result := (FChromium <> nil) and FChromium.Initialized;
|
||||
end;
|
||||
|
||||
procedure TChromiumWindow.WebBrowser_OnClose(Sender: TObject; const browser: ICefBrowser; out Result: Boolean);
|
||||
begin
|
||||
if assigned(FOnClose) then
|
||||
@ -148,10 +155,11 @@ begin
|
||||
if assigned(FOnAfterCreated) then FOnAfterCreated(self);
|
||||
end;
|
||||
|
||||
procedure TChromiumWindow.CreateBrowser;
|
||||
function TChromiumWindow.CreateBrowser : boolean;
|
||||
begin
|
||||
if not(csDesigning in ComponentState) and (FChromium <> nil) then
|
||||
FChromium.CreateBrowser(self, '');
|
||||
Result := not(csDesigning in ComponentState) and
|
||||
(FChromium <> nil) and
|
||||
FChromium.CreateBrowser(self, '');
|
||||
end;
|
||||
|
||||
procedure TChromiumWindow.CloseBrowser(aForceClose : boolean);
|
||||
|
@ -741,13 +741,14 @@ begin
|
||||
Result := False;
|
||||
|
||||
try
|
||||
Result := GetAbsoluteDirPath(aResourcesDirPath, TempDir) and
|
||||
FileExists(TempDir + 'natives_blob.bin') and
|
||||
FileExists(TempDir + 'snapshot_blob.bin') and
|
||||
FileExists(TempDir + 'cef.pak') and
|
||||
FileExists(TempDir + 'cef_100_percent.pak') and
|
||||
FileExists(TempDir + 'cef_200_percent.pak') and
|
||||
FileExists(TempDir + 'cef_extensions.pak') and
|
||||
Result := GetAbsoluteDirPath(aResourcesDirPath, TempDir) and
|
||||
FileExists(TempDir + 'natives_blob.bin') and
|
||||
FileExists(TempDir + 'snapshot_blob.bin') and
|
||||
FileExists(TempDir + 'v8_context_snapshot.bin') and
|
||||
FileExists(TempDir + 'cef.pak') and
|
||||
FileExists(TempDir + 'cef_100_percent.pak') and
|
||||
FileExists(TempDir + 'cef_200_percent.pak') and
|
||||
FileExists(TempDir + 'cef_extensions.pak') and
|
||||
(not aCheckDevResources or FileExists(TempDir + 'devtools_resources.pak'));
|
||||
except
|
||||
on e : exception do
|
||||
|
Loading…
Reference in New Issue
Block a user