mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-02-12 10:26:05 +02:00
Added memory information properties to GlobalCEFApp
This commit is contained in:
parent
b5920d1aac
commit
139f1dded2
@ -34,6 +34,12 @@
|
|||||||
<Cfg_1>true</Cfg_1>
|
<Cfg_1>true</Cfg_1>
|
||||||
<Base>true</Base>
|
<Base>true</Base>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win64)'!=''">
|
||||||
|
<Cfg_1_Win64>true</Cfg_1_Win64>
|
||||||
|
<CfgParent>Cfg_1</CfgParent>
|
||||||
|
<Cfg_1>true</Cfg_1>
|
||||||
|
<Base>true</Base>
|
||||||
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
|
<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
|
||||||
<Cfg_2>true</Cfg_2>
|
<Cfg_2>true</Cfg_2>
|
||||||
<CfgParent>Base</CfgParent>
|
<CfgParent>Base</CfgParent>
|
||||||
@ -45,6 +51,12 @@
|
|||||||
<Cfg_2>true</Cfg_2>
|
<Cfg_2>true</Cfg_2>
|
||||||
<Base>true</Base>
|
<Base>true</Base>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win64)'!=''">
|
||||||
|
<Cfg_2_Win64>true</Cfg_2_Win64>
|
||||||
|
<CfgParent>Cfg_2</CfgParent>
|
||||||
|
<Cfg_2>true</Cfg_2>
|
||||||
|
<Base>true</Base>
|
||||||
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Base)'!=''">
|
<PropertyGroup Condition="'$(Base)'!=''">
|
||||||
<DCC_DcuOutput>.\$(Platform)\$(Config)</DCC_DcuOutput>
|
<DCC_DcuOutput>.\$(Platform)\$(Config)</DCC_DcuOutput>
|
||||||
<DCC_E>false</DCC_E>
|
<DCC_E>false</DCC_E>
|
||||||
@ -60,6 +72,7 @@
|
|||||||
<VerInfo_Locale>3082</VerInfo_Locale>
|
<VerInfo_Locale>3082</VerInfo_Locale>
|
||||||
<SanitizedProjectName>CookieVisitor</SanitizedProjectName>
|
<SanitizedProjectName>CookieVisitor</SanitizedProjectName>
|
||||||
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
|
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
|
||||||
|
<DCC_ExeOutput>..\..\bin</DCC_ExeOutput>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Base_Win32)'!=''">
|
<PropertyGroup Condition="'$(Base_Win32)'!=''">
|
||||||
<DCC_UsePackage>DBXSqliteDriver;bindcompdbx;fmxase;DBXDb2Driver;DBXInterBaseDriver;vcl;DBXSybaseASEDriver;vclactnband;vclFireDAC;FireDACDb2Driver;GR32_DSGN_RSXE5;DataSnapFireDAC;svnui;tethering;dsnapcon;FireDACADSDriver;FireDACMSAccDriver;fmxFireDAC;DBXMSSQLDriver;vclimg;FireDACInfxDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;svn;FireDACPgDriver;DBXOracleDriver;inetdb;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;CEF4Delphi;DbxCommonDriver;IndyProtocols240;IndySystem240;fmx;DataSnapServer;xmlrtl;DataSnapNativeClient;fmxobj;fmxdae;vclwinx;rtl;FireDACDSDriver;DbxClientDriver;IndyCore240;DBXSybaseASADriver;CustomIPTransport;vcldsnap;dbexpress;FireDACDBXDriver;vclx;GR32_RSXE5;bindcomp;appanalytics;dsnap;DataSnapCommon;DBXInformixDriver;bindcompvcl;DataSnapConnectors;VCLRESTComponents;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;vclie;bindengine;DBXMySQLDriver;FireDACOracleDriver;dsnapxml;FireDACMySQLDriver;dbrtl;inetdbxpress;DBXFirebirdDriver;DataSnapProviderClient;FireDACMongoDBDriver;FireDACCommonODBC;DataSnapClient;DataSnapServerMidas;$(DCC_UsePackage)</DCC_UsePackage>
|
<DCC_UsePackage>DBXSqliteDriver;bindcompdbx;fmxase;DBXDb2Driver;DBXInterBaseDriver;vcl;DBXSybaseASEDriver;vclactnband;vclFireDAC;FireDACDb2Driver;GR32_DSGN_RSXE5;DataSnapFireDAC;svnui;tethering;dsnapcon;FireDACADSDriver;FireDACMSAccDriver;fmxFireDAC;DBXMSSQLDriver;vclimg;FireDACInfxDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;svn;FireDACPgDriver;DBXOracleDriver;inetdb;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;CEF4Delphi;DbxCommonDriver;IndyProtocols240;IndySystem240;fmx;DataSnapServer;xmlrtl;DataSnapNativeClient;fmxobj;fmxdae;vclwinx;rtl;FireDACDSDriver;DbxClientDriver;IndyCore240;DBXSybaseASADriver;CustomIPTransport;vcldsnap;dbexpress;FireDACDBXDriver;vclx;GR32_RSXE5;bindcomp;appanalytics;dsnap;DataSnapCommon;DBXInformixDriver;bindcompvcl;DataSnapConnectors;VCLRESTComponents;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;vclie;bindengine;DBXMySQLDriver;FireDACOracleDriver;dsnapxml;FireDACMySQLDriver;dbrtl;inetdbxpress;DBXFirebirdDriver;DataSnapProviderClient;FireDACMongoDBDriver;FireDACCommonODBC;DataSnapClient;DataSnapServerMidas;$(DCC_UsePackage)</DCC_UsePackage>
|
||||||
@ -72,6 +85,11 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Base_Win64)'!=''">
|
<PropertyGroup Condition="'$(Base_Win64)'!=''">
|
||||||
<DCC_UsePackage>DBXSqliteDriver;bindcompdbx;fmxase;DBXDb2Driver;DBXInterBaseDriver;vcl;DBXSybaseASEDriver;vclactnband;vclFireDAC;FireDACDb2Driver;DataSnapFireDAC;tethering;dsnapcon;FireDACADSDriver;FireDACMSAccDriver;fmxFireDAC;DBXMSSQLDriver;vclimg;FireDACInfxDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;FireDACPgDriver;DBXOracleDriver;inetdb;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;DbxCommonDriver;IndyProtocols240;IndySystem240;fmx;DataSnapServer;xmlrtl;DataSnapNativeClient;fmxobj;fmxdae;vclwinx;rtl;FireDACDSDriver;DbxClientDriver;IndyCore240;DBXSybaseASADriver;CustomIPTransport;vcldsnap;dbexpress;FireDACDBXDriver;vclx;bindcomp;appanalytics;dsnap;DataSnapCommon;DBXInformixDriver;bindcompvcl;DataSnapConnectors;VCLRESTComponents;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;vclie;bindengine;DBXMySQLDriver;FireDACOracleDriver;dsnapxml;FireDACMySQLDriver;dbrtl;inetdbxpress;DBXFirebirdDriver;DataSnapProviderClient;FireDACMongoDBDriver;FireDACCommonODBC;DataSnapClient;DataSnapServerMidas;$(DCC_UsePackage)</DCC_UsePackage>
|
<DCC_UsePackage>DBXSqliteDriver;bindcompdbx;fmxase;DBXDb2Driver;DBXInterBaseDriver;vcl;DBXSybaseASEDriver;vclactnband;vclFireDAC;FireDACDb2Driver;DataSnapFireDAC;tethering;dsnapcon;FireDACADSDriver;FireDACMSAccDriver;fmxFireDAC;DBXMSSQLDriver;vclimg;FireDACInfxDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;FireDACPgDriver;DBXOracleDriver;inetdb;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;DbxCommonDriver;IndyProtocols240;IndySystem240;fmx;DataSnapServer;xmlrtl;DataSnapNativeClient;fmxobj;fmxdae;vclwinx;rtl;FireDACDSDriver;DbxClientDriver;IndyCore240;DBXSybaseASADriver;CustomIPTransport;vcldsnap;dbexpress;FireDACDBXDriver;vclx;bindcomp;appanalytics;dsnap;DataSnapCommon;DBXInformixDriver;bindcompvcl;DataSnapConnectors;VCLRESTComponents;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;vclie;bindengine;DBXMySQLDriver;FireDACOracleDriver;dsnapxml;FireDACMySQLDriver;dbrtl;inetdbxpress;DBXFirebirdDriver;DataSnapProviderClient;FireDACMongoDBDriver;FireDACCommonODBC;DataSnapClient;DataSnapServerMidas;$(DCC_UsePackage)</DCC_UsePackage>
|
||||||
|
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace)</DCC_Namespace>
|
||||||
|
<BT_BuildType>Debug</BT_BuildType>
|
||||||
|
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||||
|
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||||
|
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Cfg_1)'!=''">
|
<PropertyGroup Condition="'$(Cfg_1)'!=''">
|
||||||
<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
|
<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
|
||||||
@ -88,6 +106,12 @@
|
|||||||
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||||
<VerInfo_Locale>1033</VerInfo_Locale>
|
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
|
||||||
|
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
|
||||||
|
<AppEnableHighDPI>true</AppEnableHighDPI>
|
||||||
|
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||||
|
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||||
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Cfg_2)'!=''">
|
<PropertyGroup Condition="'$(Cfg_2)'!=''">
|
||||||
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
|
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
|
||||||
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
|
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
|
||||||
@ -98,6 +122,10 @@
|
|||||||
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
|
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
|
||||||
<AppEnableHighDPI>true</AppEnableHighDPI>
|
<AppEnableHighDPI>true</AppEnableHighDPI>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
|
||||||
|
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
|
||||||
|
<AppEnableHighDPI>true</AppEnableHighDPI>
|
||||||
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<DelphiCompile Include="$(MainSource)">
|
<DelphiCompile Include="$(MainSource)">
|
||||||
<MainSource>MainSource</MainSource>
|
<MainSource>MainSource</MainSource>
|
||||||
|
@ -126,7 +126,7 @@ implementation
|
|||||||
{$R *.dfm}
|
{$R *.dfm}
|
||||||
|
|
||||||
uses
|
uses
|
||||||
uSimpleTextViewer;
|
uSimpleTextViewer, uCEFTask, uCEFMiscFunctions;
|
||||||
|
|
||||||
// This demo has a context menu to test the DeleteCookies function and a CookieVisitor example.
|
// This demo has a context menu to test the DeleteCookies function and a CookieVisitor example.
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ object MiniBrowserFrm: TMiniBrowserFrm
|
|||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
Enabled = False
|
Enabled = False
|
||||||
ShowCaption = False
|
ShowCaption = False
|
||||||
TabOrder = 0
|
TabOrder = 1
|
||||||
object NavButtonPnl: TPanel
|
object NavButtonPnl: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
@ -221,7 +221,7 @@ object MiniBrowserFrm: TMiniBrowserFrm
|
|||||||
Height = 652
|
Height = 652
|
||||||
Align = alClient
|
Align = alClient
|
||||||
TabStop = True
|
TabStop = True
|
||||||
TabOrder = 1
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
object DevTools: TCEFWindowParent
|
object DevTools: TCEFWindowParent
|
||||||
Left = 1184
|
Left = 1184
|
||||||
@ -337,6 +337,13 @@ object MiniBrowserFrm: TMiniBrowserFrm
|
|||||||
Caption = 'Resolve host...'
|
Caption = 'Resolve host...'
|
||||||
OnClick = Resolvehost1Click
|
OnClick = Resolvehost1Click
|
||||||
end
|
end
|
||||||
|
object N5: TMenuItem
|
||||||
|
Caption = '-'
|
||||||
|
end
|
||||||
|
object Memoryinfo1: TMenuItem
|
||||||
|
Caption = 'Memory info...'
|
||||||
|
OnClick = Memoryinfo1Click
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object SaveDialog1: TSaveDialog
|
object SaveDialog1: TSaveDialog
|
||||||
Left = 32
|
Left = 32
|
||||||
|
@ -116,6 +116,8 @@ type
|
|||||||
Resolvehost1: TMenuItem;
|
Resolvehost1: TMenuItem;
|
||||||
Timer1: TTimer;
|
Timer1: TTimer;
|
||||||
OpenfilewithaDAT1: TMenuItem;
|
OpenfilewithaDAT1: TMenuItem;
|
||||||
|
N5: TMenuItem;
|
||||||
|
Memoryinfo1: TMenuItem;
|
||||||
procedure FormShow(Sender: TObject);
|
procedure FormShow(Sender: TObject);
|
||||||
procedure BackBtnClick(Sender: TObject);
|
procedure BackBtnClick(Sender: TObject);
|
||||||
procedure ForwardBtnClick(Sender: TObject);
|
procedure ForwardBtnClick(Sender: TObject);
|
||||||
@ -198,6 +200,7 @@ type
|
|||||||
procedure OpenfilewithaDAT1Click(Sender: TObject);
|
procedure OpenfilewithaDAT1Click(Sender: TObject);
|
||||||
procedure Chromium1LoadEnd(Sender: TObject; const browser: ICefBrowser;
|
procedure Chromium1LoadEnd(Sender: TObject; const browser: ICefBrowser;
|
||||||
const frame: ICefFrame; httpStatusCode: Integer);
|
const frame: ICefFrame; httpStatusCode: Integer);
|
||||||
|
procedure Memoryinfo1Click(Sender: TObject);
|
||||||
|
|
||||||
protected
|
protected
|
||||||
FResponse : TStringList;
|
FResponse : TStringList;
|
||||||
@ -741,6 +744,20 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TMiniBrowserFrm.Memoryinfo1Click(Sender: TObject);
|
||||||
|
const
|
||||||
|
BYTES_PER_MEGABYTE = 1024 * 1024;
|
||||||
|
var
|
||||||
|
TempMessage : string;
|
||||||
|
begin
|
||||||
|
TempMessage := 'Total memory used by this application : ' + inttostr(GlobalCEFApp.UsedMemory div BYTES_PER_MEGABYTE) + ' Mb' + CRLF +
|
||||||
|
'Total system memory : ' + inttostr(GlobalCEFApp.TotalSystemMemory div BYTES_PER_MEGABYTE) + ' Mb' + CRLF +
|
||||||
|
'Available physical memory : ' + inttostr(GlobalCEFApp.AvailableSystemMemory div BYTES_PER_MEGABYTE) + ' Mb' + CRLF +
|
||||||
|
'Memory load : ' + inttostr(GlobalCEFApp.SystemMemoryLoad) + ' %';
|
||||||
|
|
||||||
|
MessageDlg(TempMessage, mtInformation, [mbOK], 0);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TMiniBrowserFrm.Chromium1ResourceResponse(Sender: TObject;
|
procedure TMiniBrowserFrm.Chromium1ResourceResponse(Sender: TObject;
|
||||||
const browser: ICefBrowser; const frame: ICefFrame;
|
const browser: ICefBrowser; const frame: ICefFrame;
|
||||||
const request: ICefRequest; const response: ICefResponse;
|
const request: ICefRequest; const response: ICefResponse;
|
||||||
|
@ -47,7 +47,7 @@ uses
|
|||||||
Forms,
|
Forms,
|
||||||
Windows,
|
Windows,
|
||||||
{$ENDIF }
|
{$ENDIF }
|
||||||
uCEFApplication,
|
uCEFApplication, uCEFConstants,
|
||||||
uSimpleBrowser2 in 'uSimpleBrowser2.pas' {Form1};
|
uSimpleBrowser2 in 'uSimpleBrowser2.pas' {Form1};
|
||||||
|
|
||||||
{$R *.res}
|
{$R *.res}
|
||||||
|
@ -103,7 +103,7 @@ implementation
|
|||||||
{$R *.dfm}
|
{$R *.dfm}
|
||||||
|
|
||||||
uses
|
uses
|
||||||
uCEFApplication;
|
uCEFApplication, uCefMiscFunctions;
|
||||||
|
|
||||||
// This is a demo with the simplest web browser you can build using CEF4Delphi and
|
// This is a demo with the simplest web browser you can build using CEF4Delphi and
|
||||||
// it doesn't show any sign of progress like other web browsers do.
|
// it doesn't show any sign of progress like other web browsers do.
|
||||||
@ -141,6 +141,7 @@ procedure TForm1.FormCreate(Sender: TObject);
|
|||||||
begin
|
begin
|
||||||
FCanClose := False;
|
FCanClose := False;
|
||||||
FClosing := False;
|
FClosing := False;
|
||||||
|
Chromium1.DefaultURL := AddressEdt.Text;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TForm1.FormShow(Sender: TObject);
|
procedure TForm1.FormShow(Sender: TObject);
|
||||||
@ -190,7 +191,6 @@ procedure TForm1.BrowserCreatedMsg(var aMessage : TMessage);
|
|||||||
begin
|
begin
|
||||||
Caption := 'Simple Browser 2';
|
Caption := 'Simple Browser 2';
|
||||||
AddressPnl.Enabled := True;
|
AddressPnl.Enabled := True;
|
||||||
GoBtn.Click;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TForm1.BrowserDestroyMsg(var aMessage : TMessage);
|
procedure TForm1.BrowserDestroyMsg(var aMessage : TMessage);
|
||||||
|
@ -4,14 +4,14 @@
|
|||||||
<PathDelim Value="\"/>
|
<PathDelim Value="\"/>
|
||||||
<Version Value="10"/>
|
<Version Value="10"/>
|
||||||
<BuildModes Active="Default"/>
|
<BuildModes Active="Default"/>
|
||||||
<Units Count="38">
|
<Units Count="45">
|
||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="SimpleLazarusBrowser.lpr"/>
|
<Filename Value="SimpleLazarusBrowser.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<EditorIndex Value="-1"/>
|
<EditorIndex Value="-1"/>
|
||||||
<TopLine Value="5"/>
|
<TopLine Value="5"/>
|
||||||
<CursorPos X="43" Y="5"/>
|
<CursorPos X="43" Y="5"/>
|
||||||
<UsageCount Value="38"/>
|
<UsageCount Value="39"/>
|
||||||
</Unit0>
|
</Unit0>
|
||||||
<Unit1>
|
<Unit1>
|
||||||
<Filename Value="usimplelazarusbrowser.pas"/>
|
<Filename Value="usimplelazarusbrowser.pas"/>
|
||||||
@ -22,9 +22,9 @@
|
|||||||
<UnitName Value="uSimpleLazarusBrowser"/>
|
<UnitName Value="uSimpleLazarusBrowser"/>
|
||||||
<EditorIndex Value="-1"/>
|
<EditorIndex Value="-1"/>
|
||||||
<WindowIndex Value="-1"/>
|
<WindowIndex Value="-1"/>
|
||||||
<TopLine Value="73"/>
|
<TopLine Value="43"/>
|
||||||
<CursorPos X="53" Y="69"/>
|
<CursorPos X="24" Y="68"/>
|
||||||
<UsageCount Value="38"/>
|
<UsageCount Value="39"/>
|
||||||
</Unit1>
|
</Unit1>
|
||||||
<Unit2>
|
<Unit2>
|
||||||
<Filename Value="..\..\source\uCEFChromium.pas"/>
|
<Filename Value="..\..\source\uCEFChromium.pas"/>
|
||||||
@ -132,21 +132,21 @@
|
|||||||
<Unit16>
|
<Unit16>
|
||||||
<Filename Value="..\..\source\uCEFInterfaces.pas"/>
|
<Filename Value="..\..\source\uCEFInterfaces.pas"/>
|
||||||
<EditorIndex Value="-1"/>
|
<EditorIndex Value="-1"/>
|
||||||
<TopLine Value="367"/>
|
<TopLine Value="165"/>
|
||||||
<CursorPos X="14" Y="382"/>
|
<CursorPos X="3" Y="183"/>
|
||||||
<UsageCount Value="12"/>
|
<UsageCount Value="12"/>
|
||||||
</Unit16>
|
</Unit16>
|
||||||
<Unit17>
|
<Unit17>
|
||||||
<Filename Value="..\..\source\uCEFApplication.pas"/>
|
<Filename Value="..\..\source\uCEFApplication.pas"/>
|
||||||
<EditorIndex Value="-1"/>
|
<IsVisibleTab Value="True"/>
|
||||||
<WindowIndex Value="-1"/>
|
<TopLine Value="1633"/>
|
||||||
<TopLine Value="2169"/>
|
<CursorPos X="53" Y="1656"/>
|
||||||
<CursorPos Y="44"/>
|
|
||||||
<UsageCount Value="13"/>
|
<UsageCount Value="13"/>
|
||||||
<Bookmarks Count="2">
|
<Bookmarks Count="2">
|
||||||
<Item0 X="60" Y="956" ID="1"/>
|
<Item0 X="60" Y="956" ID="1"/>
|
||||||
<Item1 X="9" Y="894" ID="3"/>
|
<Item1 X="9" Y="894" ID="3"/>
|
||||||
</Bookmarks>
|
</Bookmarks>
|
||||||
|
<Loaded Value="True"/>
|
||||||
</Unit17>
|
</Unit17>
|
||||||
<Unit18>
|
<Unit18>
|
||||||
<Filename Value="C:\lazarus\lcl\forms.pp"/>
|
<Filename Value="C:\lazarus\lcl\forms.pp"/>
|
||||||
@ -225,17 +225,18 @@
|
|||||||
</Unit27>
|
</Unit27>
|
||||||
<Unit28>
|
<Unit28>
|
||||||
<Filename Value="..\..\source\uCEFTypes.pas"/>
|
<Filename Value="..\..\source\uCEFTypes.pas"/>
|
||||||
<EditorIndex Value="-1"/>
|
<EditorIndex Value="2"/>
|
||||||
<TopLine Value="235"/>
|
<TopLine Value="538"/>
|
||||||
<CursorPos X="34" Y="252"/>
|
|
||||||
<UsageCount Value="13"/>
|
<UsageCount Value="13"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
</Unit28>
|
</Unit28>
|
||||||
<Unit29>
|
<Unit29>
|
||||||
<Filename Value="..\..\source\uCEFMiscFunctions.pas"/>
|
<Filename Value="..\..\source\uCEFMiscFunctions.pas"/>
|
||||||
<EditorIndex Value="-1"/>
|
<EditorIndex Value="1"/>
|
||||||
<TopLine Value="996"/>
|
<TopLine Value="99"/>
|
||||||
<CursorPos X="67" Y="1003"/>
|
<CursorPos X="36" Y="131"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
</Unit29>
|
</Unit29>
|
||||||
<Unit30>
|
<Unit30>
|
||||||
<Filename Value="C:\lazarus\fpc\3.0.4\source\rtl\inc\ctypes.pp"/>
|
<Filename Value="C:\lazarus\fpc\3.0.4\source\rtl\inc\ctypes.pp"/>
|
||||||
@ -274,38 +275,160 @@
|
|||||||
</Unit34>
|
</Unit34>
|
||||||
<Unit35>
|
<Unit35>
|
||||||
<Filename Value="..\..\source\uCEFLinkedWindowParent.pas"/>
|
<Filename Value="..\..\source\uCEFLinkedWindowParent.pas"/>
|
||||||
|
<EditorIndex Value="-1"/>
|
||||||
<TopLine Value="31"/>
|
<TopLine Value="31"/>
|
||||||
<CursorPos X="28" Y="38"/>
|
<CursorPos X="28" Y="38"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="10"/>
|
||||||
<Loaded Value="True"/>
|
|
||||||
</Unit35>
|
</Unit35>
|
||||||
<Unit36>
|
<Unit36>
|
||||||
<Filename Value="..\..\source\uCEFWriteHandler.pas"/>
|
<Filename Value="..\..\source\uCEFWriteHandler.pas"/>
|
||||||
<IsVisibleTab Value="True"/>
|
<EditorIndex Value="-1"/>
|
||||||
<EditorIndex Value="1"/>
|
|
||||||
<TopLine Value="336"/>
|
<TopLine Value="336"/>
|
||||||
<CursorPos Y="358"/>
|
<CursorPos Y="358"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="10"/>
|
||||||
<Loaded Value="True"/>
|
|
||||||
</Unit36>
|
</Unit36>
|
||||||
<Unit37>
|
<Unit37>
|
||||||
<Filename Value="C:\lazarus\fpc\3.0.4\source\rtl\objpas\math.pp"/>
|
<Filename Value="C:\lazarus\fpc\3.0.4\source\rtl\objpas\math.pp"/>
|
||||||
<EditorIndex Value="2"/>
|
<EditorIndex Value="-1"/>
|
||||||
<TopLine Value="158"/>
|
<TopLine Value="158"/>
|
||||||
<CursorPos X="10" Y="180"/>
|
<CursorPos X="10" Y="180"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="10"/>
|
||||||
<Loaded Value="True"/>
|
|
||||||
</Unit37>
|
</Unit37>
|
||||||
|
<Unit38>
|
||||||
|
<Filename Value="..\..\source\uCEFTask.pas"/>
|
||||||
|
<EditorIndex Value="-1"/>
|
||||||
|
<TopLine Value="109"/>
|
||||||
|
<CursorPos X="19" Y="82"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
</Unit38>
|
||||||
|
<Unit39>
|
||||||
|
<Filename Value="..\..\source\uCEFCookieManager.pas"/>
|
||||||
|
<EditorIndex Value="-1"/>
|
||||||
|
<TopLine Value="123"/>
|
||||||
|
<CursorPos X="73" Y="139"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
</Unit39>
|
||||||
|
<Unit40>
|
||||||
|
<Filename Value="C:\lazarus\fpc\3.0.4\source\rtl\objpas\sysutils\filutilh.inc"/>
|
||||||
|
<EditorIndex Value="7"/>
|
||||||
|
<TopLine Value="49"/>
|
||||||
|
<CursorPos X="3" Y="62"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit40>
|
||||||
|
<Unit41>
|
||||||
|
<Filename Value="C:\lazarus\fpc\3.0.4\source\packages\winunits-jedi\src\jwawindows.pas"/>
|
||||||
|
<UnitName Value="JwaWindows"/>
|
||||||
|
<EditorIndex Value="6"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit41>
|
||||||
|
<Unit42>
|
||||||
|
<Filename Value="C:\lazarus\fpc\3.0.4\source\packages\winunits-jedi\src\jwapsapi.pas"/>
|
||||||
|
<EditorIndex Value="5"/>
|
||||||
|
<TopLine Value="200"/>
|
||||||
|
<CursorPos X="10" Y="212"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit42>
|
||||||
|
<Unit43>
|
||||||
|
<Filename Value="C:\lazarus\fpc\3.0.4\source\rtl\win\wininc\redef.inc"/>
|
||||||
|
<EditorIndex Value="3"/>
|
||||||
|
<TopLine Value="636"/>
|
||||||
|
<CursorPos X="48" Y="649"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit43>
|
||||||
|
<Unit44>
|
||||||
|
<Filename Value="C:\lazarus\fpc\3.0.4\source\rtl\win\wininc\struct.inc"/>
|
||||||
|
<EditorIndex Value="4"/>
|
||||||
|
<TopLine Value="4666"/>
|
||||||
|
<CursorPos X="6" Y="4679"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit44>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="2" HistoryIndex="1">
|
<JumpHistory Count="20" HistoryIndex="19">
|
||||||
<Position1>
|
<Position1>
|
||||||
<Filename Value="..\..\source\uCEFLinkedWindowParent.pas"/>
|
<Filename Value="..\..\source\uCEFApplication.pas"/>
|
||||||
<Caret Line="38" Column="28" TopLine="31"/>
|
<Caret Line="445" Column="58" TopLine="427"/>
|
||||||
</Position1>
|
</Position1>
|
||||||
<Position2>
|
<Position2>
|
||||||
<Filename Value="..\..\source\uCEFWriteHandler.pas"/>
|
<Filename Value="..\..\source\uCEFApplication.pas"/>
|
||||||
<Caret Line="353" Column="19" TopLine="321"/>
|
<Caret Line="1190" Column="17" TopLine="1173"/>
|
||||||
</Position2>
|
</Position2>
|
||||||
|
<Position3>
|
||||||
|
<Filename Value="..\..\source\uCEFApplication.pas"/>
|
||||||
|
<Caret Line="447" Column="51" TopLine="428"/>
|
||||||
|
</Position3>
|
||||||
|
<Position4>
|
||||||
|
<Filename Value="..\..\source\uCEFApplication.pas"/>
|
||||||
|
<Caret Line="1182" Column="72" TopLine="1160"/>
|
||||||
|
</Position4>
|
||||||
|
<Position5>
|
||||||
|
<Filename Value="..\..\source\uCEFApplication.pas"/>
|
||||||
|
<Caret Line="1190" Column="39" TopLine="1121"/>
|
||||||
|
</Position5>
|
||||||
|
<Position6>
|
||||||
|
<Filename Value="..\..\source\uCEFApplication.pas"/>
|
||||||
|
<Caret Line="1571" Column="46" TopLine="1556"/>
|
||||||
|
</Position6>
|
||||||
|
<Position7>
|
||||||
|
<Filename Value="..\..\source\uCEFApplication.pas"/>
|
||||||
|
<Caret Line="1190" Column="64" TopLine="1165"/>
|
||||||
|
</Position7>
|
||||||
|
<Position8>
|
||||||
|
<Filename Value="..\..\source\uCEFApplication.pas"/>
|
||||||
|
<Caret Line="447" Column="38" TopLine="439"/>
|
||||||
|
</Position8>
|
||||||
|
<Position9>
|
||||||
|
<Filename Value="..\..\source\uCEFApplication.pas"/>
|
||||||
|
<Caret Line="1190" Column="20" TopLine="436"/>
|
||||||
|
</Position9>
|
||||||
|
<Position10>
|
||||||
|
<Filename Value="C:\lazarus\fpc\3.0.4\source\rtl\objpas\sysutils\filutilh.inc"/>
|
||||||
|
<Caret Line="165" Column="60" TopLine="154"/>
|
||||||
|
</Position10>
|
||||||
|
<Position11>
|
||||||
|
<Filename Value="..\..\source\uCEFApplication.pas"/>
|
||||||
|
<Caret Line="1196" Column="49" TopLine="1162"/>
|
||||||
|
</Position11>
|
||||||
|
<Position12>
|
||||||
|
<Filename Value="C:\lazarus\fpc\3.0.4\source\rtl\objpas\sysutils\filutilh.inc"/>
|
||||||
|
<Caret Line="80" Column="3" TopLine="67"/>
|
||||||
|
</Position12>
|
||||||
|
<Position13>
|
||||||
|
<Filename Value="C:\lazarus\fpc\3.0.4\source\rtl\objpas\sysutils\filutilh.inc"/>
|
||||||
|
<Caret Line="62" Column="3" TopLine="49"/>
|
||||||
|
</Position13>
|
||||||
|
<Position14>
|
||||||
|
<Filename Value="..\..\source\uCEFApplication.pas"/>
|
||||||
|
<Caret Line="447" Column="46" TopLine="424"/>
|
||||||
|
</Position14>
|
||||||
|
<Position15>
|
||||||
|
<Filename Value="..\..\source\uCEFApplication.pas"/>
|
||||||
|
<Caret Line="1599" Column="55" TopLine="1587"/>
|
||||||
|
</Position15>
|
||||||
|
<Position16>
|
||||||
|
<Filename Value="..\..\source\uCEFApplication.pas"/>
|
||||||
|
<Caret Line="1620" Column="73" TopLine="1604"/>
|
||||||
|
</Position16>
|
||||||
|
<Position17>
|
||||||
|
<Filename Value="C:\lazarus\fpc\3.0.4\source\rtl\win\wininc\redef.inc"/>
|
||||||
|
<Caret Line="649" Column="48" TopLine="636"/>
|
||||||
|
</Position17>
|
||||||
|
<Position18>
|
||||||
|
<Filename Value="..\..\source\uCEFApplication.pas"/>
|
||||||
|
<Caret Line="1618" Column="62" TopLine="1604"/>
|
||||||
|
</Position18>
|
||||||
|
<Position19>
|
||||||
|
<Filename Value="..\..\source\uCEFMiscFunctions.pas"/>
|
||||||
|
<Caret Line="132" Column="48" TopLine="51"/>
|
||||||
|
</Position19>
|
||||||
|
<Position20>
|
||||||
|
<Filename Value="..\..\source\uCEFMiscFunctions.pas"/>
|
||||||
|
<Caret Line="131" Column="36" TopLine="99"/>
|
||||||
|
</Position20>
|
||||||
</JumpHistory>
|
</JumpHistory>
|
||||||
</ProjectSession>
|
</ProjectSession>
|
||||||
</CONFIG>
|
</CONFIG>
|
||||||
|
@ -10,7 +10,7 @@ object Form1: TForm1
|
|||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
OnShow = FormShow
|
OnShow = FormShow
|
||||||
Position = poScreenCenter
|
Position = poScreenCenter
|
||||||
LCLVersion = '1.8.2.0'
|
LCLVersion = '1.8.4.0'
|
||||||
object AddressPnl: TPanel
|
object AddressPnl: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 23
|
Height = 23
|
||||||
|
@ -47,9 +47,7 @@ uses
|
|||||||
uCEFChromium, uCEFWindowParent, uCEFInterfaces, uCEFConstants, uCEFTypes, uCEFChromiumEvents;
|
uCEFChromium, uCEFWindowParent, uCEFInterfaces, uCEFConstants, uCEFTypes, uCEFChromiumEvents;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
{ TForm1 }
|
{ TForm1 }
|
||||||
|
|
||||||
TForm1 = class(TForm)
|
TForm1 = class(TForm)
|
||||||
CEFWindowParent1: TCEFWindowParent;
|
CEFWindowParent1: TCEFWindowParent;
|
||||||
Chromium1: TChromium;
|
Chromium1: TChromium;
|
||||||
|
@ -196,6 +196,10 @@ type
|
|||||||
function GetMustCreateRenderProcessHandler : boolean;
|
function GetMustCreateRenderProcessHandler : boolean;
|
||||||
function GetGlobalContextInitialized : boolean;
|
function GetGlobalContextInitialized : boolean;
|
||||||
function GetChildProcessesCount : integer;
|
function GetChildProcessesCount : integer;
|
||||||
|
function GetUsedMemory : cardinal;
|
||||||
|
function GetTotalSystemMemory : uint64;
|
||||||
|
function GetAvailableSystemMemory : uint64;
|
||||||
|
function GetSystemMemoryLoad : cardinal;
|
||||||
|
|
||||||
function LoadCEFlibrary : boolean; virtual;
|
function LoadCEFlibrary : boolean; virtual;
|
||||||
function Load_cef_app_capi_h : boolean;
|
function Load_cef_app_capi_h : boolean;
|
||||||
@ -373,6 +377,10 @@ type
|
|||||||
property MustFreeLibrary : boolean read FMustFreeLibrary write FMustFreeLibrary;
|
property MustFreeLibrary : boolean read FMustFreeLibrary write FMustFreeLibrary;
|
||||||
property AutoplayPolicy : TCefAutoplayPolicy read FAutoplayPolicy write FAutoplayPolicy;
|
property AutoplayPolicy : TCefAutoplayPolicy read FAutoplayPolicy write FAutoplayPolicy;
|
||||||
property ChildProcessesCount : integer read GetChildProcessesCount;
|
property ChildProcessesCount : integer read GetChildProcessesCount;
|
||||||
|
property UsedMemory : cardinal read GetUsedMemory;
|
||||||
|
property TotalSystemMemory : uint64 read GetTotalSystemMemory;
|
||||||
|
property AvailableSystemMemory : uint64 read GetAvailableSystemMemory;
|
||||||
|
property SystemMemoryLoad : cardinal read GetSystemMemoryLoad;
|
||||||
|
|
||||||
property OnRegCustomSchemes : TOnRegisterCustomSchemesEvent read FOnRegisterCustomSchemes write FOnRegisterCustomSchemes;
|
property OnRegCustomSchemes : TOnRegisterCustomSchemesEvent read FOnRegisterCustomSchemes write FOnRegisterCustomSchemes;
|
||||||
|
|
||||||
@ -432,13 +440,13 @@ implementation
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
{$IFDEF DELPHI16_UP}
|
{$IFDEF DELPHI16_UP}
|
||||||
System.Math, System.IOUtils, System.SysUtils, {$IFDEF MSWINDOWS}WinApi.TlHelp32,{$ENDIF}
|
System.Math, System.IOUtils, System.SysUtils, {$IFDEF MSWINDOWS}WinApi.TlHelp32, PSAPI,{$ENDIF}
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
Math, {$IFDEF DELPHI14_UP}IOUtils,{$ENDIF} SysUtils,
|
Math, {$IFDEF DELPHI14_UP}IOUtils,{$ENDIF} SysUtils,
|
||||||
{$IFDEF FPC}
|
{$IFDEF FPC}
|
||||||
{$IFDEF MSWINDOWS}jwatlhelp32,{$ENDIF}
|
{$IFDEF MSWINDOWS}jwatlhelp32, jwapsapi,{$ENDIF}
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
TlHelp32,
|
TlHelp32, {$IFDEF MSWINDOWS}PSAPI,{$ENDIF}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
uCEFLibFunctions, uCEFMiscFunctions, uCEFCommandLine, uCEFConstants,
|
uCEFLibFunctions, uCEFMiscFunctions, uCEFCommandLine, uCEFConstants,
|
||||||
@ -1519,7 +1527,10 @@ begin
|
|||||||
Result := 0;
|
Result := 0;
|
||||||
|
|
||||||
{$IFDEF MSWINDOWS}
|
{$IFDEF MSWINDOWS}
|
||||||
TempHandle := CreateToolHelp32SnapShot(TH32CS_SNAPPROCESS, 0);
|
TempHandle := CreateToolHelp32SnapShot(TH32CS_SNAPPROCESS, 0);
|
||||||
|
if (TempHandle = INVALID_HANDLE_VALUE) then exit;
|
||||||
|
|
||||||
|
ZeroMemory(@TempProcess, SizeOf(TProcessEntry32));
|
||||||
TempProcess.dwSize := Sizeof(TProcessEntry32);
|
TempProcess.dwSize := Sizeof(TProcessEntry32);
|
||||||
TempPID := GetCurrentProcessID;
|
TempPID := GetCurrentProcessID;
|
||||||
TempMain := ExtractFileName(paramstr(0));
|
TempMain := ExtractFileName(paramstr(0));
|
||||||
@ -1544,6 +1555,109 @@ begin
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TCefApplication.GetUsedMemory : cardinal;
|
||||||
|
{$IFDEF MSWINDOWS}
|
||||||
|
var
|
||||||
|
TempHandle : THandle;
|
||||||
|
TempProcess : TProcessEntry32;
|
||||||
|
TempPID : DWORD;
|
||||||
|
TempProcHWND : HWND;
|
||||||
|
TempMemCtrs : TProcessMemoryCounters;
|
||||||
|
TempMain, TempSubProc, TempName : string;
|
||||||
|
{$ENDIF}
|
||||||
|
begin
|
||||||
|
Result := 0;
|
||||||
|
|
||||||
|
{$IFDEF MSWINDOWS}
|
||||||
|
TempHandle := CreateToolHelp32SnapShot(TH32CS_SNAPPROCESS, 0);
|
||||||
|
if (TempHandle = INVALID_HANDLE_VALUE) then exit;
|
||||||
|
|
||||||
|
ZeroMemory(@TempProcess, SizeOf(TProcessEntry32));
|
||||||
|
TempProcess.dwSize := Sizeof(TProcessEntry32);
|
||||||
|
TempPID := GetCurrentProcessID;
|
||||||
|
TempMain := ExtractFileName(paramstr(0));
|
||||||
|
TempSubProc := ExtractFileName(FBrowserSubprocessPath);
|
||||||
|
|
||||||
|
Process32First(TempHandle, TempProcess);
|
||||||
|
|
||||||
|
repeat
|
||||||
|
if (TempProcess.th32ProcessID = TempPID) or
|
||||||
|
(TempProcess.th32ParentProcessID = TempPID) then
|
||||||
|
begin
|
||||||
|
TempName := TempProcess.szExeFile;
|
||||||
|
TempName := ExtractFileName(TempName);
|
||||||
|
|
||||||
|
if (CompareText(TempName, TempMain) = 0) or
|
||||||
|
((length(TempSubProc) > 0) and (CompareText(TempName, TempSubProc) = 0)) then
|
||||||
|
begin
|
||||||
|
TempProcHWND := OpenProcess(PROCESS_QUERY_INFORMATION or PROCESS_VM_READ, False, TempProcess.th32ProcessID);
|
||||||
|
|
||||||
|
if (TempProcHWND <> 0) then
|
||||||
|
begin
|
||||||
|
ZeroMemory(@TempMemCtrs, SizeOf(TProcessMemoryCounters));
|
||||||
|
TempMemCtrs.cb := SizeOf(TProcessMemoryCounters);
|
||||||
|
|
||||||
|
{$IFDEF FPC}
|
||||||
|
if GetProcessMemoryInfo(TempProcHWND, TempMemCtrs, TempMemCtrs.cb) then inc(Result, TempMemCtrs.WorkingSetSize);
|
||||||
|
{$ELSE}
|
||||||
|
if GetProcessMemoryInfo(TempProcHWND, @TempMemCtrs, TempMemCtrs.cb) then inc(Result, TempMemCtrs.WorkingSetSize);
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
|
CloseHandle(TempProcHWND);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
until not(Process32Next(TempHandle, TempProcess));
|
||||||
|
|
||||||
|
CloseHandle(TempHandle);
|
||||||
|
{$ENDIF}
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TCefApplication.GetTotalSystemMemory : uint64;
|
||||||
|
{$IFDEF MSWINDOWS}
|
||||||
|
var
|
||||||
|
TempMemStatus : TMyMemoryStatusEx;
|
||||||
|
{$ENDIF}
|
||||||
|
begin
|
||||||
|
Result := 0;
|
||||||
|
|
||||||
|
{$IFDEF MSWINDOWS}
|
||||||
|
ZeroMemory(@TempMemStatus, SizeOf(TMyMemoryStatusEx));
|
||||||
|
TempMemStatus.dwLength := SizeOf(TMyMemoryStatusEx);
|
||||||
|
if GetGlobalMemoryStatusEx(TempMemStatus) then Result := TempMemStatus.ullTotalPhys;
|
||||||
|
{$ENDIF}
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TCefApplication.GetAvailableSystemMemory : uint64;
|
||||||
|
{$IFDEF MSWINDOWS}
|
||||||
|
var
|
||||||
|
TempMemStatus : TMyMemoryStatusEx;
|
||||||
|
{$ENDIF}
|
||||||
|
begin
|
||||||
|
Result := 0;
|
||||||
|
|
||||||
|
{$IFDEF MSWINDOWS}
|
||||||
|
ZeroMemory(@TempMemStatus, SizeOf(TMyMemoryStatusEx));
|
||||||
|
TempMemStatus.dwLength := SizeOf(TMyMemoryStatusEx);
|
||||||
|
if GetGlobalMemoryStatusEx(TempMemStatus) then Result := TempMemStatus.ullAvailPhys;
|
||||||
|
{$ENDIF}
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TCefApplication.GetSystemMemoryLoad : cardinal;
|
||||||
|
{$IFDEF MSWINDOWS}
|
||||||
|
var
|
||||||
|
TempMemStatus : TMyMemoryStatusEx;
|
||||||
|
{$ENDIF}
|
||||||
|
begin
|
||||||
|
Result := 0;
|
||||||
|
|
||||||
|
{$IFDEF MSWINDOWS}
|
||||||
|
ZeroMemory(@TempMemStatus, SizeOf(TMyMemoryStatusEx));
|
||||||
|
TempMemStatus.dwLength := SizeOf(TMyMemoryStatusEx);
|
||||||
|
if GetGlobalMemoryStatusEx(TempMemStatus) then Result := TempMemStatus.dwMemoryLoad;
|
||||||
|
{$ENDIF}
|
||||||
|
end;
|
||||||
|
|
||||||
function TCefApplication.LoadCEFlibrary : boolean;
|
function TCefApplication.LoadCEFlibrary : boolean;
|
||||||
var
|
var
|
||||||
TempOldDir, TempString : string;
|
TempOldDir, TempString : string;
|
||||||
|
@ -127,6 +127,7 @@ function SystemTimeToTzSpecificLocalTime(lpTimeZoneInformation: PTimeZoneInforma
|
|||||||
|
|
||||||
function PathIsRelativeAnsi(pszPath: LPCSTR): BOOL; stdcall; external SHLWAPIDLL name 'PathIsRelativeA';
|
function PathIsRelativeAnsi(pszPath: LPCSTR): BOOL; stdcall; external SHLWAPIDLL name 'PathIsRelativeA';
|
||||||
function PathIsRelativeUnicode(pszPath: LPCWSTR): BOOL; stdcall; external SHLWAPIDLL name 'PathIsRelativeW';
|
function PathIsRelativeUnicode(pszPath: LPCWSTR): BOOL; stdcall; external SHLWAPIDLL name 'PathIsRelativeW';
|
||||||
|
function GetGlobalMemoryStatusEx(var Buffer: TMyMemoryStatusEx): BOOL; stdcall; external Kernel32DLL name 'GlobalMemoryStatusEx';
|
||||||
|
|
||||||
{$IFNDEF DELPHI12_UP}
|
{$IFNDEF DELPHI12_UP}
|
||||||
{$IFDEF WIN64}
|
{$IFDEF WIN64}
|
||||||
|
@ -2953,6 +2953,20 @@ type
|
|||||||
on_key_event : function(self: PCefWindowDelegate; window: PCefWindow; const event: PCefKeyEvent): Integer; stdcall;
|
on_key_event : function(self: PCefWindowDelegate; window: PCefWindow; const event: PCefKeyEvent): Integer; stdcall;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{$IFDEF MSWINDOWS}
|
||||||
|
TMyMemoryStatusEx = record
|
||||||
|
dwLength : DWORD;
|
||||||
|
dwMemoryLoad : DWORD;
|
||||||
|
ullTotalPhys : uint64;
|
||||||
|
ullAvailPhys : uint64;
|
||||||
|
ullTotalPageFile : uint64;
|
||||||
|
ullAvailPageFile : uint64;
|
||||||
|
ullTotalVirtual : uint64;
|
||||||
|
ullAvailVirtual : uint64;
|
||||||
|
ullAvailExtendedVirtual : uint64;
|
||||||
|
end;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user