mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-01-03 10:15:38 +02:00
Update to CEF 3.3202.1677.gd04a869
This commit is contained in:
parent
38098cc91b
commit
8becf848e9
@ -1,9 +1,6 @@
|
||||
del /s /q *.dcu
|
||||
del /s /q *.dcp
|
||||
del /s /q *.bpl
|
||||
del /s /q *.bpi
|
||||
del /s /q *.hpp
|
||||
del /s /q *.exe
|
||||
del /s /q *.res
|
||||
del /s /q *.log
|
||||
del /s /q *.dsk
|
||||
del /s /q *.identcache
|
||||
@ -14,3 +11,4 @@ rmdir Win32\Debug
|
||||
rmdir Win32\Release
|
||||
rmdir Win32
|
||||
rmdir __history
|
||||
rmdir __recovery
|
||||
|
Binary file not shown.
@ -1,9 +1,6 @@
|
||||
del /s /q *.dcu
|
||||
del /s /q *.dcp
|
||||
del /s /q *.bpl
|
||||
del /s /q *.bpi
|
||||
del /s /q *.hpp
|
||||
del /s /q *.exe
|
||||
del /s /q *.res
|
||||
del /s /q *.log
|
||||
del /s /q *.dsk
|
||||
del /s /q *.identcache
|
||||
@ -14,3 +11,4 @@ rmdir Win32\Debug
|
||||
rmdir Win32\Release
|
||||
rmdir Win32
|
||||
rmdir __history
|
||||
rmdir __recovery
|
||||
|
Binary file not shown.
@ -1,9 +1,6 @@
|
||||
del /s /q *.dcu
|
||||
del /s /q *.dcp
|
||||
del /s /q *.bpl
|
||||
del /s /q *.bpi
|
||||
del /s /q *.hpp
|
||||
del /s /q *.exe
|
||||
del /s /q *.res
|
||||
del /s /q *.log
|
||||
del /s /q *.dsk
|
||||
del /s /q *.identcache
|
||||
@ -14,3 +11,4 @@ rmdir Win32\Debug
|
||||
rmdir Win32\Release
|
||||
rmdir Win32
|
||||
rmdir __history
|
||||
rmdir __recovery
|
||||
|
Binary file not shown.
@ -1,9 +1,6 @@
|
||||
del /s /q *.dcu
|
||||
del /s /q *.dcp
|
||||
del /s /q *.bpl
|
||||
del /s /q *.bpi
|
||||
del /s /q *.hpp
|
||||
del /s /q *.exe
|
||||
del /s /q *.res
|
||||
del /s /q *.log
|
||||
del /s /q *.dsk
|
||||
del /s /q *.identcache
|
||||
@ -14,3 +11,4 @@ rmdir Win32\Debug
|
||||
rmdir Win32\Release
|
||||
rmdir Win32
|
||||
rmdir __history
|
||||
rmdir __recovery
|
||||
|
Binary file not shown.
@ -1,9 +1,6 @@
|
||||
del /s /q *.dcu
|
||||
del /s /q *.dcp
|
||||
del /s /q *.bpl
|
||||
del /s /q *.bpi
|
||||
del /s /q *.hpp
|
||||
del /s /q *.exe
|
||||
del /s /q *.res
|
||||
del /s /q *.log
|
||||
del /s /q *.dsk
|
||||
del /s /q *.identcache
|
||||
@ -14,3 +11,4 @@ rmdir Win32\Debug
|
||||
rmdir Win32\Release
|
||||
rmdir Win32
|
||||
rmdir __history
|
||||
rmdir __recovery
|
||||
|
Binary file not shown.
@ -1,9 +1,6 @@
|
||||
del /s /q *.dcu
|
||||
del /s /q *.dcp
|
||||
del /s /q *.bpl
|
||||
del /s /q *.bpi
|
||||
del /s /q *.hpp
|
||||
del /s /q *.exe
|
||||
del /s /q *.res
|
||||
del /s /q *.log
|
||||
del /s /q *.dsk
|
||||
del /s /q *.identcache
|
||||
@ -14,3 +11,4 @@ rmdir Win32\Debug
|
||||
rmdir Win32\Release
|
||||
rmdir Win32
|
||||
rmdir __history
|
||||
rmdir __recovery
|
||||
|
Binary file not shown.
@ -1,9 +1,6 @@
|
||||
del /s /q *.dcu
|
||||
del /s /q *.dcp
|
||||
del /s /q *.bpl
|
||||
del /s /q *.bpi
|
||||
del /s /q *.hpp
|
||||
del /s /q *.exe
|
||||
del /s /q *.res
|
||||
del /s /q *.log
|
||||
del /s /q *.dsk
|
||||
del /s /q *.identcache
|
||||
@ -14,3 +11,4 @@ rmdir Win32\Debug
|
||||
rmdir Win32\Release
|
||||
rmdir Win32
|
||||
rmdir __history
|
||||
rmdir __recovery
|
||||
|
Binary file not shown.
@ -1,9 +1,6 @@
|
||||
del /s /q *.dcu
|
||||
del /s /q *.dcp
|
||||
del /s /q *.bpl
|
||||
del /s /q *.bpi
|
||||
del /s /q *.hpp
|
||||
del /s /q *.exe
|
||||
del /s /q *.res
|
||||
del /s /q *.log
|
||||
del /s /q *.dsk
|
||||
del /s /q *.identcache
|
||||
@ -14,3 +11,4 @@ rmdir Win32\Debug
|
||||
rmdir Win32\Release
|
||||
rmdir Win32
|
||||
rmdir __history
|
||||
rmdir __recovery
|
||||
|
@ -46,7 +46,6 @@ uses
|
||||
Forms, Windows,
|
||||
{$ENDIF }
|
||||
uCEFApplication,
|
||||
uCEFTypes,
|
||||
uMainForm in 'uMainForm.pas' {MainForm},
|
||||
uChildForm in 'uChildForm.pas' {ChildForm};
|
||||
|
||||
|
Binary file not shown.
@ -1,9 +1,6 @@
|
||||
del /s /q *.dcu
|
||||
del /s /q *.dcp
|
||||
del /s /q *.bpl
|
||||
del /s /q *.bpi
|
||||
del /s /q *.hpp
|
||||
del /s /q *.exe
|
||||
del /s /q *.res
|
||||
del /s /q *.log
|
||||
del /s /q *.dsk
|
||||
del /s /q *.identcache
|
||||
@ -14,3 +11,4 @@ rmdir Win32\Debug
|
||||
rmdir Win32\Release
|
||||
rmdir Win32
|
||||
rmdir __history
|
||||
rmdir __recovery
|
||||
|
@ -67,6 +67,8 @@ begin
|
||||
GlobalCEFApp.FrameworkDirPath := 'cef';
|
||||
GlobalCEFApp.ResourcesDirPath := 'cef';
|
||||
GlobalCEFApp.LocalesDirPath := 'cef\locales';
|
||||
GlobalCEFApp.EnableGPU := True; // Enable hardware acceleration
|
||||
GlobalCEFApp.DisableGPUCache := True; // Disable the creation of a 'GPUCache' directory in the hard drive.
|
||||
GlobalCEFApp.cache := 'cef\cache';
|
||||
GlobalCEFApp.cookies := 'cef\cookies';
|
||||
GlobalCEFApp.UserDataPath := 'cef\User Data';
|
||||
|
Binary file not shown.
@ -139,6 +139,7 @@ object MiniBrowserFrm: TMiniBrowserFrm
|
||||
'http://html5test.com/'
|
||||
'https://www.w3schools.com/'
|
||||
'http://webglsamples.org/'
|
||||
'https://get.webgl.org/'
|
||||
'https://www.youtube.com'
|
||||
'https://html5demos.com/drag/'
|
||||
|
||||
@ -306,4 +307,11 @@ object MiniBrowserFrm: TMiniBrowserFrm
|
||||
Left = 32
|
||||
Top = 280
|
||||
end
|
||||
object Timer1: TTimer
|
||||
Enabled = False
|
||||
Interval = 200
|
||||
OnTimer = Timer1Timer
|
||||
Left = 32
|
||||
Top = 344
|
||||
end
|
||||
end
|
||||
|
@ -107,6 +107,7 @@ type
|
||||
N4: TMenuItem;
|
||||
Openfile1: TMenuItem;
|
||||
Resolvehost1: TMenuItem;
|
||||
Timer1: TTimer;
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure BackBtnClick(Sender: TObject);
|
||||
procedure ForwardBtnClick(Sender: TObject);
|
||||
@ -163,6 +164,7 @@ type
|
||||
procedure Resolvehost1Click(Sender: TObject);
|
||||
procedure Chromium1ResolvedHostAvailable(Sender: TObject;
|
||||
result: Integer; const resolvedIps: TStrings);
|
||||
procedure Timer1Timer(Sender: TObject);
|
||||
|
||||
protected
|
||||
FResponse : string;
|
||||
@ -494,7 +496,15 @@ end;
|
||||
|
||||
procedure TMiniBrowserFrm.FormShow(Sender: TObject);
|
||||
begin
|
||||
Chromium1.CreateBrowser(CEFWindowParent1, '');
|
||||
// GlobalCEFApp.GlobalContextInitialized has to be TRUE before creating any browser
|
||||
// If it's not initialized yet, we use a simple timer to create the browser later.
|
||||
if not(Chromium1.CreateBrowser(CEFWindowParent1, '')) then Timer1.Enabled := True;
|
||||
end;
|
||||
|
||||
procedure TMiniBrowserFrm.Timer1Timer(Sender: TObject);
|
||||
begin
|
||||
Timer1.Enabled := False;
|
||||
if not(Chromium1.CreateBrowser(CEFWindowParent1, '')) then Timer1.Enabled := True;
|
||||
end;
|
||||
|
||||
procedure TMiniBrowserFrm.BrowserCreatedMsg(var aMessage : TMessage);
|
||||
|
@ -1,9 +1,6 @@
|
||||
del /s /q *.dcu
|
||||
del /s /q *.dcp
|
||||
del /s /q *.bpl
|
||||
del /s /q *.bpi
|
||||
del /s /q *.hpp
|
||||
del /s /q *.exe
|
||||
del /s /q *.res
|
||||
del /s /q *.log
|
||||
del /s /q *.dsk
|
||||
del /s /q *.identcache
|
||||
@ -14,3 +11,4 @@ rmdir Win32\Debug
|
||||
rmdir Win32\Release
|
||||
rmdir Win32
|
||||
rmdir __history
|
||||
rmdir __recovery
|
||||
|
Binary file not shown.
@ -1,9 +1,6 @@
|
||||
del /s /q *.dcu
|
||||
del /s /q *.dcp
|
||||
del /s /q *.bpl
|
||||
del /s /q *.bpi
|
||||
del /s /q *.hpp
|
||||
del /s /q *.exe
|
||||
del /s /q *.res
|
||||
del /s /q *.log
|
||||
del /s /q *.dsk
|
||||
del /s /q *.identcache
|
||||
@ -14,3 +11,4 @@ rmdir Win32\Debug
|
||||
rmdir Win32\Release
|
||||
rmdir Win32
|
||||
rmdir __history
|
||||
rmdir __recovery
|
||||
|
Binary file not shown.
@ -1,9 +1,6 @@
|
||||
del /s /q *.dcu
|
||||
del /s /q *.dcp
|
||||
del /s /q *.bpl
|
||||
del /s /q *.bpi
|
||||
del /s /q *.hpp
|
||||
del /s /q *.exe
|
||||
del /s /q *.res
|
||||
del /s /q *.log
|
||||
del /s /q *.dsk
|
||||
del /s /q *.identcache
|
||||
@ -14,3 +11,4 @@ rmdir Win32\Debug
|
||||
rmdir Win32\Release
|
||||
rmdir Win32
|
||||
rmdir __history
|
||||
rmdir __recovery
|
||||
|
@ -63,6 +63,8 @@ begin
|
||||
GlobalCEFApp.FrameworkDirPath := 'cef';
|
||||
GlobalCEFApp.ResourcesDirPath := 'cef';
|
||||
GlobalCEFApp.LocalesDirPath := 'cef\locales';
|
||||
GlobalCEFApp.EnableGPU := True; // Enable hardware acceleration
|
||||
GlobalCEFApp.DisableGPUCache := True; // Disable the creation of a 'GPUCache' directory in the hard drive.
|
||||
GlobalCEFApp.cache := 'cef\cache';
|
||||
GlobalCEFApp.cookies := 'cef\cookies';
|
||||
GlobalCEFApp.UserDataPath := 'cef\User Data';
|
||||
|
Binary file not shown.
Binary file not shown.
@ -61,4 +61,11 @@ object Form1: TForm1
|
||||
OnClick = GoBtnClick
|
||||
end
|
||||
end
|
||||
object Timer1: TTimer
|
||||
Enabled = False
|
||||
Interval = 200
|
||||
OnTimer = Timer1Timer
|
||||
Left = 552
|
||||
Top = 264
|
||||
end
|
||||
end
|
||||
|
@ -57,9 +57,11 @@ type
|
||||
AddressPnl: TPanel;
|
||||
AddressEdt: TEdit;
|
||||
GoBtn: TButton;
|
||||
Timer1: TTimer;
|
||||
procedure GoBtnClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure ChromiumWindow1AfterCreated(Sender: TObject);
|
||||
procedure Timer1Timer(Sender: TObject);
|
||||
private
|
||||
// You have to handle this two messages to call NotifyMoveOrResizeStarted or some page elements will be misaligned.
|
||||
procedure WMMove(var aMessage : TWMMove); message WM_MOVE;
|
||||
@ -92,7 +94,10 @@ begin
|
||||
// You *MUST* call CreateBrowser to create and initialize the browser.
|
||||
// This will trigger the AfterCreated event when the browser is fully
|
||||
// initialized and ready to receive commands.
|
||||
ChromiumWindow1.CreateBrowser;
|
||||
|
||||
// GlobalCEFApp.GlobalContextInitialized has to be TRUE before creating any browser
|
||||
// If it's not initialized yet, we use a simple timer to create the browser later.
|
||||
if not(ChromiumWindow1.CreateBrowser) then Timer1.Enabled := True;
|
||||
end;
|
||||
|
||||
procedure TForm1.ChromiumWindow1AfterCreated(Sender: TObject);
|
||||
@ -108,6 +113,12 @@ begin
|
||||
ChromiumWindow1.LoadURL(AddressEdt.Text);
|
||||
end;
|
||||
|
||||
procedure TForm1.Timer1Timer(Sender: TObject);
|
||||
begin
|
||||
Timer1.Enabled := False;
|
||||
if not(ChromiumWindow1.CreateBrowser) then Timer1.Enabled := True;
|
||||
end;
|
||||
|
||||
procedure TForm1.WMMove(var aMessage : TWMMove);
|
||||
begin
|
||||
inherited;
|
||||
|
@ -1,9 +1,6 @@
|
||||
del /s /q *.dcu
|
||||
del /s /q *.dcp
|
||||
del /s /q *.bpl
|
||||
del /s /q *.bpi
|
||||
del /s /q *.hpp
|
||||
del /s /q *.exe
|
||||
del /s /q *.res
|
||||
del /s /q *.log
|
||||
del /s /q *.dsk
|
||||
del /s /q *.identcache
|
||||
@ -14,3 +11,4 @@ rmdir Win32\Debug
|
||||
rmdir Win32\Release
|
||||
rmdir Win32
|
||||
rmdir __history
|
||||
rmdir __recovery
|
||||
|
Binary file not shown.
@ -1,9 +1,6 @@
|
||||
del /s /q *.dcu
|
||||
del /s /q *.dcp
|
||||
del /s /q *.bpl
|
||||
del /s /q *.bpi
|
||||
del /s /q *.hpp
|
||||
del /s /q *.exe
|
||||
del /s /q *.res
|
||||
del /s /q *.log
|
||||
del /s /q *.dsk
|
||||
del /s /q *.identcache
|
||||
@ -14,3 +11,4 @@ rmdir Win32\Debug
|
||||
rmdir Win32\Release
|
||||
rmdir Win32
|
||||
rmdir __history
|
||||
rmdir __recovery
|
||||
|
Binary file not shown.
Binary file not shown.
@ -1,9 +1,6 @@
|
||||
del /s /q *.dcu
|
||||
del /s /q *.dcp
|
||||
del /s /q *.bpl
|
||||
del /s /q *.bpi
|
||||
del /s /q *.hpp
|
||||
del /s /q *.exe
|
||||
del /s /q *.res
|
||||
del /s /q *.log
|
||||
del /s /q *.dsk
|
||||
del /s /q *.identcache
|
||||
@ -14,3 +11,4 @@ rmdir Win32\Debug
|
||||
rmdir Win32\Release
|
||||
rmdir Win32
|
||||
rmdir __history
|
||||
rmdir __recovery
|
||||
|
Binary file not shown.
@ -1,9 +1,6 @@
|
||||
del /s /q *.dcu
|
||||
del /s /q *.dcp
|
||||
del /s /q *.bpl
|
||||
del /s /q *.bpi
|
||||
del /s /q *.hpp
|
||||
del /s /q *.exe
|
||||
del /s /q *.res
|
||||
del /s /q *.log
|
||||
del /s /q *.dsk
|
||||
del /s /q *.identcache
|
||||
@ -14,3 +11,4 @@ rmdir Win32\Debug
|
||||
rmdir Win32\Release
|
||||
rmdir Win32
|
||||
rmdir __history
|
||||
rmdir __recovery
|
||||
|
Binary file not shown.
@ -1,4 +1,6 @@
|
||||
del /s /q *.dcu
|
||||
del /s /q *.exe
|
||||
del /s /q *.log
|
||||
del /s /q *.dsk
|
||||
del /s /q *.identcache
|
||||
del /s /q *.stat
|
||||
@ -8,4 +10,4 @@ rmdir Win32\Debug
|
||||
rmdir Win32\Release
|
||||
rmdir Win32
|
||||
rmdir __history
|
||||
rmdir __recovery
|
||||
rmdir __recovery
|
||||
|
@ -57,7 +57,7 @@ uses
|
||||
const
|
||||
CEF_SUPPORTED_VERSION_MAJOR = 3;
|
||||
CEF_SUPPORTED_VERSION_MINOR = 3202;
|
||||
CEF_SUPPORTED_VERSION_RELEASE = 1674;
|
||||
CEF_SUPPORTED_VERSION_RELEASE = 1677;
|
||||
CEF_SUPPORTED_VERSION_BUILD = 0;
|
||||
|
||||
CEF_CHROMEELF_VERSION_MAJOR = 62;
|
||||
@ -122,7 +122,6 @@ type
|
||||
FEnableHighDPISupport : boolean;
|
||||
FMuteAudio : boolean;
|
||||
FReRaiseExceptions : boolean;
|
||||
FUpdateChromeVer : boolean;
|
||||
FShowMessageDlg : boolean;
|
||||
FSetCurrentDir : boolean;
|
||||
FGlobalContextInitialized : boolean;
|
||||
@ -135,6 +134,8 @@ type
|
||||
FAppSettings : TCefSettings;
|
||||
FDeviceScaleFactor : single;
|
||||
FCheckDevToolsResources : boolean;
|
||||
FDisableGPUCache : boolean;
|
||||
FProcessType : TCefProcessType;
|
||||
|
||||
// ICefBrowserProcessHandler
|
||||
FOnContextInitializedEvent : TOnContextInitializedEvent;
|
||||
@ -203,9 +204,10 @@ type
|
||||
procedure DeleteDirContents(const aDirectory : string);
|
||||
function FindFlashDLL(var aFileName : string) : boolean;
|
||||
procedure ShowErrorMessageDlg(const aError : string); virtual;
|
||||
function ParseProcessType : TCefProcessType;
|
||||
|
||||
public
|
||||
constructor Create(aUpdateChromeVer : boolean = True);
|
||||
constructor Create;
|
||||
destructor Destroy; override;
|
||||
procedure AfterConstruction; override;
|
||||
procedure AddCustomCommandLine(const aCommandLine : string; const aValue : string = '');
|
||||
@ -283,8 +285,10 @@ type
|
||||
property ReRaiseExceptions : boolean read FReRaiseExceptions write FReRaiseExceptions;
|
||||
property DeviceScaleFactor : single read FDeviceScaleFactor;
|
||||
property CheckDevToolsResources : boolean read FCheckDevToolsResources write FCheckDevToolsResources;
|
||||
property DisableGPUCache : boolean read FDisableGPUCache write FDisableGPUCache;
|
||||
property LocalesRequired : ustring read FLocalesRequired write FLocalesRequired;
|
||||
property CustomFlashPath : ustring read FCustomFlashPath write FCustomFlashPath;
|
||||
property ProcessType : TCefProcessType read FProcessType;
|
||||
property OnContextInitialized : TOnContextInitializedEvent read FOnContextInitializedEvent write FOnContextInitializedEvent;
|
||||
property OnBeforeChildProcessLaunch : TOnBeforeChildProcessLaunchEvent read FOnBeforeChildProcessLaunchEvent write FOnBeforeChildProcessLaunchEvent;
|
||||
property OnRenderProcessThreadCreated : TOnRenderProcessThreadCreatedEvent read FOnRenderProcessThreadCreatedEvent write FOnRenderProcessThreadCreatedEvent;
|
||||
@ -346,7 +350,7 @@ uses
|
||||
uCEFLibFunctions, uCEFMiscFunctions, uCEFCommandLine, uCEFConstants,
|
||||
uCEFSchemeHandlerFactory, uCEFCookieManager;
|
||||
|
||||
constructor TCefApplication.Create(aUpdateChromeVer : boolean);
|
||||
constructor TCefApplication.Create;
|
||||
begin
|
||||
inherited Create;
|
||||
|
||||
@ -406,9 +410,10 @@ begin
|
||||
FShowMessageDlg := True;
|
||||
FSetCurrentDir := False;
|
||||
FGlobalContextInitialized := False;
|
||||
FUpdateChromeVer := aUpdateChromeVer;
|
||||
FCheckDevToolsResources := True;
|
||||
FDisableGPUCache := False;
|
||||
FLocalesRequired := '';
|
||||
FProcessType := ParseProcessType;
|
||||
|
||||
// ICefBrowserProcessHandler
|
||||
FOnContextInitializedEvent := nil;
|
||||
@ -426,7 +431,7 @@ begin
|
||||
FChromeVersionInfo.Release := CEF_CHROMEELF_VERSION_RELEASE;
|
||||
FChromeVersionInfo.Build := CEF_CHROMEELF_VERSION_BUILD;
|
||||
|
||||
if FUpdateChromeVer then GetDLLVersion(ChromeElfPath, FChromeVersionInfo);
|
||||
if (FProcessType = ptBrowser) then GetDLLVersion(ChromeElfPath, FChromeVersionInfo);
|
||||
|
||||
IsMultiThread := True;
|
||||
|
||||
@ -537,7 +542,7 @@ begin
|
||||
else
|
||||
FFrameworkDirPath := '';
|
||||
|
||||
if FUpdateChromeVer then GetDLLVersion(ChromeElfPath, FChromeVersionInfo);
|
||||
if (FProcessType = ptBrowser) then GetDLLVersion(ChromeElfPath, FChromeVersionInfo);
|
||||
end;
|
||||
|
||||
procedure TCefApplication.SetResourcesDirPath(const aValue : ustring);
|
||||
@ -733,6 +738,8 @@ begin
|
||||
end;
|
||||
|
||||
function TCefApplication.InitializeLibrary(const aApp : ICefApp) : boolean;
|
||||
var
|
||||
TempArgs : TCefMainArgs;
|
||||
begin
|
||||
Result := False;
|
||||
|
||||
@ -742,7 +749,8 @@ begin
|
||||
|
||||
InitializeSettings(FAppSettings);
|
||||
|
||||
Result := (cef_initialize(@HInstance, @FAppSettings, aApp.Wrap, FWindowsSandboxInfo) <> 0);
|
||||
TempArgs.instance := HINSTANCE;
|
||||
Result := (cef_initialize(@TempArgs, @FAppSettings, aApp.Wrap, FWindowsSandboxInfo) <> 0);
|
||||
except
|
||||
on e : exception do
|
||||
if CustomExceptionHandler('TCefApplication.InitializeLibrary', e) then raise;
|
||||
@ -851,6 +859,40 @@ begin
|
||||
if FShowMessageDlg then MessageDlg(aError, mtError, [mbOk], 0);
|
||||
end;
|
||||
|
||||
function TCefApplication.ParseProcessType : TCefProcessType;
|
||||
const
|
||||
TYPE_PARAMETER_NAME = '--type=';
|
||||
TYPE_RENDERER_VALUE = 'renderer';
|
||||
TYPE_ZYGOTE_VALUE = 'zygote';
|
||||
var
|
||||
i, TempLen : integer;
|
||||
TempName, TempValue : string;
|
||||
begin
|
||||
Result := ptBrowser;
|
||||
i := pred(paramCount);
|
||||
TempLen := length(TYPE_PARAMETER_NAME);
|
||||
|
||||
while (i >= 0) and (Result = ptBrowser) do
|
||||
begin
|
||||
TempName := copy(paramstr(i), 1, TempLen);
|
||||
|
||||
if (CompareText(TempName, TYPE_PARAMETER_NAME) = 0) then
|
||||
begin
|
||||
TempValue := copy(paramstr(i), succ(TempLen), length(paramstr(i)));
|
||||
|
||||
if (CompareText(TempValue, TYPE_RENDERER_VALUE) = 0) then
|
||||
Result := ptRenderer
|
||||
else
|
||||
if (CompareText(TempValue, TYPE_ZYGOTE_VALUE) = 0) then
|
||||
Result := ptZygote
|
||||
else
|
||||
Result := ptOther;
|
||||
end;
|
||||
|
||||
dec(i);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCefApplication.Internal_OnContextInitialized;
|
||||
begin
|
||||
InitializeCookies;
|
||||
@ -917,6 +959,9 @@ begin
|
||||
if FFastUnload then
|
||||
commandLine.AppendSwitch('--enable-fast-unload');
|
||||
|
||||
if FDisableGPUCache then
|
||||
commandLine.AppendSwitch('--disable-gpu-shader-disk-cache');
|
||||
|
||||
if FDisableSafeBrowsing then
|
||||
begin
|
||||
commandLine.AppendSwitch('--disable-client-side-phishing-detection');
|
||||
|
@ -749,7 +749,7 @@ begin
|
||||
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'));
|
||||
(not(aCheckDevResources) or FileExists(TempDir + 'devtools_resources.pak'));
|
||||
except
|
||||
on e : exception do
|
||||
if CustomExceptionHandler('CheckResources', e) then raise;
|
||||
@ -765,14 +765,16 @@ begin
|
||||
try
|
||||
// The icudtl.dat file must be placed next to libcef.dll
|
||||
// http://www.magpcss.org/ceforum/viewtopic.php?f=6&t=14503#p32263
|
||||
Result := GetAbsoluteDirPath(aFrameworkDirPath, TempDir) and
|
||||
FileExists(TempDir + CHROMEELF_DLL) and
|
||||
FileExists(TempDir + LIBCEF_DLL) and
|
||||
FileExists(TempDir + 'd3dcompiler_43.dll') and
|
||||
FileExists(TempDir + 'd3dcompiler_47.dll') and
|
||||
FileExists(TempDir + 'libEGL.dll') and
|
||||
FileExists(TempDir + 'libGLESv2.dll') and
|
||||
FileExists(TempDir + 'icudtl.dat') and
|
||||
Result := GetAbsoluteDirPath(aFrameworkDirPath, TempDir) and
|
||||
FileExists(TempDir + CHROMEELF_DLL) and
|
||||
FileExists(TempDir + LIBCEF_DLL) and
|
||||
FileExists(TempDir + 'd3dcompiler_43.dll') and
|
||||
FileExists(TempDir + 'd3dcompiler_47.dll') and
|
||||
FileExists(TempDir + 'libEGL.dll') and
|
||||
FileExists(TempDir + 'libGLESv2.dll') and
|
||||
FileExists(TempDir + 'swiftshader\libEGL.dll') and
|
||||
FileExists(TempDir + 'swiftshader\libGLESv2.dll') and
|
||||
FileExists(TempDir + 'icudtl.dat') and
|
||||
FileExists(TempDir + 'widevinecdmadapter.dll');
|
||||
except
|
||||
on e : exception do
|
||||
|
@ -278,10 +278,6 @@ type
|
||||
TCefString = TCefStringUtf16;
|
||||
PCefString = PCefStringUtf16;
|
||||
|
||||
TCefMainArgs = record
|
||||
instance: HINST;
|
||||
end;
|
||||
|
||||
TFileVersionInfo = record
|
||||
MajorVer : uint16;
|
||||
MinorVer : uint16;
|
||||
@ -289,6 +285,13 @@ type
|
||||
Build : uint16;
|
||||
end;
|
||||
|
||||
TCefProcessType = (ptBrowser, ptRenderer, ptZygote, ptOther);
|
||||
|
||||
// /include/internal/cef_types_win.h (cef_main_args_t)
|
||||
TCefMainArgs = record
|
||||
instance: HINST;
|
||||
end;
|
||||
|
||||
// /include/internal/cef_types.h (cef_rect_t)
|
||||
TCefRect = record
|
||||
x: Integer;
|
||||
@ -968,7 +971,7 @@ type
|
||||
accept_language_list : TCefString;
|
||||
end;
|
||||
|
||||
// /include/internal/cef_win.h (cef_window_info_t)
|
||||
// /include/internal/cef_types_win.h (cef_window_info_t)
|
||||
TCefWindowInfo = record
|
||||
ex_style: DWORD;
|
||||
window_name: TCefString;
|
||||
|
@ -106,7 +106,7 @@ begin
|
||||
hdwp := BeginDeferWindowPos(1);
|
||||
|
||||
try
|
||||
hdwp := DeferWindowPos(hdwp, TempHandle, 0,
|
||||
hdwp := DeferWindowPos(hdwp, TempHandle, HWND_TOP,
|
||||
TempRect.left, TempRect.top, TempRect.right - TempRect.left, TempRect.bottom - TempRect.top,
|
||||
SWP_NOZORDER);
|
||||
finally
|
||||
|
Loading…
Reference in New Issue
Block a user