mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2024-11-24 08:02:15 +02:00
Update to CEF 83.3.9
This commit is contained in:
parent
58d988487b
commit
c44023cb21
@ -3,10 +3,10 @@ CEF4Delphi is an open source project created by Salvador Díaz Fau to embed Chro
|
||||
|
||||
CEF4Delphi is based on DCEF3, made by Henri Gourvest. The original license of DCEF3 still applies to CEF4Delphi. Read the license terms in the first lines of any *.pas file.
|
||||
|
||||
CEF4Delphi uses CEF 81.3.10 which includes Chromium 81.0.4044.138.
|
||||
CEF4Delphi uses CEF 83.3.9 which includes Chromium 83.0.4103.61.
|
||||
The CEF binaries used by CEF4Delphi are available for download at spotify :
|
||||
* [32 bits](http://opensource.spotify.com/cefbuilds/cef_binary_81.3.10%2Bgb223419%2Bchromium-81.0.4044.138_windows32.tar.bz2)
|
||||
* [64 bits](http://opensource.spotify.com/cefbuilds/cef_binary_81.3.10%2Bgb223419%2Bchromium-81.0.4044.138_windows64.tar.bz2)
|
||||
* [32 bits](http://opensource.spotify.com/cefbuilds/cef_binary_83.3.9%2Bged43e55%2Bchromium-83.0.4103.61_windows32.tar.bz2)
|
||||
* [64 bits](http://opensource.spotify.com/cefbuilds/cef_binary_83.3.9%2Bged43e55%2Bchromium-83.0.4103.61_windows64.tar.bz2)
|
||||
|
||||
|
||||
CEF4Delphi was developed and tested on Delphi 10.3.3 and it has been tested in Delphi 7, Delphi XE, Delphi 10, Delphi 10.2 and Lazarus 2.0.8/FPC 3.0.4. CEF4Delphi includes VCL, FireMonkey (FMX) and Lazarus components.
|
||||
|
@ -100,10 +100,6 @@ type
|
||||
var aAction : TCefCloseBrowserAction);
|
||||
procedure Chromium1BeforeClose(Sender: TObject;
|
||||
const browser: ICefBrowser);
|
||||
procedure Chromium1CookiesVisited(Sender: TObject; const name_, value,
|
||||
domain, path: ustring; secure, httponly, hasExpires: Boolean;
|
||||
const creation, lastAccess, expires: TDateTime; count,
|
||||
total, aID : Integer; var aDeleteCookie, aResult: Boolean);
|
||||
procedure Chromium1CookieSet(Sender: TObject; aSuccess: Boolean;
|
||||
aID: Integer);
|
||||
procedure Chromium1CookieVisitorDestroyed(Sender: TObject;
|
||||
@ -112,6 +108,11 @@ type
|
||||
const browser: ICefBrowser; const frame: ICefFrame;
|
||||
const request: ICefRequest; const response: ICefResponse;
|
||||
const cookie: PCefCookie; var aResult: Boolean);
|
||||
procedure Chromium1CookiesVisited(Sender: TObject; const name_, value,
|
||||
domain, path: ustring; secure, httponly, hasExpires: Boolean;
|
||||
const creation, lastAccess, expires: TDateTime; count, total,
|
||||
aID: Integer; same_site: TCefCookieSameSite; priority: Integer;
|
||||
var aDeleteCookie, aResult: Boolean);
|
||||
|
||||
private
|
||||
procedure WMMove(var aMessage : TWMMove); message WM_MOVE;
|
||||
@ -323,6 +324,8 @@ begin
|
||||
now,
|
||||
now,
|
||||
now + 1,
|
||||
CEF_COOKIE_SAME_SITE_UNSPECIFIED,
|
||||
CEF_COOKIE_PRIORITY_MEDIUM,
|
||||
False);
|
||||
end;
|
||||
end;
|
||||
@ -340,8 +343,9 @@ end;
|
||||
|
||||
procedure TCookieVisitorFrm.Chromium1CookiesVisited(Sender: TObject;
|
||||
const name_, value, domain, path: ustring; secure, httponly,
|
||||
hasExpires: Boolean; const creation, lastAccess, expires: TDateTime;
|
||||
count, total, aID: Integer; var aDeleteCookie, aResult: Boolean);
|
||||
hasExpires: Boolean; const creation, lastAccess, expires: TDateTime; count,
|
||||
total, aID: Integer; same_site: TCefCookieSameSite; priority: Integer;
|
||||
var aDeleteCookie, aResult: Boolean);
|
||||
var
|
||||
TempCookie : TCookie;
|
||||
begin
|
||||
@ -357,6 +361,8 @@ begin
|
||||
TempCookie.last_access := lastAccess;
|
||||
TempCookie.has_expires := hasExpires;
|
||||
TempCookie.expires := expires;
|
||||
TempCookie.same_site := same_site;
|
||||
TempCookie.priority := priority;
|
||||
|
||||
AddCookieInfo(TempCookie);
|
||||
|
||||
|
@ -22,11 +22,11 @@
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<TopLine Value="145"/>
|
||||
<CursorPos X="41" Y="166"/>
|
||||
<TopLine Value="338"/>
|
||||
<CursorPos X="38" Y="357"/>
|
||||
<UsageCount Value="24"/>
|
||||
<Bookmarks Count="1">
|
||||
<Item0 X="66" Y="256" ID="3"/>
|
||||
<Item0 X="66" Y="257" ID="3"/>
|
||||
</Bookmarks>
|
||||
<Loaded Value="True"/>
|
||||
<LoadedDesigner Value="True"/>
|
||||
@ -91,7 +91,7 @@
|
||||
<UsageCount Value="10"/>
|
||||
</Unit8>
|
||||
</Units>
|
||||
<JumpHistory Count="24" HistoryIndex="23">
|
||||
<JumpHistory Count="28" HistoryIndex="27">
|
||||
<Position1>
|
||||
<Filename Value="uCookieVisitor.pas"/>
|
||||
<Caret Line="191" Column="62" TopLine="176"/>
|
||||
@ -186,8 +186,24 @@
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="uCookieVisitor.pas"/>
|
||||
<Caret Line="166" Column="41" TopLine="145"/>
|
||||
<Caret Line="166" Column="41" TopLine="181"/>
|
||||
</Position24>
|
||||
<Position25>
|
||||
<Filename Value="uCookieVisitor.pas"/>
|
||||
<Caret Line="263" Column="3" TopLine="253"/>
|
||||
</Position25>
|
||||
<Position26>
|
||||
<Filename Value="uCookieVisitor.pas"/>
|
||||
<Caret Line="88" Column="56" TopLine="85"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
<Filename Value="uCookieVisitor.pas"/>
|
||||
<Caret Line="62" Column="29" TopLine="50"/>
|
||||
</Position27>
|
||||
<Position28>
|
||||
<Filename Value="uCookieVisitor.pas"/>
|
||||
<Caret Line="309" Column="50" TopLine="283"/>
|
||||
</Position28>
|
||||
</JumpHistory>
|
||||
<RunParams>
|
||||
<FormatVersion Value="2"/>
|
||||
|
@ -15,7 +15,7 @@ object CookieVisitorFrm: TCookieVisitorFrm
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '2.0.6.0'
|
||||
LCLVersion = '2.0.8.0'
|
||||
object AddressBarPnl: TPanel
|
||||
Left = 0
|
||||
Height = 21
|
||||
|
@ -85,6 +85,7 @@ type
|
||||
procedure Chromium1CookiesVisited(Sender: TObject; const name_, value,
|
||||
domain, path: ustring; secure, httponly, hasExpires: Boolean;
|
||||
const creation, lastAccess, expires: TDateTime; count, total, aID: Integer;
|
||||
same_site: TCefCookieSameSite; priority: Integer;
|
||||
var aDeleteCookie, aResult: Boolean);
|
||||
procedure Chromium1CookieVisitorDestroyed(Sender: TObject; aID: integer);
|
||||
procedure FormShow(Sender: TObject);
|
||||
@ -259,7 +260,8 @@ end;
|
||||
procedure TCookieVisitorFrm.Chromium1CookiesVisited(Sender: TObject;
|
||||
const name_, value, domain, path: ustring; secure, httponly,
|
||||
hasExpires: Boolean; const creation, lastAccess, expires: TDateTime; count,
|
||||
total, aID: Integer; var aDeleteCookie, aResult: Boolean);
|
||||
total, aID: Integer; same_site: TCefCookieSameSite; priority: Integer;
|
||||
var aDeleteCookie, aResult: Boolean);
|
||||
var
|
||||
TempCookie : TCookie;
|
||||
begin
|
||||
@ -274,7 +276,9 @@ begin
|
||||
TempCookie.creation := creation;
|
||||
TempCookie.last_access := lastAccess;
|
||||
TempCookie.has_expires := hasExpires;
|
||||
TempCookie.expires := expires;
|
||||
TempCookie.expires := expires;
|
||||
TempCookie.same_site := same_site;
|
||||
TempCookie.priority := priority;
|
||||
|
||||
AddCookieInfo(TempCookie);
|
||||
|
||||
@ -362,6 +366,8 @@ begin
|
||||
now,
|
||||
now,
|
||||
now,
|
||||
CEF_COOKIE_SAME_SITE_UNSPECIFIED,
|
||||
CEF_COOKIE_PRIORITY_MEDIUM,
|
||||
False);
|
||||
end;
|
||||
end;
|
||||
|
@ -1,232 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectSession>
|
||||
<PathDelim Value="\"/>
|
||||
<Version Value="11"/>
|
||||
<BuildModes Active="Default"/>
|
||||
<Units Count="22">
|
||||
<Unit0>
|
||||
<Filename Value="MiniBrowser.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<TopLine Value="46"/>
|
||||
<CursorPos Y="65"/>
|
||||
<UsageCount Value="22"/>
|
||||
<Loaded Value="True"/>
|
||||
<DefaultSyntaxHighlighter Value="Delphi"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="uMiniBrowser.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="MiniBrowserFrm"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<TopLine Value="509"/>
|
||||
<CursorPos X="48" Y="543"/>
|
||||
<UsageCount Value="22"/>
|
||||
<Bookmarks Count="3">
|
||||
<Item0 Y="842" ID="1"/>
|
||||
<Item1 X="49" Y="61" ID="2"/>
|
||||
<Item2 X="65" Y="1073" ID="3"/>
|
||||
</Bookmarks>
|
||||
<Loaded Value="True"/>
|
||||
<LoadedDesigner Value="True"/>
|
||||
<DefaultSyntaxHighlighter Value="Delphi"/>
|
||||
</Unit1>
|
||||
<Unit2>
|
||||
<Filename Value="uPreferences.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="PreferencesFrm"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="69"/>
|
||||
<CursorPos X="86" Y="70"/>
|
||||
<UsageCount Value="22"/>
|
||||
<DefaultSyntaxHighlighter Value="Delphi"/>
|
||||
</Unit2>
|
||||
<Unit3>
|
||||
<Filename Value="uSimpleTextViewer.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="SimpleTextViewerFrm"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<UsageCount Value="22"/>
|
||||
<DefaultSyntaxHighlighter Value="Delphi"/>
|
||||
</Unit3>
|
||||
<Unit4>
|
||||
<Filename Value="..\..\..\source\uCEFChromium.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="2356"/>
|
||||
<CursorPos X="53" Y="2379"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit4>
|
||||
<Unit5>
|
||||
<Filename Value="C:\lazarus\lcl\interfaces\win32\win32object.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="396"/>
|
||||
<CursorPos X="77" Y="404"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit5>
|
||||
<Unit6>
|
||||
<Filename Value="C:\lazarus\lcl\stdctrls.pp"/>
|
||||
<UnitName Value="StdCtrls"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="962"/>
|
||||
<CursorPos X="41" Y="979"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit6>
|
||||
<Unit7>
|
||||
<Filename Value="..\..\..\source\uCEFApplication.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="43"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit7>
|
||||
<Unit8>
|
||||
<Filename Value="..\..\..\source\uCEFTypes.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="280"/>
|
||||
<CursorPos X="51" Y="290"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit8>
|
||||
<Unit9>
|
||||
<Filename Value="..\..\..\source\uCEFInterfaces.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="2698"/>
|
||||
<CursorPos X="39" Y="2713"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit9>
|
||||
<Unit10>
|
||||
<Filename Value="..\..\..\source\uCEFButton.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="93"/>
|
||||
<CursorPos X="74" Y="95"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit10>
|
||||
<Unit11>
|
||||
<Filename Value="..\..\..\source\uCEFLabelButton.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="134"/>
|
||||
<CursorPos X="74" Y="142"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit11>
|
||||
<Unit12>
|
||||
<Filename Value="..\..\..\source\uCEFWindow.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="119"/>
|
||||
<CursorPos X="62" Y="124"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit12>
|
||||
<Unit13>
|
||||
<Filename Value="..\..\..\source\uCEFBrowserViewComponent.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="238"/>
|
||||
<CursorPos X="23" Y="257"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit13>
|
||||
<Unit14>
|
||||
<Filename Value="..\..\..\source\uCEFButtonComponent.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="177"/>
|
||||
<CursorPos X="55" Y="202"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit14>
|
||||
<Unit15>
|
||||
<Filename Value="..\..\..\source\uCEFWindowComponent.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="528"/>
|
||||
<CursorPos X="47" Y="547"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit15>
|
||||
<Unit16>
|
||||
<Filename Value="..\..\..\source\uCEFTextfieldComponent.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="424"/>
|
||||
<CursorPos X="47" Y="442"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit16>
|
||||
<Unit17>
|
||||
<Filename Value="..\..\..\source\uCEFViewComponent.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="685"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit17>
|
||||
<Unit18>
|
||||
<Filename Value="..\..\..\source\uCEFScrollViewComponent.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="219"/>
|
||||
<CursorPos X="47" Y="238"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit18>
|
||||
<Unit19>
|
||||
<Filename Value="..\..\..\source\uCEFPanelComponent.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="241"/>
|
||||
<CursorPos X="53" Y="251"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit19>
|
||||
<Unit20>
|
||||
<Filename Value="..\..\..\source\uCEFLabelButtonComponent.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="244"/>
|
||||
<CursorPos X="47" Y="263"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit20>
|
||||
<Unit21>
|
||||
<Filename Value="..\..\..\source\uCEFMenuButtonComponent.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="200"/>
|
||||
<CursorPos X="47" Y="219"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit21>
|
||||
</Units>
|
||||
<JumpHistory Count="10" HistoryIndex="9">
|
||||
<Position1>
|
||||
<Filename Value="MiniBrowser.lpr"/>
|
||||
<Caret Line="65" TopLine="46"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="uMiniBrowser.pas"/>
|
||||
<Caret Line="66" Column="75" TopLine="46"/>
|
||||
</Position2>
|
||||
<Position3>
|
||||
<Filename Value="uMiniBrowser.pas"/>
|
||||
<Caret Line="67" Column="39" TopLine="46"/>
|
||||
</Position3>
|
||||
<Position4>
|
||||
<Filename Value="uMiniBrowser.pas"/>
|
||||
<Caret Line="461" TopLine="448"/>
|
||||
</Position4>
|
||||
<Position5>
|
||||
<Filename Value="uMiniBrowser.pas"/>
|
||||
<Caret Line="48" Column="37" TopLine="22"/>
|
||||
</Position5>
|
||||
<Position6>
|
||||
<Filename Value="uMiniBrowser.pas"/>
|
||||
<Caret Line="310" Column="52" TopLine="295"/>
|
||||
</Position6>
|
||||
<Position7>
|
||||
<Filename Value="uMiniBrowser.pas"/>
|
||||
<Caret Line="1005" Column="88" TopLine="979"/>
|
||||
</Position7>
|
||||
<Position8>
|
||||
<Filename Value="uMiniBrowser.pas"/>
|
||||
<Caret Line="1037" Column="50" TopLine="996"/>
|
||||
</Position8>
|
||||
<Position9>
|
||||
<Filename Value="uMiniBrowser.pas"/>
|
||||
<Caret Line="1157" Column="62" TopLine="1129"/>
|
||||
</Position9>
|
||||
<Position10>
|
||||
<Filename Value="uMiniBrowser.pas"/>
|
||||
<Caret Line="214" Column="29" TopLine="191"/>
|
||||
</Position10>
|
||||
</JumpHistory>
|
||||
<RunParams>
|
||||
<FormatVersion Value="2"/>
|
||||
<Modes Count="0" ActiveMode=""/>
|
||||
</RunParams>
|
||||
</ProjectSession>
|
||||
</CONFIG>
|
@ -213,7 +213,8 @@ contains
|
||||
uCEFBrowserViewComponent in '..\source\uCEFBrowserViewComponent.pas',
|
||||
uCEFButtonComponent in '..\source\uCEFButtonComponent.pas',
|
||||
uCEFLabelButtonComponent in '..\source\uCEFLabelButtonComponent.pas',
|
||||
uCEFMenuButtonComponent in '..\source\uCEFMenuButtonComponent.pas';
|
||||
uCEFMenuButtonComponent in '..\source\uCEFMenuButtonComponent.pas',
|
||||
uCEFAudioHandler in '..\source\uCEFAudioHandler.pas';
|
||||
|
||||
end.
|
||||
|
||||
|
@ -298,6 +298,17 @@
|
||||
<DCCReference Include="..\source\uCEFMenuButtonDelegate.pas"/>
|
||||
<DCCReference Include="..\source\uCEFWindow.pas"/>
|
||||
<DCCReference Include="..\source\uCEFWindowDelegate.pas"/>
|
||||
<DCCReference Include="..\source\uCEFViewsFrameworkEvents.pas"/>
|
||||
<DCCReference Include="..\source\uCEFViewComponent.pas"/>
|
||||
<DCCReference Include="..\source\uCEFTextfieldComponent.pas"/>
|
||||
<DCCReference Include="..\source\uCEFScrollViewComponent.pas"/>
|
||||
<DCCReference Include="..\source\uCEFPanelComponent.pas"/>
|
||||
<DCCReference Include="..\source\uCEFWindowComponent.pas"/>
|
||||
<DCCReference Include="..\source\uCEFBrowserViewComponent.pas"/>
|
||||
<DCCReference Include="..\source\uCEFButtonComponent.pas"/>
|
||||
<DCCReference Include="..\source\uCEFLabelButtonComponent.pas"/>
|
||||
<DCCReference Include="..\source\uCEFMenuButtonComponent.pas"/>
|
||||
<DCCReference Include="..\source\uCEFAudioHandler.pas"/>
|
||||
<BuildConfiguration Include="Base">
|
||||
<Key>Base</Key>
|
||||
</BuildConfiguration>
|
||||
|
@ -210,6 +210,7 @@ contains
|
||||
uCEFBrowserViewComponent in '..\source\uCEFBrowserViewComponent.pas',
|
||||
uCEFButtonComponent in '..\source\uCEFButtonComponent.pas',
|
||||
uCEFLabelButtonComponent in '..\source\uCEFLabelButtonComponent.pas',
|
||||
uCEFMenuButtonComponent in '..\source\uCEFMenuButtonComponent.pas';
|
||||
uCEFMenuButtonComponent in '..\source\uCEFMenuButtonComponent.pas',
|
||||
uCEFAudioHandler in '..\source\uCEFAudioHandler.pas';
|
||||
|
||||
end.
|
||||
|
@ -218,7 +218,8 @@ contains
|
||||
uCEFBrowserViewComponent in '..\source\uCEFBrowserViewComponent.pas',
|
||||
uCEFButtonComponent in '..\source\uCEFButtonComponent.pas',
|
||||
uCEFLabelButtonComponent in '..\source\uCEFLabelButtonComponent.pas',
|
||||
uCEFMenuButtonComponent in '..\source\uCEFMenuButtonComponent.pas';
|
||||
uCEFMenuButtonComponent in '..\source\uCEFMenuButtonComponent.pas',
|
||||
uCEFAudioHandler in '..\source\uCEFAudioHandler.pas';
|
||||
|
||||
end.
|
||||
|
||||
|
@ -334,6 +334,7 @@
|
||||
<DCCReference Include="..\source\uCEFButtonComponent.pas"/>
|
||||
<DCCReference Include="..\source\uCEFLabelButtonComponent.pas"/>
|
||||
<DCCReference Include="..\source\uCEFMenuButtonComponent.pas"/>
|
||||
<DCCReference Include="..\source\uCEFAudioHandler.pas"/>
|
||||
<BuildConfiguration Include="Base">
|
||||
<Key>Base</Key>
|
||||
</BuildConfiguration>
|
||||
|
@ -21,8 +21,8 @@
|
||||
</CompilerOptions>
|
||||
<Description Value="CEF4Delphi is an open source project created by Salvador Díaz Fau to embed Chromium-based browsers in applications made with Delphi or Lazarus/FPC."/>
|
||||
<License Value="MPL 1.1"/>
|
||||
<Version Major="81" Minor="3" Release="10"/>
|
||||
<Files Count="185">
|
||||
<Version Major="83" Minor="3" Release="9"/>
|
||||
<Files Count="186">
|
||||
<Item1>
|
||||
<Filename Value="..\source\uCEFAccessibilityHandler.pas"/>
|
||||
<UnitName Value="uCEFAccessibilityHandler"/>
|
||||
@ -779,6 +779,10 @@
|
||||
<Filename Value="..\source\uCEFViewsFrameworkEvents.pas"/>
|
||||
<UnitName Value="uCEFViewsFrameworkEvents"/>
|
||||
</Item185>
|
||||
<Item186>
|
||||
<Filename Value="..\source\uCEFAudioHandler.pas"/>
|
||||
<UnitName Value="uCEFAudioHandler"/>
|
||||
</Item186>
|
||||
</Files>
|
||||
<RequiredPkgs Count="4">
|
||||
<Item1>
|
||||
|
@ -61,7 +61,7 @@ uses
|
||||
uCEFMenuButtonComponent, uCEFLabelButtonComponent, uCEFButtonComponent,
|
||||
uCEFBrowserViewComponent, uCEFWindowComponent, uCEFPanelComponent,
|
||||
uCEFScrollViewComponent, uCEFTextfieldComponent, uCEFViewComponent,
|
||||
uCEFViewsFrameworkEvents, LazarusPackageIntf;
|
||||
uCEFViewsFrameworkEvents, uCEFAudioHandler, LazarusPackageIntf;
|
||||
|
||||
implementation
|
||||
|
||||
|
@ -60,15 +60,15 @@ uses
|
||||
uCEFTypes, uCEFInterfaces, uCEFBaseRefCounted, uCEFSchemeRegistrar;
|
||||
|
||||
const
|
||||
CEF_SUPPORTED_VERSION_MAJOR = 81;
|
||||
CEF_SUPPORTED_VERSION_MAJOR = 83;
|
||||
CEF_SUPPORTED_VERSION_MINOR = 3;
|
||||
CEF_SUPPORTED_VERSION_RELEASE = 10;
|
||||
CEF_SUPPORTED_VERSION_RELEASE = 9;
|
||||
CEF_SUPPORTED_VERSION_BUILD = 0;
|
||||
|
||||
CEF_CHROMEELF_VERSION_MAJOR = 81;
|
||||
CEF_CHROMEELF_VERSION_MAJOR = 83;
|
||||
CEF_CHROMEELF_VERSION_MINOR = 0;
|
||||
CEF_CHROMEELF_VERSION_RELEASE = 4044;
|
||||
CEF_CHROMEELF_VERSION_BUILD = 138;
|
||||
CEF_CHROMEELF_VERSION_RELEASE = 4103;
|
||||
CEF_CHROMEELF_VERSION_BUILD = 61;
|
||||
|
||||
{$IFDEF MSWINDOWS}
|
||||
LIBCEF_DLL = 'libcef.dll';
|
||||
|
293
source/uCEFAudioHandler.pas
Normal file
293
source/uCEFAudioHandler.pas
Normal file
@ -0,0 +1,293 @@
|
||||
// ************************************************************************
|
||||
// ***************************** CEF4Delphi *******************************
|
||||
// ************************************************************************
|
||||
//
|
||||
// CEF4Delphi is based on DCEF3 which uses CEF3 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 © 2020 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 uCEFAudioHandler;
|
||||
|
||||
{$IFDEF FPC}
|
||||
{$MODE OBJFPC}{$H+}
|
||||
{$ENDIF}
|
||||
|
||||
{$IFNDEF CPUX64}{$ALIGN ON}{$ENDIF}
|
||||
{$MINENUMSIZE 4}
|
||||
|
||||
{$I cef.inc}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
uCEFBaseRefCounted, uCEFInterfaces, uCEFTypes;
|
||||
|
||||
type
|
||||
TCefAudioHandlerOwn = class(TCefBaseRefCountedOwn, ICefAudioHandler)
|
||||
protected
|
||||
procedure OnGetAudioParameters(const browser: ICefBrowser; var params: TCefAudioParameters; var aResult: boolean); virtual;
|
||||
procedure OnAudioStreamStarted(const browser: ICefBrowser; const params: TCefAudioParameters; channels: integer); virtual;
|
||||
procedure OnAudioStreamPacket(const browser: ICefBrowser; const data : PPSingle; frames: integer; pts: int64); virtual;
|
||||
procedure OnAudioStreamStopped(const browser: ICefBrowser); virtual;
|
||||
procedure OnAudioStreamError(const browser: ICefBrowser; const message_: ustring); virtual;
|
||||
|
||||
procedure RemoveReferences; virtual;
|
||||
|
||||
public
|
||||
constructor Create; virtual;
|
||||
end;
|
||||
|
||||
TCustomAudioHandler = class(TCefAudioHandlerOwn)
|
||||
protected
|
||||
FEvents : Pointer;
|
||||
|
||||
procedure OnGetAudioParameters(const browser: ICefBrowser; var params: TCefAudioParameters; var aResult: boolean); override;
|
||||
procedure OnAudioStreamStarted(const browser: ICefBrowser; const params: TCefAudioParameters; channels: integer); override;
|
||||
procedure OnAudioStreamPacket(const browser: ICefBrowser; const data : PPSingle; frames: integer; pts: int64); override;
|
||||
procedure OnAudioStreamStopped(const browser: ICefBrowser); override;
|
||||
procedure OnAudioStreamError(const browser: ICefBrowser; const message_: ustring); override;
|
||||
|
||||
procedure RemoveReferences; override;
|
||||
|
||||
public
|
||||
constructor Create(const events : IChromiumEvents); reintroduce; virtual;
|
||||
destructor Destroy; override;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
{$IFDEF DELPHI16_UP}
|
||||
System.SysUtils,
|
||||
{$ELSE}
|
||||
SysUtils,
|
||||
{$ENDIF}
|
||||
uCEFMiscFunctions, uCEFLibFunctions, uCEFBrowser;
|
||||
|
||||
function cef_audio_handler_get_audio_parameters(self : PCefAudioHandler;
|
||||
browser : PCefBrowser;
|
||||
params : PCefAudioParameters): Integer; stdcall;
|
||||
var
|
||||
TempObject : TObject;
|
||||
TempParams : TCefAudioParameters;
|
||||
TempResult : boolean;
|
||||
begin
|
||||
TempObject := CefGetObject(self);
|
||||
TempResult := False;
|
||||
|
||||
if (TempObject <> nil) and (TempObject is TCefAudioHandlerOwn) then
|
||||
begin
|
||||
TempParams := params^;
|
||||
TCefAudioHandlerOwn(TempObject).OnGetAudioParameters(TCefBrowserRef.UnWrap(browser),
|
||||
TempParams,
|
||||
TempResult);
|
||||
if TempResult then
|
||||
params^ := TempParams;
|
||||
end;
|
||||
|
||||
Result := ord(TempResult);
|
||||
end;
|
||||
|
||||
procedure cef_audio_handler_on_audio_stream_started( self : PCefAudioHandler;
|
||||
browser : PCefBrowser;
|
||||
const params : PCefAudioParameters;
|
||||
channels : integer); stdcall;
|
||||
var
|
||||
TempObject : TObject;
|
||||
begin
|
||||
TempObject := CefGetObject(self);
|
||||
|
||||
if (TempObject <> nil) and (TempObject is TCefAudioHandlerOwn) then
|
||||
TCefAudioHandlerOwn(TempObject).OnAudioStreamStarted(TCefBrowserRef.UnWrap(browser),
|
||||
params^,
|
||||
channels);
|
||||
end;
|
||||
|
||||
procedure cef_audio_handler_on_audio_stream_packet( self : PCefAudioHandler;
|
||||
browser : PCefBrowser;
|
||||
const data : PPSingle;
|
||||
frames : integer;
|
||||
pts : int64); stdcall;
|
||||
var
|
||||
TempObject : TObject;
|
||||
begin
|
||||
TempObject := CefGetObject(self);
|
||||
|
||||
if (TempObject <> nil) and (TempObject is TCefAudioHandlerOwn) then
|
||||
TCefAudioHandlerOwn(TempObject).OnAudioStreamPacket(TCefBrowserRef.UnWrap(browser),
|
||||
data,
|
||||
frames,
|
||||
pts);
|
||||
end;
|
||||
|
||||
procedure cef_audio_handler_on_audio_stream_stopped(self: PCefAudioHandler; browser: PCefBrowser); stdcall;
|
||||
var
|
||||
TempObject : TObject;
|
||||
begin
|
||||
TempObject := CefGetObject(self);
|
||||
|
||||
if (TempObject <> nil) and (TempObject is TCefAudioHandlerOwn) then
|
||||
TCefAudioHandlerOwn(TempObject).OnAudioStreamStopped(TCefBrowserRef.UnWrap(browser));
|
||||
end;
|
||||
|
||||
procedure cef_audio_handler_on_audio_stream_error(self: PCefAudioHandler; browser: PCefBrowser; const message_: PCefString); stdcall;
|
||||
var
|
||||
TempObject : TObject;
|
||||
begin
|
||||
TempObject := CefGetObject(self);
|
||||
|
||||
if (TempObject <> nil) and (TempObject is TCefAudioHandlerOwn) then
|
||||
TCefAudioHandlerOwn(TempObject).OnAudioStreamError(TCefBrowserRef.UnWrap(browser),
|
||||
CefString(message_));
|
||||
end;
|
||||
|
||||
constructor TCefAudioHandlerOwn.Create;
|
||||
begin
|
||||
inherited CreateData(SizeOf(TCefAudioHandler));
|
||||
|
||||
with PCefAudioHandler(FData)^ do
|
||||
begin
|
||||
get_audio_parameters := {$IFDEF FPC}@{$ENDIF}cef_audio_handler_get_audio_parameters;
|
||||
on_audio_stream_started := {$IFDEF FPC}@{$ENDIF}cef_audio_handler_on_audio_stream_started;
|
||||
on_audio_stream_packet := {$IFDEF FPC}@{$ENDIF}cef_audio_handler_on_audio_stream_packet;
|
||||
on_audio_stream_stopped := {$IFDEF FPC}@{$ENDIF}cef_audio_handler_on_audio_stream_stopped;
|
||||
on_audio_stream_error := {$IFDEF FPC}@{$ENDIF}cef_audio_handler_on_audio_stream_error;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCefAudioHandlerOwn.OnGetAudioParameters(const browser : ICefBrowser;
|
||||
var params : TCefAudioParameters;
|
||||
var aResult : boolean);
|
||||
begin
|
||||
//
|
||||
end;
|
||||
|
||||
procedure TCefAudioHandlerOwn.OnAudioStreamStarted(const browser : ICefBrowser;
|
||||
const params : TCefAudioParameters;
|
||||
channels : integer);
|
||||
begin
|
||||
//
|
||||
end;
|
||||
|
||||
procedure TCefAudioHandlerOwn.OnAudioStreamPacket(const browser : ICefBrowser;
|
||||
const data : PPSingle;
|
||||
frames : integer;
|
||||
pts : int64);
|
||||
begin
|
||||
//
|
||||
end;
|
||||
|
||||
procedure TCefAudioHandlerOwn.OnAudioStreamStopped(const browser : ICefBrowser);
|
||||
begin
|
||||
//
|
||||
end;
|
||||
|
||||
procedure TCefAudioHandlerOwn.OnAudioStreamError(const browser : ICefBrowser;
|
||||
const message_ : ustring);
|
||||
begin
|
||||
//
|
||||
end;
|
||||
|
||||
procedure TCefAudioHandlerOwn.RemoveReferences;
|
||||
begin
|
||||
//
|
||||
end;
|
||||
|
||||
|
||||
// TCustomAudioHandler
|
||||
|
||||
constructor TCustomAudioHandler.Create(const events : IChromiumEvents);
|
||||
begin
|
||||
inherited Create;
|
||||
|
||||
FEvents := Pointer(events);
|
||||
end;
|
||||
|
||||
destructor TCustomAudioHandler.Destroy;
|
||||
begin
|
||||
RemoveReferences;
|
||||
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
procedure TCustomAudioHandler.RemoveReferences;
|
||||
begin
|
||||
FEvents := nil;
|
||||
end;
|
||||
|
||||
procedure TCustomAudioHandler.OnGetAudioParameters(const browser : ICefBrowser;
|
||||
var params : TCefAudioParameters;
|
||||
var aResult : boolean);
|
||||
begin
|
||||
if (FEvents <> nil) then
|
||||
IChromiumEvents(FEvents).doOnGetAudioParameters(browser,
|
||||
params,
|
||||
aResult);
|
||||
end;
|
||||
|
||||
procedure TCustomAudioHandler.OnAudioStreamStarted(const browser : ICefBrowser;
|
||||
const params : TCefAudioParameters;
|
||||
channels : integer);
|
||||
begin
|
||||
if (FEvents <> nil) then
|
||||
IChromiumEvents(FEvents).doOnAudioStreamStarted(browser,
|
||||
params,
|
||||
channels);
|
||||
end;
|
||||
|
||||
procedure TCustomAudioHandler.OnAudioStreamPacket(const browser : ICefBrowser;
|
||||
const data : PPSingle;
|
||||
frames : integer;
|
||||
pts : int64);
|
||||
begin
|
||||
if (FEvents <> nil) then
|
||||
IChromiumEvents(FEvents).doOnAudioStreamPacket(browser,
|
||||
data,
|
||||
frames,
|
||||
pts);
|
||||
end;
|
||||
|
||||
procedure TCustomAudioHandler.OnAudioStreamStopped(const browser : ICefBrowser);
|
||||
begin
|
||||
if (FEvents <> nil) then
|
||||
IChromiumEvents(FEvents).doOnAudioStreamStopped(browser);
|
||||
end;
|
||||
|
||||
procedure TCustomAudioHandler.OnAudioStreamError(const browser : ICefBrowser;
|
||||
const message_ : ustring);
|
||||
begin
|
||||
if (FEvents <> nil) then
|
||||
IChromiumEvents(FEvents).doOnAudioStreamError(browser,
|
||||
message_);
|
||||
end;
|
||||
|
||||
end.
|
@ -262,6 +262,13 @@ type
|
||||
FOnRouteStateChanged : TOnRouteStateChangedEvent;
|
||||
FOnRouteMessageReceived : TOnRouteMessageReceivedEvent;
|
||||
|
||||
// ICefAudioHandler
|
||||
FOnGetAudioParameters : TOnGetAudioParametersEvent;
|
||||
FOnAudioStreamStarted : TOnAudioStreamStartedEvent;
|
||||
FOnAudioStreamPacket : TOnAudioStreamPacketEvent;
|
||||
FOnAudioStreamStopped : TOnAudioStreamStoppedEvent;
|
||||
FOnAudioStreamError : TOnAudioStreamErrorEvent;
|
||||
|
||||
// Custom
|
||||
FOnTextResultAvailable : TOnTextResultAvailableEvent;
|
||||
FOnPdfPrintFinished : TOnPdfPrintFinishedEvent;
|
||||
@ -548,6 +555,13 @@ type
|
||||
procedure doOnRouteStateChanged(const route: ICefMediaRoute; state: TCefMediaRouteConnectionState);
|
||||
procedure doOnRouteMessageReceived(const route: ICefMediaRoute; const message_: ustring);
|
||||
|
||||
// ICefAudioHandler
|
||||
procedure doOnGetAudioParameters(const browser: ICefBrowser; var params: TCefAudioParameters; var aResult: boolean);
|
||||
procedure doOnAudioStreamStarted(const browser: ICefBrowser; const params: TCefAudioParameters; channels: integer);
|
||||
procedure doOnAudioStreamPacket(const browser: ICefBrowser; const data : PPSingle; frames: integer; pts: int64);
|
||||
procedure doOnAudioStreamStopped(const browser: ICefBrowser);
|
||||
procedure doOnAudioStreamError(const browser: ICefBrowser; const message_: ustring);
|
||||
|
||||
// Custom
|
||||
procedure doCookiesDeleted(numDeleted : integer); virtual;
|
||||
procedure doPdfPrintFinished(aResultOK : boolean); virtual;
|
||||
@ -563,7 +577,7 @@ type
|
||||
procedure doHttpAuthCredentialsCleared; virtual;
|
||||
procedure doAllConnectionsClosed; virtual;
|
||||
procedure doOnExecuteTaskOnCefThread(aTaskID : cardinal); virtual;
|
||||
procedure doOnCookiesVisited(const name_, value, domain, path: ustring; secure, httponly, hasExpires: Boolean; const creation, lastAccess, expires: TDateTime; count, total, aID : Integer; var aDeleteCookie, aResult : Boolean); virtual;
|
||||
procedure doOnCookiesVisited(const name_, value, domain, path: ustring; secure, httponly, hasExpires: Boolean; const creation, lastAccess, expires: TDateTime; count, total, aID : Integer; same_site : TCefCookieSameSite; priority : TCefCookiePriority; var aDeleteCookie, aResult : Boolean); virtual;
|
||||
procedure doOnCookieVisitorDestroyed(aID : integer); virtual;
|
||||
procedure doOnCookieSet(aSuccess : boolean; aID : integer); virtual;
|
||||
procedure doUpdateZoomStep(aInc : boolean); virtual;
|
||||
@ -573,6 +587,7 @@ type
|
||||
procedure doSetZoomPct(const aValue : double); virtual;
|
||||
procedure doSetZoomStep(aValue : byte); virtual;
|
||||
procedure doMediaRouteCreateFinished(result: TCefMediaRouterCreateResult; const error: ustring; const route: ICefMediaRoute); virtual;
|
||||
function MustCreateAudioHandler : boolean; virtual;
|
||||
function MustCreateLoadHandler : boolean; virtual;
|
||||
function MustCreateFocusHandler : boolean; virtual;
|
||||
function MustCreateContextMenuHandler : boolean; virtual;
|
||||
@ -659,7 +674,7 @@ type
|
||||
function DeleteCookies(const url : ustring = ''; const cookieName : ustring = ''; aDeleteImmediately : boolean = False) : boolean;
|
||||
function VisitAllCookies(aID : integer = 0) : boolean;
|
||||
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 SetCookie(const url, name_, value, domain, path: ustring; secure, httponly, hasExpires: Boolean; const creation, lastAccess, expires: TDateTime; same_site : TCefCookieSameSite; priority : TCefCookiePriority; aSetImmediately : boolean = True; aID : integer = 0): Boolean;
|
||||
function FlushCookieStore(aFlushImmediately : boolean = True) : boolean;
|
||||
procedure UpdateSupportedSchemes(const aSchemes : TStrings; aIncludeDefaults : boolean = True);
|
||||
|
||||
@ -951,6 +966,13 @@ type
|
||||
property OnRoutes : TOnRoutesEvent read FOnRoutes write FOnRoutes;
|
||||
property OnRouteStateChanged : TOnRouteStateChangedEvent read FOnRouteStateChanged write FOnRouteStateChanged;
|
||||
property OnRouteMessageReceived : TOnRouteMessageReceivedEvent read FOnRouteMessageReceived write FOnRouteMessageReceived;
|
||||
|
||||
// ICefAudioHandler
|
||||
property OnGetAudioParameters : TOnGetAudioParametersEvent read FOnGetAudioParameters write FOnGetAudioParameters;
|
||||
property OnAudioStreamStarted : TOnAudioStreamStartedEvent read FOnAudioStreamStarted write FOnAudioStreamStarted;
|
||||
property OnAudioStreamPacket : TOnAudioStreamPacketEvent read FOnAudioStreamPacket write FOnAudioStreamPacket;
|
||||
property OnAudioStreamStopped : TOnAudioStreamStoppedEvent read FOnAudioStreamStopped write FOnAudioStreamStopped;
|
||||
property OnAudioStreamError : TOnAudioStreamErrorEvent read FOnAudioStreamError write FOnAudioStreamError;
|
||||
end;
|
||||
|
||||
TBrowserInfo = class
|
||||
@ -1541,6 +1563,13 @@ begin
|
||||
FOnRouteStateChanged := nil;
|
||||
FOnRouteMessageReceived := nil;
|
||||
|
||||
// ICefAudioHandler
|
||||
FOnGetAudioParameters := nil;
|
||||
FOnAudioStreamStarted := nil;
|
||||
FOnAudioStreamPacket := nil;
|
||||
FOnAudioStreamStopped := nil;
|
||||
FOnAudioStreamError := nil;
|
||||
|
||||
// Custom
|
||||
FOnTextResultAvailable := nil;
|
||||
FOnPdfPrintFinished := nil;
|
||||
@ -3100,6 +3129,8 @@ end;
|
||||
function TChromiumCore.SetCookie(const url, name_, value, domain, path: ustring;
|
||||
secure, httponly, hasExpires: Boolean;
|
||||
const creation, lastAccess, expires: TDateTime;
|
||||
same_site : TCefCookieSameSite;
|
||||
priority : TCefCookiePriority;
|
||||
aSetImmediately : boolean;
|
||||
aID : integer): Boolean;
|
||||
var
|
||||
@ -3127,6 +3158,7 @@ begin
|
||||
Result := TempManager.SetCookie(url, name_, value, domain, path,
|
||||
secure, httponly, hasExpires,
|
||||
creation, lastAccess, expires,
|
||||
same_site, priority,
|
||||
TempCallback);
|
||||
finally
|
||||
TempCallback := nil;
|
||||
@ -4173,6 +4205,8 @@ procedure TChromiumCore.doOnCookiesVisited(const name_, value, domain, path: ust
|
||||
secure, httponly, hasExpires: Boolean;
|
||||
const creation, lastAccess, expires: TDateTime;
|
||||
count, total, aID : Integer;
|
||||
same_site : TCefCookieSameSite;
|
||||
priority : TCefCookiePriority;
|
||||
var aDeleteCookie, aResult : Boolean);
|
||||
begin
|
||||
if assigned(FOnCookiesVisited) then
|
||||
@ -4180,6 +4214,7 @@ begin
|
||||
secure, httponly, hasExpires,
|
||||
creation, lastAccess, expires,
|
||||
count, total, aID,
|
||||
same_site, priority,
|
||||
aDeleteCookie, aResult);
|
||||
end;
|
||||
|
||||
@ -4502,6 +4537,15 @@ begin
|
||||
assigned(FOnRouteMessageReceived);
|
||||
end;
|
||||
|
||||
function TChromiumCore.MustCreateAudioHandler : boolean;
|
||||
begin
|
||||
Result := assigned(FOnGetAudioParameters) or
|
||||
assigned(FOnAudioStreamStarted) or
|
||||
assigned(FOnAudioStreamPacket) or
|
||||
assigned(FOnAudioStreamStopped) or
|
||||
assigned(FOnAudioStreamError);
|
||||
end;
|
||||
|
||||
{$IFDEF MSWINDOWS}
|
||||
procedure TChromiumCore.PrefsAvailableMsg(aResultOK : boolean);
|
||||
begin
|
||||
@ -5138,6 +5182,44 @@ begin
|
||||
FOnRouteMessageReceived(self, route, message_);
|
||||
end;
|
||||
|
||||
procedure TChromiumCore.doOnGetAudioParameters(const browser : ICefBrowser;
|
||||
var params : TCefAudioParameters;
|
||||
var aResult : boolean);
|
||||
begin
|
||||
if assigned(FOnGetAudioParameters) then
|
||||
FOnGetAudioParameters(self, browser, params, aResult);
|
||||
end;
|
||||
|
||||
procedure TChromiumCore.doOnAudioStreamStarted(const browser : ICefBrowser;
|
||||
const params : TCefAudioParameters;
|
||||
channels : integer);
|
||||
begin
|
||||
if assigned(FOnAudioStreamStarted) then
|
||||
FOnAudioStreamStarted(self, browser, params, channels);
|
||||
end;
|
||||
|
||||
procedure TChromiumCore.doOnAudioStreamPacket(const browser : ICefBrowser;
|
||||
const data : PPSingle;
|
||||
frames : integer;
|
||||
pts : int64);
|
||||
begin
|
||||
if assigned(FOnAudioStreamPacket) then
|
||||
FOnAudioStreamPacket(self, browser, data, frames, pts);
|
||||
end;
|
||||
|
||||
procedure TChromiumCore.doOnAudioStreamStopped(const browser: ICefBrowser);
|
||||
begin
|
||||
if assigned(FOnAudioStreamStopped) then
|
||||
FOnAudioStreamStopped(self, browser);
|
||||
end;
|
||||
|
||||
procedure TChromiumCore.doOnAudioStreamError(const browser : ICefBrowser;
|
||||
const message_ : ustring);
|
||||
begin
|
||||
if assigned(FOnAudioStreamError) then
|
||||
FOnAudioStreamError(self, browser, message_);
|
||||
end;
|
||||
|
||||
procedure TChromiumCore.doOnFullScreenModeChange(const browser : ICefBrowser;
|
||||
fullscreen : Boolean);
|
||||
begin
|
||||
|
@ -172,6 +172,13 @@ type
|
||||
TOnRouteStateChangedEvent = procedure(Sender: TObject; const route: ICefMediaRoute; state: TCefMediaRouteConnectionState) of object;
|
||||
TOnRouteMessageReceivedEvent = procedure(Sender: TObject; const route: ICefMediaRoute; const message_: ustring) of object;
|
||||
|
||||
// ICefAudioHandler
|
||||
TOnGetAudioParametersEvent = procedure(Sender: TObject; const browser: ICefBrowser; var params: TCefAudioParameters; var aResult: boolean) of object;
|
||||
TOnAudioStreamStartedEvent = procedure(Sender: TObject; const browser: ICefBrowser; const params: TCefAudioParameters; channels: integer) of object;
|
||||
TOnAudioStreamPacketEvent = procedure(Sender: TObject; const browser: ICefBrowser; const data : PPSingle; frames: integer; pts: int64) of object;
|
||||
TOnAudioStreamStoppedEvent = procedure(Sender: TObject; const browser: ICefBrowser) of object;
|
||||
TOnAudioStreamErrorEvent = procedure(Sender: TObject; const browser: ICefBrowser; const message_: ustring) of object;
|
||||
|
||||
// Custom
|
||||
TOnTextResultAvailableEvent = procedure(Sender: TObject; const aText : ustring) of object;
|
||||
TOnPdfPrintFinishedEvent = procedure(Sender: TObject; aResultOK : boolean) of object;
|
||||
@ -181,7 +188,7 @@ type
|
||||
TOnNavigationVisitorResultAvailableEvent = procedure(const entry: ICefNavigationEntry; current: Boolean; index, total: Integer; var aResult : boolean) of object;
|
||||
TOnDownloadImageFinishedEvent = procedure(Sender: TObject; const imageUrl: ustring; httpStatusCode: Integer; const image: ICefImage) of object;
|
||||
TOnExecuteTaskOnCefThread = procedure(Sender: TObject; aTaskID : cardinal) of object;
|
||||
TOnCookiesVisited = procedure(Sender: TObject; const name_, value, domain, path: ustring; secure, httponly, hasExpires: Boolean; const creation, lastAccess, expires: TDateTime; count, total, aID : Integer; var aDeleteCookie, aResult : Boolean) of object;
|
||||
TOnCookiesVisited = procedure(Sender: TObject; const name_, value, domain, path: ustring; secure, httponly, hasExpires: Boolean; const creation, lastAccess, expires: TDateTime; count, total, aID : Integer; same_site : TCefCookieSameSite; priority : TCefCookiePriority; var aDeleteCookie, aResult : Boolean) of object;
|
||||
TOnCookieVisitorDestroyed = procedure(Sender: TObject; aID : integer) of object;
|
||||
TOnCookieSet = procedure(Sender: TObject; aSuccess : boolean; aID : integer) of object;
|
||||
TOnZoomPctAvailable = procedure(Sender: TObject; const aZoomPct : double) of object;
|
||||
|
@ -54,6 +54,7 @@ uses
|
||||
type
|
||||
TCefClientRef = class(TCefBaseRefCountedRef, ICefClient)
|
||||
protected
|
||||
procedure GetAudioHandler(var aHandler : ICefAudioHandler); virtual;
|
||||
procedure GetContextMenuHandler(var aHandler : ICefContextMenuHandler); virtual;
|
||||
procedure GetDialogHandler(var aHandler : ICefDialogHandler); virtual;
|
||||
procedure GetDisplayHandler(var aHandler : ICefDisplayHandler); virtual;
|
||||
@ -77,6 +78,7 @@ type
|
||||
|
||||
TCefClientOwn = class(TCefBaseRefCountedOwn, ICefClient)
|
||||
protected
|
||||
procedure GetAudioHandler(var aHandler : ICefAudioHandler); virtual;
|
||||
procedure GetContextMenuHandler(var aHandler : ICefContextMenuHandler); virtual;
|
||||
procedure GetDialogHandler(var aHandler : ICefDialogHandler); virtual;
|
||||
procedure GetDisplayHandler(var aHandler : ICefDisplayHandler); virtual;
|
||||
@ -101,6 +103,7 @@ type
|
||||
TCustomClientHandler = class(TCefClientOwn)
|
||||
protected
|
||||
FEvents : Pointer;
|
||||
FAudioHandler : ICefAudioHandler;
|
||||
FLoadHandler : ICefLoadHandler;
|
||||
FFocusHandler : ICefFocusHandler;
|
||||
FContextMenuHandler : ICefContextMenuHandler;
|
||||
@ -115,6 +118,7 @@ type
|
||||
FDragHandler : ICefDragHandler;
|
||||
FFindHandler : ICefFindHandler;
|
||||
|
||||
procedure GetAudioHandler(var aHandler : ICefAudioHandler); override;
|
||||
procedure GetContextMenuHandler(var aHandler : ICefContextMenuHandler); override;
|
||||
procedure GetDialogHandler(var aHandler : ICefDialogHandler); override;
|
||||
procedure GetDisplayHandler(var aHandler : ICefDisplayHandler); override;
|
||||
@ -150,7 +154,7 @@ uses
|
||||
uCEFFocusHandler, uCEFContextMenuHandler, uCEFDialogHandler, uCEFKeyboardHandler,
|
||||
uCEFDisplayHandler, uCEFDownloadHandler, uCEFJsDialogHandler,
|
||||
uCEFLifeSpanHandler, uCEFRequestHandler, uCEFRenderHandler, uCEFDragHandler,
|
||||
uCEFFindHandler, uCEFConstants, uCEFApplicationCore, uCEFFrame;
|
||||
uCEFFindHandler, uCEFConstants, uCEFApplicationCore, uCEFFrame, uCEFAudioHandler;
|
||||
|
||||
|
||||
// ******************************************************
|
||||
@ -165,6 +169,11 @@ begin
|
||||
Result := nil;
|
||||
end;
|
||||
|
||||
procedure TCefClientRef.GetAudioHandler(var aHandler : ICefAudioHandler);
|
||||
begin
|
||||
aHandler := nil;
|
||||
end;
|
||||
|
||||
procedure TCefClientRef.GetContextMenuHandler(var aHandler : ICefContextMenuHandler);
|
||||
begin
|
||||
aHandler := nil;
|
||||
@ -246,6 +255,23 @@ end;
|
||||
// ******************************************************
|
||||
|
||||
|
||||
function cef_client_own_get_audio_handler(self: PCefClient): PCefAudioHandler; stdcall;
|
||||
var
|
||||
TempObject : TObject;
|
||||
TempHandler : ICefAudioHandler;
|
||||
begin
|
||||
Result := nil;
|
||||
TempObject := CefGetObject(self);
|
||||
|
||||
if (TempObject <> nil) and (TempObject is TCefClientOwn) then
|
||||
try
|
||||
TCefClientOwn(TempObject).GetAudioHandler(TempHandler);
|
||||
if (TempHandler <> nil) then Result := TempHandler.Wrap;
|
||||
finally
|
||||
TempHandler := nil;
|
||||
end;
|
||||
end;
|
||||
|
||||
function cef_client_own_get_context_menu_handler(self: PCefClient): PCefContextMenuHandler; stdcall;
|
||||
var
|
||||
TempObject : TObject;
|
||||
@ -491,6 +517,7 @@ begin
|
||||
|
||||
with PCefClient(FData)^ do
|
||||
begin
|
||||
get_audio_handler := {$IFDEF FPC}@{$ENDIF}cef_client_own_get_audio_handler;
|
||||
get_context_menu_handler := {$IFDEF FPC}@{$ENDIF}cef_client_own_get_context_menu_handler;
|
||||
get_dialog_handler := {$IFDEF FPC}@{$ENDIF}cef_client_own_get_dialog_handler;
|
||||
get_display_handler := {$IFDEF FPC}@{$ENDIF}cef_client_own_get_display_handler;
|
||||
@ -508,6 +535,11 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCefClientOwn.GetAudioHandler(var aHandler : ICefAudioHandler);
|
||||
begin
|
||||
aHandler := nil;
|
||||
end;
|
||||
|
||||
procedure TCefClientOwn.GetContextMenuHandler(var aHandler : ICefContextMenuHandler);
|
||||
begin
|
||||
aHandler := nil;
|
||||
@ -608,6 +640,7 @@ begin
|
||||
end
|
||||
else
|
||||
begin
|
||||
if events.MustCreateAudioHandler then FAudioHandler := TCustomAudioHandler.Create(events);
|
||||
if events.MustCreateLoadHandler then FLoadHandler := TCustomLoadHandler.Create(events);
|
||||
if events.MustCreateFocusHandler then FFocusHandler := TCustomFocusHandler.Create(events);
|
||||
if events.MustCreateContextMenuHandler then FContextMenuHandler := TCustomContextMenuHandler.Create(events);
|
||||
@ -636,6 +669,7 @@ procedure TCustomClientHandler.RemoveReferences;
|
||||
begin
|
||||
FEvents := nil;
|
||||
|
||||
if (FAudioHandler <> nil) then FAudioHandler.RemoveReferences;
|
||||
if (FLoadHandler <> nil) then FLoadHandler.RemoveReferences;
|
||||
if (FFocusHandler <> nil) then FFocusHandler.RemoveReferences;
|
||||
if (FContextMenuHandler <> nil) then FContextMenuHandler.RemoveReferences;
|
||||
@ -653,6 +687,7 @@ end;
|
||||
|
||||
procedure TCustomClientHandler.InitializeVars;
|
||||
begin
|
||||
FAudioHandler := nil;
|
||||
FLoadHandler := nil;
|
||||
FFocusHandler := nil;
|
||||
FContextMenuHandler := nil;
|
||||
@ -669,6 +704,14 @@ begin
|
||||
FEvents := nil;
|
||||
end;
|
||||
|
||||
procedure TCustomClientHandler.GetAudioHandler(var aHandler : ICefAudioHandler);
|
||||
begin
|
||||
if (FAudioHandler <> nil) then
|
||||
aHandler := FAudioHandler
|
||||
else
|
||||
aHandler := nil;
|
||||
end;
|
||||
|
||||
procedure TCustomClientHandler.GetContextMenuHandler(var aHandler : ICefContextMenuHandler);
|
||||
begin
|
||||
if (FContextMenuHandler <> nil) then
|
||||
|
@ -538,6 +538,11 @@ const
|
||||
CEF_MRCR_ROUTE_ALREADY_EXISTS = 9;
|
||||
CEF_MRCR_TOTAL_COUNT = 11;
|
||||
|
||||
// /include/internal/cef_types.h (cef_cookie_priority_t)
|
||||
CEF_COOKIE_PRIORITY_LOW = -1;
|
||||
CEF_COOKIE_PRIORITY_MEDIUM = 0;
|
||||
CEF_COOKIE_PRIORITY_HIGH = 1;
|
||||
|
||||
|
||||
//******************************************************
|
||||
//****************** OTHER CONSTANTS *******************
|
||||
|
@ -65,8 +65,8 @@ type
|
||||
function VisitAllCookiesProc(const visitor: TCefCookieVisitorProc): Boolean;
|
||||
function VisitUrlCookies(const url: ustring; includeHttpOnly: Boolean; const visitor: ICefCookieVisitor): Boolean;
|
||||
function VisitUrlCookiesProc(const url: ustring; includeHttpOnly: Boolean; const visitor: TCefCookieVisitorProc): Boolean;
|
||||
function SetCookie(const url, name, value, domain, path: ustring; secure, httponly, hasExpires: Boolean; const creation, lastAccess, expires: TDateTime; const callback: ICefSetCookieCallback): Boolean;
|
||||
function SetCookieProc(const url: ustring; const name, value, domain, path: ustring; secure, httponly, hasExpires: Boolean; const creation, lastAccess, expires: TDateTime; const callback: TCefSetCookieCallbackProc): Boolean;
|
||||
function SetCookie(const url, name, value, domain, path: ustring; secure, httponly, hasExpires: Boolean; const creation, lastAccess, expires: TDateTime; same_site : TCefCookieSameSite; priority : TCefCookiePriority; const callback: ICefSetCookieCallback): Boolean;
|
||||
function SetCookieProc(const url: ustring; const name, value, domain, path: ustring; secure, httponly, hasExpires: Boolean; const creation, lastAccess, expires: TDateTime; same_site : TCefCookieSameSite; priority : TCefCookiePriority; const callback: TCefSetCookieCallbackProc): Boolean;
|
||||
function DeleteCookies(const url, cookieName: ustring; const callback: ICefDeleteCookiesCallback): Boolean;
|
||||
function DeleteCookiesProc(const url, cookieName: ustring; const callback: TCefDeleteCookiesCallbackProc): Boolean;
|
||||
function FlushStore(const callback: ICefCompletionCallback): Boolean;
|
||||
@ -131,6 +131,8 @@ end;
|
||||
function TCefCookieManagerRef.SetCookie(const url, name, value, domain, path: ustring;
|
||||
secure, httponly, hasExpires: Boolean;
|
||||
const creation, lastAccess, expires: TDateTime;
|
||||
same_site : TCefCookieSameSite;
|
||||
priority : TCefCookiePriority;
|
||||
const callback: ICefSetCookieCallback): Boolean;
|
||||
var
|
||||
TempURL : TCefString;
|
||||
@ -146,6 +148,8 @@ begin
|
||||
TempCookie.creation := DateTimeToCefTime(creation);
|
||||
TempCookie.last_access := DateTimeToCefTime(lastAccess);
|
||||
TempCookie.has_expires := Ord(hasExpires);
|
||||
TempCookie.same_site := same_site;
|
||||
TempCookie.priority := priority;
|
||||
|
||||
if hasExpires then
|
||||
TempCookie.expires := DateTimeToCefTime(expires)
|
||||
@ -158,11 +162,14 @@ end;
|
||||
function TCefCookieManagerRef.SetCookieProc(const url, name, value, domain, path: ustring;
|
||||
secure, httponly, hasExpires: Boolean;
|
||||
const creation, lastAccess, expires: TDateTime;
|
||||
same_site : TCefCookieSameSite;
|
||||
priority : TCefCookiePriority;
|
||||
const callback: TCefSetCookieCallbackProc): Boolean;
|
||||
begin
|
||||
Result := SetCookie(url, name, value, domain, path,
|
||||
secure, httponly, hasExpires,
|
||||
creation, lastAccess, expires,
|
||||
same_site, priority,
|
||||
TCefFastSetCookieCallback.Create(callback));
|
||||
end;
|
||||
|
||||
|
@ -54,7 +54,7 @@ uses
|
||||
type
|
||||
TCefCookieVisitorOwn = class(TCefBaseRefCountedOwn, ICefCookieVisitor)
|
||||
protected
|
||||
function visit(const name, value, domain, path: ustring; secure, httponly, hasExpires: Boolean; const creation, lastAccess, expires: TDateTime; count, total: Integer; out deleteCookie: Boolean): Boolean; virtual;
|
||||
function visit(const name, value, domain, path: ustring; secure, httponly, hasExpires: Boolean; const creation, lastAccess, expires: TDateTime; count, total: Integer; same_site : TCefCookieSameSite; priority : TCefCookiePriority; out deleteCookie: Boolean): Boolean; virtual;
|
||||
|
||||
public
|
||||
constructor Create; virtual;
|
||||
@ -64,7 +64,7 @@ type
|
||||
protected
|
||||
FVisitor: TCefCookieVisitorProc;
|
||||
|
||||
function visit(const name, value, domain, path: ustring; secure, httponly, hasExpires: Boolean; const creation, lastAccess, expires: TDateTime; count, total: Integer; out deleteCookie: Boolean): Boolean; override;
|
||||
function visit(const name, value, domain, path: ustring; secure, httponly, hasExpires: Boolean; const creation, lastAccess, expires: TDateTime; count, total: Integer; same_site : TCefCookieSameSite; priority : TCefCookiePriority; out deleteCookie: Boolean): Boolean; override;
|
||||
|
||||
public
|
||||
constructor Create(const visitor: TCefCookieVisitorProc); reintroduce;
|
||||
@ -75,7 +75,7 @@ type
|
||||
FEvents : Pointer;
|
||||
FID : integer;
|
||||
|
||||
function visit(const name, value, domain, path: ustring; secure, httponly, hasExpires: Boolean; const creation, lastAccess, expires: TDateTime; count, total: Integer; out deleteCookie: Boolean): Boolean; override;
|
||||
function visit(const name, value, domain, path: ustring; secure, httponly, hasExpires: Boolean; const creation, lastAccess, expires: TDateTime; count, total: Integer; same_site : TCefCookieSameSite; priority : TCefCookiePriority; out deleteCookie: Boolean): Boolean; override;
|
||||
|
||||
public
|
||||
constructor Create(const aEvents : IChromiumEvents; aID : integer); reintroduce;
|
||||
@ -92,10 +92,11 @@ uses
|
||||
{$ENDIF}
|
||||
uCEFMiscFunctions, uCEFLibFunctions;
|
||||
|
||||
function cef_cookie_visitor_visit(self: PCefCookieVisitor;
|
||||
const cookie: PCefCookie;
|
||||
count, total: Integer;
|
||||
deleteCookie: PInteger): Integer; stdcall;
|
||||
function cef_cookie_visitor_visit( self : PCefCookieVisitor;
|
||||
const cookie : PCefCookie;
|
||||
count : Integer;
|
||||
total : Integer;
|
||||
deleteCookie : PInteger): Integer; stdcall;
|
||||
var
|
||||
delete : Boolean;
|
||||
exp : TDateTime;
|
||||
@ -123,6 +124,8 @@ begin
|
||||
exp,
|
||||
count,
|
||||
total,
|
||||
cookie^.same_site,
|
||||
cookie^.priority,
|
||||
delete));
|
||||
|
||||
deleteCookie^ := Ord(delete);
|
||||
@ -141,6 +144,8 @@ function TCefCookieVisitorOwn.visit(const name, value, domain, path: ustring;
|
||||
secure, httponly, hasExpires: Boolean;
|
||||
const creation, lastAccess, expires: TDateTime;
|
||||
count, total: Integer;
|
||||
same_site : TCefCookieSameSite;
|
||||
priority : TCefCookiePriority;
|
||||
out deleteCookie: Boolean): Boolean;
|
||||
begin
|
||||
Result := True;
|
||||
@ -159,10 +164,13 @@ function TCefFastCookieVisitor.visit(const name, value, domain, path: ustring;
|
||||
secure, httponly, hasExpires: Boolean;
|
||||
const creation, lastAccess, expires: TDateTime;
|
||||
count, total: Integer;
|
||||
same_site : TCefCookieSameSite;
|
||||
priority : TCefCookiePriority;
|
||||
out deleteCookie: Boolean): Boolean;
|
||||
begin
|
||||
Result := FVisitor(name, value, domain, path, secure, httponly, hasExpires,
|
||||
creation, lastAccess, expires, count, total, deleteCookie);
|
||||
creation, lastAccess, expires, count, total, same_site,
|
||||
priority, deleteCookie);
|
||||
end;
|
||||
|
||||
|
||||
@ -196,6 +204,8 @@ function TCefCustomCookieVisitor.visit(const name, value, domain, path: ustring;
|
||||
secure, httponly, hasExpires: Boolean;
|
||||
const creation, lastAccess, expires: TDateTime;
|
||||
count, total: Integer;
|
||||
same_site : TCefCookieSameSite;
|
||||
priority : TCefCookiePriority;
|
||||
out deleteCookie: Boolean): Boolean;
|
||||
var
|
||||
TempDelete : boolean;
|
||||
@ -207,7 +217,8 @@ begin
|
||||
try
|
||||
if (FEvents <> nil) then
|
||||
IChromiumEvents(FEvents).doOnCookiesVisited(name, value, domain, path, secure, httponly, hasExpires,
|
||||
creation, lastAccess, expires, count, total, FID, TempDelete, Result);
|
||||
creation, lastAccess, expires, count, total, FID,
|
||||
same_site, priority, TempDelete, Result);
|
||||
except
|
||||
on e : exception do
|
||||
if CustomExceptionHandler('TCefCustomCookieVisitor.visit', e) then raise;
|
||||
|
@ -150,6 +150,7 @@ type
|
||||
ICefMediaRouteCreateCallback = interface;
|
||||
ICefMediaSink = interface;
|
||||
ICefMediaSource = interface;
|
||||
ICefAudioHandler = interface;
|
||||
|
||||
TCefv8ValueArray = array of ICefv8Value;
|
||||
TCefX509CertificateArray = array of ICefX509Certificate;
|
||||
@ -242,7 +243,7 @@ type
|
||||
TCefDeleteCookiesCallbackProc = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(numDeleted: Integer);
|
||||
TCefNavigationEntryVisitorProc = {$IFDEF DELPHI12_UP}reference to{$ENDIF} function(const entry: ICefNavigationEntry; current: Boolean; index, total: Integer): Boolean;
|
||||
TOnDownloadImageFinishedProc = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(const imageUrl: ustring; httpStatusCode: Integer; const image: ICefImage);
|
||||
TCefCookieVisitorProc = {$IFDEF DELPHI12_UP}reference to{$ENDIF} function(const name, value, domain, path: ustring; secure, httponly, hasExpires: Boolean; const creation, lastAccess, expires: TDateTime; count, total: Integer; out deleteCookie: Boolean): Boolean;
|
||||
TCefCookieVisitorProc = {$IFDEF DELPHI12_UP}reference to{$ENDIF} function(const name, value, domain, path: ustring; secure, httponly, hasExpires: Boolean; const creation, lastAccess, expires: TDateTime; count, total: Integer; same_site : TCefCookieSameSite; priority : TCefCookiePriority; out deleteCookie: Boolean): Boolean;
|
||||
TCefMediaRouteCreateCallbackProc = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(result: TCefMediaRouterCreateResult; const error: ustring; const route: ICefMediaRoute);
|
||||
|
||||
|
||||
@ -420,6 +421,13 @@ type
|
||||
procedure doOnRouteStateChanged(const route: ICefMediaRoute; state: TCefMediaRouteConnectionState);
|
||||
procedure doOnRouteMessageReceived(const route: ICefMediaRoute; const message_: ustring);
|
||||
|
||||
// ICefAudioHandler
|
||||
procedure doOnGetAudioParameters(const browser: ICefBrowser; var params: TCefAudioParameters; var aResult: boolean);
|
||||
procedure doOnAudioStreamStarted(const browser: ICefBrowser; const params: TCefAudioParameters; channels: integer);
|
||||
procedure doOnAudioStreamPacket(const browser: ICefBrowser; const data : PPSingle; frames: integer; pts: int64);
|
||||
procedure doOnAudioStreamStopped(const browser: ICefBrowser);
|
||||
procedure doOnAudioStreamError(const browser: ICefBrowser; const message_: ustring);
|
||||
|
||||
// Custom
|
||||
procedure doCookiesDeleted(numDeleted : integer);
|
||||
procedure doPdfPrintFinished(aResultOK : boolean);
|
||||
@ -435,7 +443,7 @@ type
|
||||
procedure doHttpAuthCredentialsCleared;
|
||||
procedure doAllConnectionsClosed;
|
||||
procedure doOnExecuteTaskOnCefThread(aTaskID : cardinal);
|
||||
procedure doOnCookiesVisited(const name_, value, domain, path: ustring; secure, httponly, hasExpires: Boolean; const creation, lastAccess, expires: TDateTime; count, total, aID : Integer; var aDeleteCookie, aResult : Boolean);
|
||||
procedure doOnCookiesVisited(const name_, value, domain, path: ustring; secure, httponly, hasExpires: Boolean; const creation, lastAccess, expires: TDateTime; count, total, aID : Integer; same_site : TCefCookieSameSite; priority : TCefCookiePriority; var aDeleteCookie, aResult : Boolean);
|
||||
procedure doOnCookieVisitorDestroyed(aID : integer);
|
||||
procedure doOnCookieSet(aSuccess : boolean; aID : integer);
|
||||
procedure doUpdateZoomStep(aInc : boolean);
|
||||
@ -445,6 +453,7 @@ type
|
||||
procedure doSetZoomStep(aValue : byte);
|
||||
procedure doReadZoom;
|
||||
procedure doMediaRouteCreateFinished(result: TCefMediaRouterCreateResult; const error: ustring; const route: ICefMediaRoute);
|
||||
function MustCreateAudioHandler : boolean;
|
||||
function MustCreateLoadHandler : boolean;
|
||||
function MustCreateFocusHandler : boolean;
|
||||
function MustCreateContextMenuHandler : boolean;
|
||||
@ -1244,7 +1253,7 @@ type
|
||||
// /include/capi/cef_cookie_capi.h (cef_cookie_visitor_t)
|
||||
ICefCookieVisitor = interface(ICefBaseRefCounted)
|
||||
['{8378CF1B-84AB-4FDB-9B86-34DDABCCC402}']
|
||||
function visit(const name, value, domain, path: ustring; secure, httponly, hasExpires: Boolean; const creation, lastAccess, expires: TDateTime; count, total: Integer; out deleteCookie: Boolean): Boolean;
|
||||
function visit(const name, value, domain, path: ustring; secure, httponly, hasExpires: Boolean; const creation, lastAccess, expires: TDateTime; count, total: Integer; same_site : TCefCookieSameSite; priority : TCefCookiePriority; out deleteCookie: Boolean): Boolean;
|
||||
end;
|
||||
|
||||
// TCefCommandLine
|
||||
@ -1442,8 +1451,8 @@ type
|
||||
function VisitAllCookiesProc(const visitor: TCefCookieVisitorProc): Boolean;
|
||||
function VisitUrlCookies(const url: ustring; includeHttpOnly: Boolean; const visitor: ICefCookieVisitor): Boolean;
|
||||
function VisitUrlCookiesProc(const url: ustring; includeHttpOnly: Boolean; const visitor: TCefCookieVisitorProc): Boolean;
|
||||
function SetCookie(const url, name, value, domain, path: ustring; secure, httponly, hasExpires: Boolean; const creation, lastAccess, expires: TDateTime; const callback: ICefSetCookieCallback): Boolean;
|
||||
function SetCookieProc(const url: ustring; const name, value, domain, path: ustring; secure, httponly, hasExpires: Boolean; const creation, lastAccess, expires: TDateTime; const callback: TCefSetCookieCallbackProc): Boolean;
|
||||
function SetCookie(const url, name, value, domain, path: ustring; secure, httponly, hasExpires: Boolean; const creation, lastAccess, expires: TDateTime; same_site : TCefCookieSameSite; priority : TCefCookiePriority; const callback: ICefSetCookieCallback): Boolean;
|
||||
function SetCookieProc(const url: ustring; const name, value, domain, path: ustring; secure, httponly, hasExpires: Boolean; const creation, lastAccess, expires: TDateTime; same_site : TCefCookieSameSite; priority : TCefCookiePriority; const callback: TCefSetCookieCallbackProc): Boolean;
|
||||
function DeleteCookies(const url, cookieName: ustring; const callback: ICefDeleteCookiesCallback): Boolean;
|
||||
function DeleteCookiesProc(const url, cookieName: ustring; const callback: TCefDeleteCookiesCallbackProc): Boolean;
|
||||
function FlushStore(const callback: ICefCompletionCallback): Boolean;
|
||||
@ -1915,6 +1924,19 @@ type
|
||||
procedure RemoveReferences; // custom procedure to clear all references
|
||||
end;
|
||||
|
||||
// TCefAudioHandler
|
||||
// /include/capi/cef_audio_handler_capi.h (cef_audio_handler_t)
|
||||
ICefAudioHandler = interface(ICefBaseRefCounted)
|
||||
['{8963271A-0B94-4279-82C8-FB2EA7B3CDEC}']
|
||||
procedure OnGetAudioParameters(const browser: ICefBrowser; var params: TCefAudioParameters; var aResult: boolean);
|
||||
procedure OnAudioStreamStarted(const browser: ICefBrowser; const params: TCefAudioParameters; channels: integer);
|
||||
procedure OnAudioStreamPacket(const browser: ICefBrowser; const data : PPSingle; frames: integer; pts: int64);
|
||||
procedure OnAudioStreamStopped(const browser: ICefBrowser);
|
||||
procedure OnAudioStreamError(const browser: ICefBrowser; const message_: ustring);
|
||||
|
||||
procedure RemoveReferences; // custom procedure to clear all references
|
||||
end;
|
||||
|
||||
// TCefRunContextMenuCallback
|
||||
// /include/capi/cef_context_menu_handler_capi.h (cef_run_context_menu_callback_t)
|
||||
ICefRunContextMenuCallback = interface(ICefBaseRefCounted)
|
||||
@ -1980,6 +2002,7 @@ type
|
||||
// /include/capi/cef_client_capi.h (cef_client_t)
|
||||
ICefClient = interface(ICefBaseRefCounted)
|
||||
['{1D502075-2FF0-4E13-A112-9E541CD811F4}']
|
||||
procedure GetAudioHandler(var aHandler : ICefAudioHandler);
|
||||
procedure GetContextMenuHandler(var aHandler : ICefContextMenuHandler);
|
||||
procedure GetDialogHandler(var aHandler : ICefDialogHandler);
|
||||
procedure GetDisplayHandler(var aHandler : ICefDisplayHandler);
|
||||
|
@ -138,6 +138,8 @@ type
|
||||
PCefLifeSpanHandler = ^TCefLifeSpanHandler;
|
||||
PCefGetExtensionResourceCallback = ^TCefGetExtensionResourceCallback;
|
||||
PCefExtensionHandler = ^TCefExtensionHandler;
|
||||
PCefAudioHandler = ^TCefAudioHandler;
|
||||
PCefAudioParameters = ^TCefAudioParameters;
|
||||
PCefExtension = ^TCefExtension;
|
||||
PCefPopupFeatures = ^TCefPopupFeatures;
|
||||
PCefBrowserSettings = ^TCefBrowserSettings;
|
||||
@ -269,6 +271,18 @@ type
|
||||
{$ENDIF}
|
||||
|
||||
|
||||
|
||||
|
||||
// All these types are declared as constants in uCEFConstants.pas.
|
||||
// Search the type name between the parentheses in uCEFConstants.pas.
|
||||
//
|
||||
// Open the original header file for more details :
|
||||
// https://github.com/chromiumembedded/cef/blob/master/include/internal/cef_types.h
|
||||
// https://github.com/chromiumembedded/cef/blob/master/include/internal/cef_thread_internal.h
|
||||
// https://github.com/chromiumembedded/cef/blob/master/include/internal/cef_string_list.h
|
||||
// https://github.com/chromiumembedded/cef/blob/master/include/internal/cef_string_map.h
|
||||
// https://github.com/chromiumembedded/cef/blob/master/include/internal/cef_string_multimap.h
|
||||
|
||||
TCefPlatformThreadId = DWORD; // /include/internal/cef_thread_internal.h (cef_platform_thread_id_t)
|
||||
TCefPlatformThreadHandle = DWORD; // /include/internal/cef_thread_internal.h (cef_platform_thread_handle_t)
|
||||
TCefTransitionType = Cardinal; // /include/internal/cef_types.h (cef_transition_type_t)
|
||||
@ -297,6 +311,10 @@ type
|
||||
TCefDuplexMode = Integer; // /include/internal/cef_types.h (cef_duplex_mode_t)
|
||||
TCefSchemeOptions = Integer; // /include/internal/cef_types.h (cef_scheme_options_t)
|
||||
TCefMediaRouterCreateResult = Integer; // /include/internal/cef_types.h (cef_media_route_create_result_t)
|
||||
TCefCookiePriority = Integer; // /include/internal/cef_types.h (cef_cookie_priority_t)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{$IFDEF FPC}
|
||||
@ -727,6 +745,51 @@ type
|
||||
CEF_POINTER_TYPE_UNKNOWN
|
||||
);
|
||||
|
||||
// /include/internal/cef_types.h (cef_channel_layout_t)
|
||||
TCefChannelLayout = (
|
||||
CEF_CHANNEL_LAYOUT_NONE = 0,
|
||||
CEF_CHANNEL_LAYOUT_UNSUPPORTED,
|
||||
CEF_CHANNEL_LAYOUT_MONO,
|
||||
CEF_CHANNEL_LAYOUT_STEREO,
|
||||
CEF_CHANNEL_LAYOUT_2_1,
|
||||
CEF_CHANNEL_LAYOUT_SURROUND,
|
||||
CEF_CHANNEL_LAYOUT_4_0,
|
||||
CEF_CHANNEL_LAYOUT_2_2,
|
||||
CEF_CHANNEL_LAYOUT_QUAD,
|
||||
CEF_CHANNEL_LAYOUT_5_0,
|
||||
CEF_CHANNEL_LAYOUT_5_1,
|
||||
CEF_CHANNEL_LAYOUT_5_0_BACK,
|
||||
CEF_CHANNEL_LAYOUT_5_1_BACK,
|
||||
CEF_CHANNEL_LAYOUT_7_0,
|
||||
CEF_CHANNEL_LAYOUT_7_1,
|
||||
CEF_CHANNEL_LAYOUT_7_1_WIDE,
|
||||
CEF_CHANNEL_LAYOUT_STEREO_DOWNMIX,
|
||||
CEF_CHANNEL_LAYOUT_2POINT1,
|
||||
CEF_CHANNEL_LAYOUT_3_1,
|
||||
CEF_CHANNEL_LAYOUT_4_1,
|
||||
CEF_CHANNEL_LAYOUT_6_0,
|
||||
CEF_CHANNEL_LAYOUT_6_0_FRONT,
|
||||
CEF_CHANNEL_LAYOUT_HEXAGONAL,
|
||||
CEF_CHANNEL_LAYOUT_6_1,
|
||||
CEF_CHANNEL_LAYOUT_6_1_BACK,
|
||||
CEF_CHANNEL_LAYOUT_6_1_FRONT,
|
||||
CEF_CHANNEL_LAYOUT_7_0_FRONT,
|
||||
CEF_CHANNEL_LAYOUT_7_1_WIDE_BACK,
|
||||
CEF_CHANNEL_LAYOUT_OCTAGONAL,
|
||||
CEF_CHANNEL_LAYOUT_DISCRETE,
|
||||
CEF_CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC,
|
||||
CEF_CHANNEL_LAYOUT_4_1_QUAD_SIDE,
|
||||
CEF_CHANNEL_LAYOUT_BITSTREAM // CEF_CHANNEL_LAYOUT_MAX = CEF_CHANNEL_LAYOUT_BITSTREAM
|
||||
);
|
||||
|
||||
// /include/internal/cef_types.h (cef_cookie_same_site_t)
|
||||
TCefCookieSameSite = (
|
||||
CEF_COOKIE_SAME_SITE_UNSPECIFIED,
|
||||
CEF_COOKIE_SAME_SITE_NO_RESTRICTION,
|
||||
CEF_COOKIE_SAME_SITE_LAX_MODE,
|
||||
CEF_COOKIE_SAME_SITE_STRICT_MODE
|
||||
);
|
||||
|
||||
// /include/internal/cef_types.h (cef_paint_element_type_t)
|
||||
TCefPaintElementType = (
|
||||
PET_VIEW,
|
||||
@ -778,7 +841,13 @@ type
|
||||
CT_ZOOMOUT,
|
||||
CT_GRAB,
|
||||
CT_GRABBING,
|
||||
CT_CUSTOM
|
||||
CT_MIDDLE_PANNING_VERTICAL,
|
||||
CT_MIDDLE_PANNING_HORIZONTAL,
|
||||
CT_CUSTOM,
|
||||
CT_DND_NONE,
|
||||
CT_DND_MOVE,
|
||||
CT_DND_COPY,
|
||||
CT_DND_LIN
|
||||
);
|
||||
|
||||
// /include/internal/cef_types.h (cef_navigation_type_t)
|
||||
@ -1275,6 +1344,8 @@ type
|
||||
last_access : TCefTime;
|
||||
has_expires : Integer;
|
||||
expires : TCefTime;
|
||||
same_site : TCefCookieSameSite;
|
||||
priority : TCefCookiePriority;
|
||||
end;
|
||||
|
||||
TCookie = record
|
||||
@ -1288,6 +1359,8 @@ type
|
||||
secure : boolean;
|
||||
httponly : boolean;
|
||||
has_expires : boolean;
|
||||
same_site : TCefCookieSameSite;
|
||||
priority : TCefCookiePriority;
|
||||
end;
|
||||
|
||||
// /include/internal/cef_types.h (cef_pdf_print_settings_t)
|
||||
@ -1329,6 +1402,13 @@ type
|
||||
pointer_type : TCefPointerType;
|
||||
end;
|
||||
|
||||
// /include/internal/cef_types.h (cef_audio_parameters_t)
|
||||
TCefAudioParameters = record
|
||||
channel_layout : TCefChannelLayout;
|
||||
sample_rate : integer;
|
||||
frames_per_buffer : integer;
|
||||
end;
|
||||
|
||||
// /include/capi/cef_base_capi.h (cef_base_ref_counted_t)
|
||||
TCefBaseRefCounted = record
|
||||
size : NativeUInt;
|
||||
@ -1581,6 +1661,16 @@ type
|
||||
get_extension_resource : function(self: PCefExtensionHandler; extension: PCefExtension; browser: PCefBrowser; const file_: PCefString; callback: PCefGetExtensionResourceCallback): Integer; stdcall;
|
||||
end;
|
||||
|
||||
// /include/capi/cef_audio_handler_capi.h (cef_audio_handler_t)
|
||||
TCefAudioHandler = record
|
||||
base : TCefBaseRefCounted;
|
||||
get_audio_parameters : function(self: PCefAudioHandler; browser: PCefBrowser; params: PCefAudioParameters): Integer; stdcall;
|
||||
on_audio_stream_started : procedure(self: PCefAudioHandler; browser: PCefBrowser; const params: PCefAudioParameters; channels: integer); stdcall;
|
||||
on_audio_stream_packet : procedure(self: PCefAudioHandler; browser: PCefBrowser; const data : PPSingle; frames: integer; pts: int64); stdcall;
|
||||
on_audio_stream_stopped : procedure(self: PCefAudioHandler; browser: PCefBrowser); stdcall;
|
||||
on_audio_stream_error : procedure(self: PCefAudioHandler; browser: PCefBrowser; const message_: PCefString); stdcall;
|
||||
end;
|
||||
|
||||
// /include/capi/cef_extension_capi.h (cef_extension_t)
|
||||
TCefExtension = record
|
||||
base : TCefBaseRefCounted;
|
||||
@ -2725,6 +2815,7 @@ type
|
||||
// /include/capi/cef_client_capi.h (cef_client_t)
|
||||
TCefClient = record
|
||||
base : TCefBaseRefCounted;
|
||||
get_audio_handler : function(self: PCefClient): PCefAudioHandler; stdcall;
|
||||
get_context_menu_handler : function(self: PCefClient): PCefContextMenuHandler; stdcall;
|
||||
get_dialog_handler : function(self: PCefClient): PCefDialogHandler; stdcall;
|
||||
get_display_handler : function(self: PCefClient): PCefDisplayHandler; stdcall;
|
||||
|
@ -2,9 +2,9 @@
|
||||
"UpdateLazPackages" : [
|
||||
{
|
||||
"ForceNotify" : true,
|
||||
"InternalVersion" : 138,
|
||||
"InternalVersion" : 139,
|
||||
"Name" : "cef4delphi_lazarus.lpk",
|
||||
"Version" : "81.3.10.0"
|
||||
"Version" : "83.3.9.0"
|
||||
}
|
||||
],
|
||||
"UpdatePackageData" : {
|
||||
|
Loading…
Reference in New Issue
Block a user