You've already forked CEF4Delphi
mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-09-30 21:28:55 +02:00
Added GlobalCEFApp.SupportedSchemes
- Added TChromium.UpdateSupportedSchemes - Added local image selection to the EditorBrowser demo
This commit is contained in:
@@ -41,14 +41,15 @@ program EditorBrowser;
|
||||
|
||||
uses
|
||||
{$IFDEF DELPHI16_UP}
|
||||
Vcl.Forms,
|
||||
WinApi.Windows,
|
||||
Vcl.Forms,
|
||||
{$ELSE}
|
||||
Forms,
|
||||
Windows,
|
||||
{$ENDIF }
|
||||
uCEFApplication,
|
||||
uEditorBrowser in 'uEditorBrowser.pas' {Form1};
|
||||
uEditorBrowser in 'uEditorBrowser.pas' {EditorBrowserFrm},
|
||||
uImageSelection in 'uImageSelection.pas' {ImageSelectionFrm};
|
||||
|
||||
{$R *.res}
|
||||
|
||||
@@ -65,7 +66,8 @@ begin
|
||||
{$IFDEF DELPHI11_UP}
|
||||
Application.MainFormOnTaskbar := True;
|
||||
{$ENDIF}
|
||||
Application.CreateForm(TForm1, Form1);
|
||||
Application.CreateForm(TEditorBrowserFrm, EditorBrowserFrm);
|
||||
Application.CreateForm(TImageSelectionFrm, ImageSelectionFrm);
|
||||
Application.Run;
|
||||
end;
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{55E00327-9D98-4DA3-A4E1-844942A01C6B}</ProjectGuid>
|
||||
<ProjectVersion>18.5</ProjectVersion>
|
||||
<ProjectVersion>18.8</ProjectVersion>
|
||||
<FrameworkType>VCL</FrameworkType>
|
||||
<MainSource>EditorBrowser.dpr</MainSource>
|
||||
<Base>True</Base>
|
||||
@@ -135,7 +135,10 @@
|
||||
<MainSource>MainSource</MainSource>
|
||||
</DelphiCompile>
|
||||
<DCCReference Include="uEditorBrowser.pas">
|
||||
<Form>Form1</Form>
|
||||
<Form>EditorBrowserFrm</Form>
|
||||
</DCCReference>
|
||||
<DCCReference Include="uImageSelection.pas">
|
||||
<Form>ImageSelectionFrm</Form>
|
||||
</DCCReference>
|
||||
<BuildConfiguration Include="Release">
|
||||
<Key>Cfg_2</Key>
|
||||
@@ -165,7 +168,7 @@
|
||||
</Excluded_Packages>
|
||||
</Delphi.Personality>
|
||||
<Deployment Version="3">
|
||||
<DeployFile LocalName="..\..\bin\EditorBrowser.exe" Configuration="Debug" Class="ProjectOutput">
|
||||
<DeployFile LocalName="..\..\..\bin\EditorBrowser.exe" Configuration="Debug" Class="ProjectOutput">
|
||||
<Platform Name="Win32">
|
||||
<RemoteName>EditorBrowser.exe</RemoteName>
|
||||
<Overwrite>true</Overwrite>
|
||||
@@ -189,12 +192,20 @@
|
||||
<RemoteDir>classes</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android64">
|
||||
<RemoteDir>classes</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="AndroidFileProvider">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\xml</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android64">
|
||||
<RemoteDir>res\xml</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="AndroidGDBServer">
|
||||
<Platform Name="Android">
|
||||
@@ -207,96 +218,242 @@
|
||||
<RemoteDir>library\lib\armeabi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</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 Name="AndroidLibnativeMipsFile">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>library\lib\mips</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android64">
|
||||
<RemoteDir>library\lib\mips</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="AndroidServiceOutput">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</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 Name="AndroidSplashImageDef">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android64">
|
||||
<RemoteDir>res\drawable</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="AndroidSplashStyles">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\values</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android64">
|
||||
<RemoteDir>res\values</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="AndroidSplashStylesV21">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\values-v21</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</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 Name="Android_DefaultAppIcon">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android64">
|
||||
<RemoteDir>res\drawable</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_LauncherIcon144">
|
||||
<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_LauncherIcon36">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-ldpi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android64">
|
||||
<RemoteDir>res\drawable-ldpi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_LauncherIcon48">
|
||||
<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_LauncherIcon72">
|
||||
<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_LauncherIcon96">
|
||||
<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_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 Name="Android_SplashImage426">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-small</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android64">
|
||||
<RemoteDir>res\drawable-small</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_SplashImage470">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-normal</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android64">
|
||||
<RemoteDir>res\drawable-normal</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_SplashImage640">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-large</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android64">
|
||||
<RemoteDir>res\drawable-large</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_SplashImage960">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-xlarge</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</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 Name="DebugSymbols">
|
||||
<Platform Name="iOSSimulator">
|
||||
@@ -385,6 +542,9 @@
|
||||
<Platform Name="Android">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android64">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
@@ -417,6 +577,17 @@
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</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">
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
@@ -428,6 +599,39 @@
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</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">
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
@@ -439,6 +643,61 @@
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</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">
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
@@ -450,6 +709,116 @@
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</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">
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
@@ -483,10 +852,35 @@
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</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">
|
||||
<Platform Name="Android">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="ProjectiOSDeviceDebug">
|
||||
<Platform Name="iOSDevice32">
|
||||
@@ -579,6 +973,10 @@
|
||||
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android64">
|
||||
<RemoteDir>library\lib\arm64-v8a</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
@@ -603,6 +1001,12 @@
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="ProjectOutput_Android32">
|
||||
<Platform Name="Android64">
|
||||
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="ProjectUWPManifest">
|
||||
<Platform Name="Win32">
|
||||
<Operation>1</Operation>
|
||||
@@ -640,6 +1044,7 @@
|
||||
<ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
|
||||
<ProjectRoot Platform="OSX64" Name="$(PROJECTNAME).app"/>
|
||||
<ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/>
|
||||
<ProjectRoot Platform="Android64" Name="$(PROJECTNAME)"/>
|
||||
</Deployment>
|
||||
<Platforms>
|
||||
<Platform value="Win32">True</Platform>
|
||||
|
@@ -1,4 +1,4 @@
|
||||
object Form1: TForm1
|
||||
object EditorBrowserFrm: TEditorBrowserFrm
|
||||
Left = 0
|
||||
Top = 0
|
||||
Caption = 'Initializing browser. Please wait...'
|
||||
@@ -301,6 +301,8 @@ object Form1: TForm1
|
||||
object Chromium1: TChromium
|
||||
OnTextResultAvailable = Chromium1TextResultAvailable
|
||||
OnLoadEnd = Chromium1LoadEnd
|
||||
OnBeforeContextMenu = Chromium1BeforeContextMenu
|
||||
OnContextMenuCommand = Chromium1ContextMenuCommand
|
||||
OnAfterCreated = Chromium1AfterCreated
|
||||
OnBeforeClose = Chromium1BeforeClose
|
||||
OnClose = Chromium1Close
|
||||
@@ -1122,9 +1124,4 @@ object Form1: TForm1
|
||||
Left = 128
|
||||
Top = 200
|
||||
end
|
||||
object CEFSentinel1: TCEFSentinel
|
||||
OnClose = CEFSentinel1Close
|
||||
Left = 56
|
||||
Top = 256
|
||||
end
|
||||
end
|
||||
|
@@ -52,10 +52,13 @@ uses
|
||||
ImageList, ImgList,
|
||||
{$ENDIF}
|
||||
uCEFChromium, uCEFWindowParent, uCEFInterfaces, uCEFConstants, uCEFTypes,
|
||||
uCEFWinControl, uCEFSentinel;
|
||||
uCEFWinControl, uCEFSentinel, uCEFChromiumCore;
|
||||
|
||||
const
|
||||
MINIBROWSER_CONTEXTMENU_SHOWDEVTOOLS = MENU_ID_USER_FIRST + 1;
|
||||
|
||||
type
|
||||
TForm1 = class(TForm)
|
||||
TEditorBrowserFrm = class(TForm)
|
||||
Timer1: TTimer;
|
||||
Chromium1: TChromium;
|
||||
CEFWindowParent1: TCEFWindowParent;
|
||||
@@ -91,7 +94,6 @@ type
|
||||
RemoveFormatBtn: TToolButton;
|
||||
OutdentBtn: TToolButton;
|
||||
Separator7: TToolButton;
|
||||
CEFSentinel1: TCEFSentinel;
|
||||
|
||||
procedure Timer1Timer(Sender: TObject);
|
||||
|
||||
@@ -104,6 +106,8 @@ type
|
||||
procedure Chromium1BeforeClose(Sender: TObject; const browser: ICefBrowser);
|
||||
procedure Chromium1LoadEnd(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; httpStatusCode: Integer);
|
||||
procedure Chromium1TextResultAvailable(Sender: TObject; const aText: ustring);
|
||||
procedure Chromium1BeforeContextMenu(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; const params: ICefContextMenuParams; const model: ICefMenuModel);
|
||||
procedure Chromium1ContextMenuCommand(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame;const params: ICefContextMenuParams; commandId: Integer; eventFlags: Cardinal; out Result: Boolean);
|
||||
|
||||
procedure BoldBtnClick(Sender: TObject);
|
||||
procedure ItalicBtnClick(Sender: TObject);
|
||||
@@ -125,7 +129,6 @@ type
|
||||
procedure FillColorBtnClick(Sender: TObject);
|
||||
procedure RemoveFormatBtnClick(Sender: TObject);
|
||||
procedure OutdentBtnClick(Sender: TObject);
|
||||
procedure CEFSentinel1Close(Sender: TObject);
|
||||
|
||||
protected
|
||||
// Variables to control when can we destroy the form safely
|
||||
@@ -148,7 +151,7 @@ type
|
||||
end;
|
||||
|
||||
var
|
||||
Form1: TForm1;
|
||||
EditorBrowserFrm: TEditorBrowserFrm;
|
||||
|
||||
procedure CreateGlobalCEFApp;
|
||||
|
||||
@@ -157,7 +160,7 @@ implementation
|
||||
{$R *.dfm}
|
||||
|
||||
uses
|
||||
uCEFApplication, uCefMiscFunctions;
|
||||
uCEFApplication, uCefMiscFunctions, uImageSelection;
|
||||
|
||||
// This demo shows how to create a simple editor using a browser.
|
||||
|
||||
@@ -172,8 +175,7 @@ uses
|
||||
// =================
|
||||
// 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.
|
||||
// 3. TChromium.OnBeforeClose calls TCEFSentinel.Start, which will trigger TCEFSentinel.OnClose when the renderer processes are closed.
|
||||
// 4. TCEFSentinel.OnClose sets FCanClose := True and sends WM_CLOSE to the form.
|
||||
// 3. TChromium.OnBeforeClose sets FCanClose := True and sends WM_CLOSE to the form.
|
||||
|
||||
procedure CreateGlobalCEFApp;
|
||||
begin
|
||||
@@ -182,7 +184,7 @@ begin
|
||||
//GlobalCEFApp.LogSeverity := LOGSEVERITY_VERBOSE;
|
||||
end;
|
||||
|
||||
procedure TForm1.FillColorBtnClick(Sender: TObject);
|
||||
procedure TEditorBrowserFrm.FillColorBtnClick(Sender: TObject);
|
||||
var
|
||||
TempCode, TempHexColor : string;
|
||||
begin
|
||||
@@ -198,7 +200,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
||||
procedure TEditorBrowserFrm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
||||
begin
|
||||
CanClose := FCanClose;
|
||||
|
||||
@@ -210,7 +212,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TForm1.FormCreate(Sender: TObject);
|
||||
procedure TEditorBrowserFrm.FormCreate(Sender: TObject);
|
||||
begin
|
||||
FCanClose := False;
|
||||
FClosing := False;
|
||||
@@ -218,7 +220,7 @@ begin
|
||||
Chromium1.DefaultURL := 'file:///EditorBrowser.html';
|
||||
end;
|
||||
|
||||
procedure TForm1.FormShow(Sender: TObject);
|
||||
procedure TEditorBrowserFrm.FormShow(Sender: TObject);
|
||||
begin
|
||||
// You *MUST* call CreateBrowser to create and initialize the browser.
|
||||
// This will trigger the AfterCreated event when the browser is fully
|
||||
@@ -229,32 +231,52 @@ begin
|
||||
if not(Chromium1.CreateBrowser(CEFWindowParent1)) then Timer1.Enabled := True;
|
||||
end;
|
||||
|
||||
procedure TForm1.CEFSentinel1Close(Sender: TObject);
|
||||
begin
|
||||
FCanClose := True;
|
||||
PostMessage(Handle, WM_CLOSE, 0, 0);
|
||||
end;
|
||||
|
||||
procedure TForm1.Chromium1AfterCreated(Sender: TObject; const browser: ICefBrowser);
|
||||
procedure TEditorBrowserFrm.Chromium1AfterCreated(Sender: TObject; const browser: ICefBrowser);
|
||||
begin
|
||||
// Now the browser is fully initialized we can send a message to the main form to load the initial web page.
|
||||
PostMessage(Handle, CEF_AFTERCREATED, 0, 0);
|
||||
end;
|
||||
|
||||
procedure TForm1.Chromium1BeforeClose(Sender: TObject;
|
||||
const browser: ICefBrowser);
|
||||
procedure TEditorBrowserFrm.Chromium1BeforeClose(Sender: TObject; const browser: ICefBrowser);
|
||||
begin
|
||||
CEFSentinel1.Start;
|
||||
FCanClose := True;
|
||||
PostMessage(Handle, WM_CLOSE, 0, 0);
|
||||
end;
|
||||
|
||||
procedure TForm1.Chromium1Close(Sender: TObject;
|
||||
procedure TEditorBrowserFrm.Chromium1BeforeContextMenu(Sender: TObject;
|
||||
const browser: ICefBrowser; const frame: ICefFrame;
|
||||
const params: ICefContextMenuParams; const model: ICefMenuModel);
|
||||
begin
|
||||
model.AddItem(MINIBROWSER_CONTEXTMENU_SHOWDEVTOOLS, 'Show DevTools');
|
||||
end;
|
||||
|
||||
procedure TEditorBrowserFrm.Chromium1Close(Sender: TObject;
|
||||
const browser: ICefBrowser; var aAction : TCefCloseBrowserAction);
|
||||
begin
|
||||
PostMessage(Handle, CEF_DESTROY, 0, 0);
|
||||
aAction := cbaDelay;
|
||||
end;
|
||||
|
||||
procedure TForm1.Chromium1LoadEnd(Sender: TObject;
|
||||
procedure TEditorBrowserFrm.Chromium1ContextMenuCommand(Sender: TObject;
|
||||
const browser: ICefBrowser; const frame: ICefFrame;
|
||||
const params: ICefContextMenuParams; commandId: Integer;
|
||||
eventFlags: Cardinal; out Result: Boolean);
|
||||
var
|
||||
TempPoint : TPoint;
|
||||
begin
|
||||
Result := False;
|
||||
|
||||
case commandId of
|
||||
MINIBROWSER_CONTEXTMENU_SHOWDEVTOOLS :
|
||||
begin
|
||||
TempPoint.x := params.XCoord;
|
||||
TempPoint.y := params.YCoord;
|
||||
Chromium1.ShowDevTools(TempPoint, nil);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TEditorBrowserFrm.Chromium1LoadEnd(Sender: TObject;
|
||||
const browser: ICefBrowser; const frame: ICefFrame;
|
||||
httpStatusCode: Integer);
|
||||
begin
|
||||
@@ -264,7 +286,7 @@ begin
|
||||
EnableDesignMode;
|
||||
end;
|
||||
|
||||
procedure TForm1.Chromium1TextResultAvailable(Sender: TObject; const aText: ustring);
|
||||
procedure TEditorBrowserFrm.Chromium1TextResultAvailable(Sender: TObject; const aText: ustring);
|
||||
var
|
||||
TempLines : TStringList;
|
||||
begin
|
||||
@@ -289,7 +311,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TForm1.TextColorBtnClick(Sender: TObject);
|
||||
procedure TEditorBrowserFrm.TextColorBtnClick(Sender: TObject);
|
||||
var
|
||||
TempCode, TempHexColor : string;
|
||||
begin
|
||||
@@ -305,7 +327,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TForm1.EnableDesignMode;
|
||||
procedure TEditorBrowserFrm.EnableDesignMode;
|
||||
var
|
||||
TempCode : string;
|
||||
begin
|
||||
@@ -314,7 +336,7 @@ begin
|
||||
Chromium1.ExecuteJavaScript(TempCode, 'about:blank');
|
||||
end;
|
||||
|
||||
procedure TForm1.AlignCenterBtnClick(Sender: TObject);
|
||||
procedure TEditorBrowserFrm.AlignCenterBtnClick(Sender: TObject);
|
||||
var
|
||||
TempCode : string;
|
||||
begin
|
||||
@@ -323,7 +345,7 @@ begin
|
||||
Chromium1.ExecuteJavaScript(TempCode, 'about:blank');
|
||||
end;
|
||||
|
||||
procedure TForm1.AlignJustifyBtnClick(Sender: TObject);
|
||||
procedure TEditorBrowserFrm.AlignJustifyBtnClick(Sender: TObject);
|
||||
var
|
||||
TempCode : string;
|
||||
begin
|
||||
@@ -332,7 +354,7 @@ begin
|
||||
Chromium1.ExecuteJavaScript(TempCode, 'about:blank');
|
||||
end;
|
||||
|
||||
procedure TForm1.AlignLeftBtnClick(Sender: TObject);
|
||||
procedure TEditorBrowserFrm.AlignLeftBtnClick(Sender: TObject);
|
||||
var
|
||||
TempCode : string;
|
||||
begin
|
||||
@@ -341,7 +363,7 @@ begin
|
||||
Chromium1.ExecuteJavaScript(TempCode, 'about:blank');
|
||||
end;
|
||||
|
||||
procedure TForm1.AlignRightBtnClick(Sender: TObject);
|
||||
procedure TEditorBrowserFrm.AlignRightBtnClick(Sender: TObject);
|
||||
var
|
||||
TempCode : string;
|
||||
begin
|
||||
@@ -350,7 +372,7 @@ begin
|
||||
Chromium1.ExecuteJavaScript(TempCode, 'about:blank');
|
||||
end;
|
||||
|
||||
procedure TForm1.BoldBtnClick(Sender: TObject);
|
||||
procedure TEditorBrowserFrm.BoldBtnClick(Sender: TObject);
|
||||
var
|
||||
TempCode : string;
|
||||
begin
|
||||
@@ -359,18 +381,67 @@ begin
|
||||
Chromium1.ExecuteJavaScript(TempCode, 'about:blank');
|
||||
end;
|
||||
|
||||
procedure TForm1.ImageBtnClick(Sender: TObject);
|
||||
procedure TEditorBrowserFrm.ImageBtnClick(Sender: TObject);
|
||||
var
|
||||
TempCode, TempURL : string;
|
||||
TempCode : string;
|
||||
TempHTML : string;
|
||||
TempURL : string;
|
||||
TempPath : string;
|
||||
TempStream : TFileStream;
|
||||
TempBuffer : TBytes;
|
||||
TempSize : NativeUInt;
|
||||
begin
|
||||
// TODO: Replace InputBox
|
||||
TempURL := inputbox('Type the URL used in the image', 'URL : ', 'https://www.briskbard.com/images/logo5.png');
|
||||
TempCode := 'document.execCommand("insertImage", false, "' + TempURL + '");';
|
||||
TempStream := nil;
|
||||
TempBuffer := nil;
|
||||
|
||||
ImageSelectionFrm.ShowModal;
|
||||
|
||||
if (ImageSelectionFrm.ModalResult <> mrOk) then exit;
|
||||
|
||||
if ImageSelectionFrm.RemoteRb.Checked then
|
||||
begin
|
||||
TempURL := trim(ImageSelectionFrm.URLEdt.Text);
|
||||
|
||||
if (length(TempURL) > 0) then
|
||||
begin
|
||||
TempCode := 'document.execCommand("insertImage", false, "' + TempURL + '");';
|
||||
Chromium1.ExecuteJavaScript(TempCode, 'about:blank');
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
TempPath := trim(ImageSelectionFrm.FileEdt.Text);
|
||||
|
||||
if (length(TempPath) > 0) and FileExists(TempPath) then
|
||||
try
|
||||
try
|
||||
TempStream := TFileStream.Create(TempPath, fmOpenRead);
|
||||
TempSize := TempStream.Size;
|
||||
|
||||
if (TempSize > 0) then
|
||||
begin
|
||||
SetLength(TempBuffer, TempSize);
|
||||
TempSize := TempStream.Read(TempBuffer[0], TempSize);
|
||||
|
||||
if (TempSize > 0) then
|
||||
begin
|
||||
TempHTML := '<img src=' + quotedstr(CefGetDataURI(@TempBuffer[0], TempSize, 'image/png')) + '>';
|
||||
TempCode := 'document.execCommand("insertHTML", false, "' + TempHTML + '");';
|
||||
Chromium1.ExecuteJavaScript(TempCode, 'about:blank');
|
||||
end;
|
||||
end;
|
||||
except
|
||||
on e : exception do
|
||||
if CustomExceptionHandler('TEditorBrowserFrm.ImageBtnClick', e) then raise;
|
||||
end;
|
||||
finally
|
||||
if (TempStream <> nil) then FreeAndNil(TempStream);
|
||||
SetLength(TempBuffer, 0);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TForm1.IndentBtnClick(Sender: TObject);
|
||||
procedure TEditorBrowserFrm.IndentBtnClick(Sender: TObject);
|
||||
var
|
||||
TempCode : string;
|
||||
begin
|
||||
@@ -379,7 +450,7 @@ begin
|
||||
Chromium1.ExecuteJavaScript(TempCode, 'about:blank');
|
||||
end;
|
||||
|
||||
procedure TForm1.ItalicBtnClick(Sender: TObject);
|
||||
procedure TEditorBrowserFrm.ItalicBtnClick(Sender: TObject);
|
||||
var
|
||||
TempCode : string;
|
||||
begin
|
||||
@@ -388,7 +459,7 @@ begin
|
||||
Chromium1.ExecuteJavaScript(TempCode, 'about:blank');
|
||||
end;
|
||||
|
||||
procedure TForm1.LinkBtnClick(Sender: TObject);
|
||||
procedure TEditorBrowserFrm.LinkBtnClick(Sender: TObject);
|
||||
var
|
||||
TempCode, TempURL : string;
|
||||
begin
|
||||
@@ -399,12 +470,12 @@ begin
|
||||
Chromium1.ExecuteJavaScript(TempCode, 'about:blank');
|
||||
end;
|
||||
|
||||
procedure TForm1.SaveBtnClick(Sender: TObject);
|
||||
procedure TEditorBrowserFrm.SaveBtnClick(Sender: TObject);
|
||||
begin
|
||||
Chromium1.RetrieveHTML;
|
||||
end;
|
||||
|
||||
procedure TForm1.StrikethroughBtnClick(Sender: TObject);
|
||||
procedure TEditorBrowserFrm.StrikethroughBtnClick(Sender: TObject);
|
||||
var
|
||||
TempCode : string;
|
||||
begin
|
||||
@@ -413,7 +484,7 @@ begin
|
||||
Chromium1.ExecuteJavaScript(TempCode, 'about:blank');
|
||||
end;
|
||||
|
||||
procedure TForm1.UnderlineBtnClick(Sender: TObject);
|
||||
procedure TEditorBrowserFrm.UnderlineBtnClick(Sender: TObject);
|
||||
var
|
||||
TempCode : string;
|
||||
begin
|
||||
@@ -422,7 +493,7 @@ begin
|
||||
Chromium1.ExecuteJavaScript(TempCode, 'about:blank');
|
||||
end;
|
||||
|
||||
procedure TForm1.UnorderedListBtnClick(Sender: TObject);
|
||||
procedure TEditorBrowserFrm.UnorderedListBtnClick(Sender: TObject);
|
||||
var
|
||||
TempCode : string;
|
||||
begin
|
||||
@@ -431,24 +502,24 @@ begin
|
||||
Chromium1.ExecuteJavaScript(TempCode, 'about:blank');
|
||||
end;
|
||||
|
||||
procedure TForm1.BrowserCreatedMsg(var aMessage : TMessage);
|
||||
procedure TEditorBrowserFrm.BrowserCreatedMsg(var aMessage : TMessage);
|
||||
begin
|
||||
Caption := 'Editor Browser';
|
||||
end;
|
||||
|
||||
procedure TForm1.BrowserDestroyMsg(var aMessage : TMessage);
|
||||
procedure TEditorBrowserFrm.BrowserDestroyMsg(var aMessage : TMessage);
|
||||
begin
|
||||
CEFWindowParent1.Free;
|
||||
end;
|
||||
|
||||
procedure TForm1.Timer1Timer(Sender: TObject);
|
||||
procedure TEditorBrowserFrm.Timer1Timer(Sender: TObject);
|
||||
begin
|
||||
Timer1.Enabled := False;
|
||||
if not(Chromium1.CreateBrowser(CEFWindowParent1)) and not(Chromium1.Initialized) then
|
||||
Timer1.Enabled := True;
|
||||
end;
|
||||
|
||||
procedure TForm1.OpenBtnClick(Sender: TObject);
|
||||
procedure TEditorBrowserFrm.OpenBtnClick(Sender: TObject);
|
||||
begin
|
||||
OpenDialog1.Filter := 'HTML Files (*.html)|*.HTML';
|
||||
|
||||
@@ -456,7 +527,7 @@ begin
|
||||
Chromium1.LoadURL('file:///' + OpenDialog1.FileName); // TODO: The URL should be encoded
|
||||
end;
|
||||
|
||||
procedure TForm1.OrderedListBtnClick(Sender: TObject);
|
||||
procedure TEditorBrowserFrm.OrderedListBtnClick(Sender: TObject);
|
||||
var
|
||||
TempCode : string;
|
||||
begin
|
||||
@@ -465,7 +536,7 @@ begin
|
||||
Chromium1.ExecuteJavaScript(TempCode, 'about:blank');
|
||||
end;
|
||||
|
||||
procedure TForm1.OutdentBtnClick(Sender: TObject);
|
||||
procedure TEditorBrowserFrm.OutdentBtnClick(Sender: TObject);
|
||||
var
|
||||
TempCode : string;
|
||||
begin
|
||||
@@ -474,7 +545,7 @@ begin
|
||||
Chromium1.ExecuteJavaScript(TempCode, 'about:blank');
|
||||
end;
|
||||
|
||||
procedure TForm1.RemoveFormatBtnClick(Sender: TObject);
|
||||
procedure TEditorBrowserFrm.RemoveFormatBtnClick(Sender: TObject);
|
||||
var
|
||||
TempCode : string;
|
||||
begin
|
||||
@@ -483,35 +554,35 @@ begin
|
||||
Chromium1.ExecuteJavaScript(TempCode, 'about:blank');
|
||||
end;
|
||||
|
||||
procedure TForm1.NewBtnClick(Sender: TObject);
|
||||
procedure TEditorBrowserFrm.NewBtnClick(Sender: TObject);
|
||||
begin
|
||||
// TODO: Before clearing the document we should notify the user if the document has unsaved changes
|
||||
Chromium1.LoadURL('about:blank');
|
||||
EnableDesignMode;
|
||||
end;
|
||||
|
||||
procedure TForm1.WMMove(var aMessage : TWMMove);
|
||||
procedure TEditorBrowserFrm.WMMove(var aMessage : TWMMove);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
if (Chromium1 <> nil) then Chromium1.NotifyMoveOrResizeStarted;
|
||||
end;
|
||||
|
||||
procedure TForm1.WMMoving(var aMessage : TMessage);
|
||||
procedure TEditorBrowserFrm.WMMoving(var aMessage : TMessage);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
if (Chromium1 <> nil) then Chromium1.NotifyMoveOrResizeStarted;
|
||||
end;
|
||||
|
||||
procedure TForm1.WMEnterMenuLoop(var aMessage: TMessage);
|
||||
procedure TEditorBrowserFrm.WMEnterMenuLoop(var aMessage: TMessage);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
if (aMessage.wParam = 0) and (GlobalCEFApp <> nil) then GlobalCEFApp.OsmodalLoop := True;
|
||||
end;
|
||||
|
||||
procedure TForm1.WMExitMenuLoop(var aMessage: TMessage);
|
||||
procedure TEditorBrowserFrm.WMExitMenuLoop(var aMessage: TMessage);
|
||||
begin
|
||||
inherited;
|
||||
|
||||
|
134
demos/Delphi_VCL/EditorBrowser/uImageSelection.dfm
Normal file
134
demos/Delphi_VCL/EditorBrowser/uImageSelection.dfm
Normal file
@@ -0,0 +1,134 @@
|
||||
object ImageSelectionFrm: TImageSelectionFrm
|
||||
Left = 0
|
||||
Top = 0
|
||||
BorderIcons = [biSystemMenu]
|
||||
BorderStyle = bsSingle
|
||||
Caption = 'Image Selection'
|
||||
ClientHeight = 223
|
||||
ClientWidth = 481
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
DesignSize = (
|
||||
481
|
||||
223)
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object URLLbl: TLabel
|
||||
Left = 56
|
||||
Top = 51
|
||||
Width = 19
|
||||
Height = 13
|
||||
Caption = 'URL'
|
||||
end
|
||||
object FileLbl: TLabel
|
||||
Left = 56
|
||||
Top = 123
|
||||
Width = 16
|
||||
Height = 13
|
||||
Caption = 'File'
|
||||
end
|
||||
object FileBtn: TSpeedButton
|
||||
Left = 432
|
||||
Top = 120
|
||||
Width = 23
|
||||
Height = 22
|
||||
Glyph.Data = {
|
||||
36040000424D3604000000000000360000002800000010000000100000000100
|
||||
2000000000000004000000000000000000000000000000000000FF00FF00FF00
|
||||
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
|
||||
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
|
||||
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
|
||||
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF003737
|
||||
3700000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000003A3A3A00FF00FF00FF00FF000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
00000000000000000000000000000000000000000000FF00FF00FF00FF000000
|
||||
0000000000007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F
|
||||
7F007F7F7F007F7F7F007F7F7F000000000000000000FF00FF00FF00FF000000
|
||||
0000000000007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F
|
||||
7F007F7F7F007F7F7F007F7F7F000000000000000000FF00FF00FF00FF000000
|
||||
0000000000007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F
|
||||
7F007F7F7F007F7F7F007F7F7F000000000000000000FF00FF00FF00FF000000
|
||||
0000000000007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F
|
||||
7F007F7F7F007F7F7F007F7F7F000000000000000000FF00FF00FF00FF000000
|
||||
0000000000007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F
|
||||
7F007F7F7F007F7F7F007F7F7F000000000000000000FF00FF00FF00FF000000
|
||||
0000000000007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F7F007F7F
|
||||
7F007F7F7F007F7F7F007F7F7F000000000000000000FF00FF00FF00FF000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
00000000000000000000000000000000000000000000FF00FF00FF00FF000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
00000000000000000000000000000000000037373700FF00FF00FF00FF000000
|
||||
00000000000000000000000000000000000000000000000000007F7F7F00FF00
|
||||
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF003636
|
||||
360000000000000000000000000000000000000000007F7F7F00FF00FF00FF00
|
||||
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
|
||||
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
|
||||
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
|
||||
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
|
||||
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00}
|
||||
OnClick = FileBtnClick
|
||||
end
|
||||
object OkBtn: TButton
|
||||
Left = 268
|
||||
Top = 180
|
||||
Width = 75
|
||||
Height = 25
|
||||
Anchors = [akRight, akBottom]
|
||||
Caption = 'Ok'
|
||||
ModalResult = 1
|
||||
TabOrder = 4
|
||||
end
|
||||
object CancelBtn: TButton
|
||||
Left = 380
|
||||
Top = 180
|
||||
Width = 75
|
||||
Height = 25
|
||||
Anchors = [akRight, akBottom]
|
||||
Caption = 'Cancel'
|
||||
ModalResult = 2
|
||||
TabOrder = 5
|
||||
end
|
||||
object RemoteRb: TRadioButton
|
||||
Left = 24
|
||||
Top = 25
|
||||
Width = 113
|
||||
Height = 17
|
||||
Caption = 'Remote image'
|
||||
Checked = True
|
||||
TabOrder = 0
|
||||
TabStop = True
|
||||
end
|
||||
object LocalRb: TRadioButton
|
||||
Left = 24
|
||||
Top = 98
|
||||
Width = 113
|
||||
Height = 17
|
||||
Caption = 'Local image'
|
||||
TabOrder = 1
|
||||
end
|
||||
object URLEdt: TEdit
|
||||
Left = 104
|
||||
Top = 48
|
||||
Width = 351
|
||||
Height = 21
|
||||
TabOrder = 3
|
||||
Text = 'https://www.briskbard.com/images/logo5.png'
|
||||
end
|
||||
object FileEdt: TEdit
|
||||
Left = 104
|
||||
Top = 120
|
||||
Width = 321
|
||||
Height = 21
|
||||
TabOrder = 2
|
||||
end
|
||||
object OpenDialog1: TOpenDialog
|
||||
Left = 112
|
||||
Top = 176
|
||||
end
|
||||
end
|
79
demos/Delphi_VCL/EditorBrowser/uImageSelection.pas
Normal file
79
demos/Delphi_VCL/EditorBrowser/uImageSelection.pas
Normal file
@@ -0,0 +1,79 @@
|
||||
// ************************************************************************
|
||||
// ***************************** CEF4Delphi *******************************
|
||||
// ************************************************************************
|
||||
//
|
||||
// CEF4Delphi is based on DCEF3 which uses CEF to embed a chromium-based
|
||||
// browser in Delphi applications.
|
||||
//
|
||||
// The original license of DCEF3 still applies to CEF4Delphi.
|
||||
//
|
||||
// For more information about CEF4Delphi visit :
|
||||
// https://www.briskbard.com/index.php?lang=en&pageid=cef
|
||||
//
|
||||
// Copyright � 2019 Salvador Diaz Fau. All rights reserved.
|
||||
//
|
||||
// ************************************************************************
|
||||
// ************ vvvv Original license and comments below vvvv *************
|
||||
// ************************************************************************
|
||||
(*
|
||||
* Delphi Chromium Embedded 3
|
||||
*
|
||||
* Usage allowed under the restrictions of the Lesser GNU General Public License
|
||||
* or alternatively the restrictions of the Mozilla Public License 1.1
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
|
||||
* the specific language governing rights and limitations under the License.
|
||||
*
|
||||
* Unit owner : Henri Gourvest <hgourvest@gmail.com>
|
||||
* Web site : http://www.progdigy.com
|
||||
* Repository : http://code.google.com/p/delphichromiumembedded/
|
||||
* Group : http://groups.google.com/group/delphichromiumembedded
|
||||
*
|
||||
* Embarcadero Technologies, Inc is not permitted to use or redistribute
|
||||
* this source code without explicit permission.
|
||||
*
|
||||
*)
|
||||
|
||||
unit uImageSelection;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
|
||||
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.Buttons;
|
||||
|
||||
type
|
||||
TImageSelectionFrm = class(TForm)
|
||||
OkBtn: TButton;
|
||||
CancelBtn: TButton;
|
||||
RemoteRb: TRadioButton;
|
||||
LocalRb: TRadioButton;
|
||||
URLLbl: TLabel;
|
||||
URLEdt: TEdit;
|
||||
FileLbl: TLabel;
|
||||
FileEdt: TEdit;
|
||||
FileBtn: TSpeedButton;
|
||||
OpenDialog1: TOpenDialog;
|
||||
procedure FileBtnClick(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
ImageSelectionFrm: TImageSelectionFrm;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TImageSelectionFrm.FileBtnClick(Sender: TObject);
|
||||
begin
|
||||
OpenDialog1.Filter := 'PNG Files (*.png)|*.PNG';
|
||||
|
||||
if OpenDialog1.Execute then FileEdt.Text := OpenDialog1.FileName;
|
||||
end;
|
||||
|
||||
end.
|
@@ -89,9 +89,4 @@ object JSExtensionFrm: TJSExtensionFrm
|
||||
Left = 32
|
||||
Top = 288
|
||||
end
|
||||
object CEFSentinel1: TCEFSentinel
|
||||
OnClose = CEFSentinel1Close
|
||||
Left = 32
|
||||
Top = 360
|
||||
end
|
||||
end
|
||||
|
@@ -71,7 +71,6 @@ type
|
||||
CEFWindowParent1: TCEFWindowParent;
|
||||
Chromium1: TChromium;
|
||||
Timer1: TTimer;
|
||||
CEFSentinel1: TCEFSentinel;
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure GoBtnClick(Sender: TObject);
|
||||
procedure Chromium1BeforeContextMenu(Sender: TObject;
|
||||
@@ -100,7 +99,6 @@ type
|
||||
var aAction : TCefCloseBrowserAction);
|
||||
procedure Chromium1BeforeClose(Sender: TObject;
|
||||
const browser: ICefBrowser);
|
||||
procedure CEFSentinel1Close(Sender: TObject);
|
||||
protected
|
||||
FText : string;
|
||||
// Variables to control when can we destroy the form safely
|
||||
@@ -275,8 +273,7 @@ uses
|
||||
// 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.
|
||||
// 3. TChromium.OnBeforeClose calls TCEFSentinel.Start, which will trigger TCEFSentinel.OnClose when the renderer processes are closed.
|
||||
// 4. TCEFSentinel.OnClose sets FCanClose := True and sends WM_CLOSE to the form.
|
||||
// 3. TChromium.OnBeforeClose sets FCanClose := True and sends WM_CLOSE to the form.
|
||||
|
||||
|
||||
procedure GlobalCEFApp_OnWebKitInitialized;
|
||||
@@ -329,21 +326,15 @@ begin
|
||||
Chromium1.LoadURL(Edit1.Text);
|
||||
end;
|
||||
|
||||
procedure TJSExtensionFrm.CEFSentinel1Close(Sender: TObject);
|
||||
begin
|
||||
FCanClose := True;
|
||||
PostMessage(Handle, WM_CLOSE, 0, 0);
|
||||
end;
|
||||
|
||||
procedure TJSExtensionFrm.Chromium1AfterCreated(Sender: TObject; const browser: ICefBrowser);
|
||||
begin
|
||||
PostMessage(Handle, CEF_AFTERCREATED, 0, 0);
|
||||
end;
|
||||
|
||||
procedure TJSExtensionFrm.Chromium1BeforeClose(Sender: TObject;
|
||||
const browser: ICefBrowser);
|
||||
procedure TJSExtensionFrm.Chromium1BeforeClose(Sender: TObject; const browser: ICefBrowser);
|
||||
begin
|
||||
CEFSentinel1.Start;
|
||||
FCanClose := True;
|
||||
PostMessage(Handle, WM_CLOSE, 0, 0);
|
||||
end;
|
||||
|
||||
procedure TJSExtensionFrm.Chromium1BeforeContextMenu(Sender: TObject;
|
||||
|
@@ -164,6 +164,7 @@ type
|
||||
FMetricsRecordingOnly : boolean;
|
||||
FAllowFileAccessFromFiles : boolean;
|
||||
FAllowRunningInsecureContent : boolean;
|
||||
FSupportedSchemes : TStringList;
|
||||
|
||||
FPluginPolicy : TCefPluginPolicySwitch;
|
||||
FDefaultEncoding : string;
|
||||
@@ -314,6 +315,7 @@ type
|
||||
function FindFlashDLL(var aFileName : string) : boolean;
|
||||
{$ENDIF}
|
||||
procedure ShowErrorMessageDlg(const aError : string); virtual;
|
||||
procedure UpdateSupportedSchemes(aIncludeDefaults : boolean = True); virtual;
|
||||
function ParseProcessType : TCefProcessType;
|
||||
|
||||
public
|
||||
@@ -472,6 +474,7 @@ type
|
||||
property TotalSystemMemory : uint64 read GetTotalSystemMemory;
|
||||
property AvailableSystemMemory : uint64 read GetAvailableSystemMemory;
|
||||
property SystemMemoryLoad : cardinal read GetSystemMemoryLoad;
|
||||
property SupportedSchemes : TStringList read FSupportedSchemes;
|
||||
|
||||
// ICefApp
|
||||
property OnRegCustomSchemes : TOnRegisterCustomSchemesEvent read FOnRegisterCustomSchemes write FOnRegisterCustomSchemes;
|
||||
@@ -657,6 +660,7 @@ begin
|
||||
FDisableFeatures := '';
|
||||
FEnableBlinkFeatures := '';
|
||||
FDisableBlinkFeatures := '';
|
||||
FSupportedSchemes := nil;
|
||||
|
||||
FDisableJavascriptCloseWindows := False;
|
||||
FDisableJavascriptAccessClipboard := False;
|
||||
@@ -732,8 +736,8 @@ end;
|
||||
|
||||
destructor TCefApplicationCore.Destroy;
|
||||
begin
|
||||
if GlobalCEFApp = Self then
|
||||
GlobalCEFApp := nil;
|
||||
if (GlobalCEFApp = Self) then GlobalCEFApp := nil;
|
||||
|
||||
try
|
||||
if (FProcessType = ptBrowser) then ShutDown;
|
||||
|
||||
@@ -741,6 +745,7 @@ begin
|
||||
|
||||
if (FCustomCommandLines <> nil) then FreeAndNil(FCustomCommandLines);
|
||||
if (FCustomCommandLineValues <> nil) then FreeAndNil(FCustomCommandLineValues);
|
||||
if (FSupportedSchemes <> nil) then FreeAndNil(FSupportedSchemes);
|
||||
finally
|
||||
inherited Destroy;
|
||||
end;
|
||||
@@ -752,6 +757,7 @@ begin
|
||||
|
||||
FCustomCommandLines := TStringList.Create;
|
||||
FCustomCommandLineValues := TStringList.Create;
|
||||
FSupportedSchemes := TStringList.Create;
|
||||
end;
|
||||
|
||||
procedure TCefApplicationCore.AddCustomCommandLine(const aCommandLine, aValue : string);
|
||||
@@ -1372,6 +1378,24 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCefApplicationCore.UpdateSupportedSchemes(aIncludeDefaults : boolean);
|
||||
var
|
||||
TempManager : ICefCookieManager;
|
||||
begin
|
||||
try
|
||||
if (FSupportedSchemes <> nil) and
|
||||
(FSupportedSchemes.Count > 0) then
|
||||
begin
|
||||
TempManager := TCefCookieManagerRef.Global(nil);
|
||||
|
||||
if (TempManager <> nil) then
|
||||
TempManager.SetSupportedSchemes(FSupportedSchemes, aIncludeDefaults, nil);
|
||||
end;
|
||||
finally
|
||||
TempManager := nil;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TCefApplicationCore.ParseProcessType : TCefProcessType;
|
||||
const
|
||||
TYPE_PARAMETER_NAME = '--type=';
|
||||
@@ -1413,6 +1437,7 @@ end;
|
||||
procedure TCefApplicationCore.Internal_OnContextInitialized;
|
||||
begin
|
||||
FGlobalContextInitialized := True;
|
||||
UpdateSupportedSchemes;
|
||||
|
||||
if assigned(FOnContextInitialized) then FOnContextInitialized();
|
||||
end;
|
||||
|
@@ -613,6 +613,7 @@ type
|
||||
function VisitURLCookies(const url : ustring; includeHttpOnly : boolean = False; aID : integer = 0) : boolean;
|
||||
function SetCookie(const url, name_, value, domain, path: ustring; secure, httponly, hasExpires: Boolean; const creation, lastAccess, expires: TDateTime; aSetImmediately : boolean = True; aID : integer = 0): Boolean;
|
||||
function FlushCookieStore(aFlushImmediately : boolean = True) : boolean;
|
||||
procedure UpdateSupportedSchemes(const aSchemes : TStrings; aIncludeDefaults : boolean = True);
|
||||
|
||||
procedure ShowDevTools(const inspectElementAt: TPoint; aWindowInfo: PCefWindowInfo);
|
||||
procedure CloseDevTools(const aDevToolsWnd : TCefWindowHandle = 0);
|
||||
@@ -2751,7 +2752,9 @@ end;
|
||||
// TChromiumCore.OnCookiesVisited may not be triggered if the cookie store is empty but the
|
||||
// TChromium.OnCookieVisitorDestroyed event will always be triggered to signal when the browser
|
||||
// when the visit is over.
|
||||
function TChromiumCore.VisitURLCookies(const url : ustring; includeHttpOnly : boolean; aID : integer) : boolean;
|
||||
function TChromiumCore.VisitURLCookies(const url : ustring;
|
||||
includeHttpOnly : boolean;
|
||||
aID : integer) : boolean;
|
||||
var
|
||||
TempManager : ICefCookieManager;
|
||||
TempVisitor : ICefCookieVisitor;
|
||||
@@ -2833,6 +2836,23 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TChromiumCore.UpdateSupportedSchemes(const aSchemes : TStrings; aIncludeDefaults : boolean);
|
||||
var
|
||||
TempManager : ICefCookieManager;
|
||||
begin
|
||||
if Initialized and (FBrowser.Host <> nil) and (FBrowser.Host.RequestContext <> nil) then
|
||||
begin
|
||||
TempManager := FBrowser.Host.RequestContext.GetCookieManager(nil);
|
||||
|
||||
if (TempManager <> nil) then
|
||||
try
|
||||
TempManager.SetSupportedSchemes(aSchemes, aIncludeDefaults, nil);
|
||||
finally
|
||||
TempManager := nil;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
// If aClearImmediately is false then OnCertificateExceptionsCleared is triggered when the exceptions are cleared
|
||||
function TChromiumCore.ClearCertificateExceptions(aClearImmediately : boolean) : boolean;
|
||||
var
|
||||
|
@@ -166,16 +166,25 @@ begin
|
||||
TCefFastSetCookieCallback.Create(callback));
|
||||
end;
|
||||
|
||||
procedure TCefCookieManagerRef.SetSupportedSchemes(const schemes: TStrings; include_defaults: boolean; const callback: ICefCompletionCallback);
|
||||
procedure TCefCookieManagerRef.SetSupportedSchemes(const schemes : TStrings;
|
||||
include_defaults : boolean;
|
||||
const callback : ICefCompletionCallback);
|
||||
var
|
||||
TempSL : ICefStringList;
|
||||
TempHandle : TCefStringList;
|
||||
begin
|
||||
try
|
||||
if (schemes <> nil) and (schemes.count > 0) then
|
||||
begin
|
||||
TempSL := TCefStringListOwn.Create;
|
||||
TempSL.AddStrings(schemes);
|
||||
TempHandle := TempSL.Handle;
|
||||
end
|
||||
else
|
||||
TempHandle := nil;
|
||||
|
||||
PCefCookieManager(FData)^.set_supported_schemes(PCefCookieManager(FData),
|
||||
TempSL.Handle,
|
||||
TempHandle,
|
||||
ord(include_defaults),
|
||||
CefGetData(callback));
|
||||
finally
|
||||
@@ -183,7 +192,9 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCefCookieManagerRef.SetSupportedSchemesProc(const schemes: TStrings; include_defaults: boolean; const callback: TCefCompletionCallbackProc);
|
||||
procedure TCefCookieManagerRef.SetSupportedSchemesProc(const schemes : TStrings;
|
||||
include_defaults : boolean;
|
||||
const callback : TCefCompletionCallbackProc);
|
||||
begin
|
||||
SetSupportedSchemes(schemes, include_defaults, TCefFastCompletionCallback.Create(callback));
|
||||
end;
|
||||
|
@@ -2,7 +2,7 @@
|
||||
"UpdateLazPackages" : [
|
||||
{
|
||||
"ForceNotify" : true,
|
||||
"InternalVersion" : 75,
|
||||
"InternalVersion" : 76,
|
||||
"Name" : "cef4delphi_lazarus.lpk",
|
||||
"Version" : "78.3.9.0"
|
||||
}
|
||||
|
Reference in New Issue
Block a user