mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-05-13 21:46:53 +02:00
Update to CEF 76.1.10
- Added GlobalCEFApp.UseFakeUIForMediaStream - Added overloaded TCefBaseRefCountedOwn.SameAs
This commit is contained in:
parent
6663682880
commit
0acd59b3d2
@ -3,10 +3,10 @@ CEF4Delphi is an open source project created by Salvador D
|
|||||||
|
|
||||||
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 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 76.1.9 which includes Chromium 76.0.3809.87.
|
CEF4Delphi uses CEF 76.1.10 which includes Chromium 76.0.3809.87.
|
||||||
The CEF binaries used by CEF4Delphi are available for download at spotify :
|
The CEF binaries used by CEF4Delphi are available for download at spotify :
|
||||||
* [32 bits](http://opensource.spotify.com/cefbuilds/cef_binary_76.1.9%2Bg2cf916e%2Bchromium-76.0.3809.87_windows32.tar.bz2)
|
* [32 bits](http://opensource.spotify.com/cefbuilds/cef_binary_76.1.10%2Bg20d771a%2Bchromium-76.0.3809.87_windows32.tar.bz2)
|
||||||
* [64 bits](http://opensource.spotify.com/cefbuilds/cef_binary_76.1.9%2Bg2cf916e%2Bchromium-76.0.3809.87_windows64.tar.bz2)
|
* [64 bits](http://opensource.spotify.com/cefbuilds/cef_binary_76.1.10%2Bg20d771a%2Bchromium-76.0.3809.87_windows64.tar.bz2)
|
||||||
|
|
||||||
|
|
||||||
CEF4Delphi was developed and tested on Delphi 10.3 Rio and it has been tested in Delphi 7, Delphi XE, Delphi 10, Delphi 10.2 and Lazarus 2.0.4/FPC 3.0.4. CEF4Delphi includes VCL, FireMonkey (FMX) and Lazarus components.
|
CEF4Delphi was developed and tested on Delphi 10.3 Rio and it has been tested in Delphi 7, Delphi XE, Delphi 10, Delphi 10.2 and Lazarus 2.0.4/FPC 3.0.4. CEF4Delphi includes VCL, FireMonkey (FMX) and Lazarus components.
|
||||||
|
@ -152,7 +152,7 @@ uses
|
|||||||
// procedure with a PID_RENDERER parameter. The render process receives those messages in
|
// procedure with a PID_RENDERER parameter. The render process receives those messages in
|
||||||
// the GlobalCEFApp.OnProcessMessageReceived event.
|
// the GlobalCEFApp.OnProcessMessageReceived event.
|
||||||
|
|
||||||
// To send messages from the render process you must use the browser.SendProcessMessage
|
// To send messages from the render process you must use the frame.SendProcessMessage
|
||||||
// procedure with a PID_BROWSER parameter. The browser process receives those messages in
|
// procedure with a PID_BROWSER parameter. The browser process receives those messages in
|
||||||
// the TChromium.OnProcessMessageReceived event.
|
// the TChromium.OnProcessMessageReceived event.
|
||||||
|
|
||||||
|
@ -154,11 +154,11 @@ uses
|
|||||||
// extension called "myextension.mouseover".
|
// extension called "myextension.mouseover".
|
||||||
|
|
||||||
// The TTestExtensionHandler.Execute function is executed in the renderer process and it
|
// The TTestExtensionHandler.Execute function is executed in the renderer process and it
|
||||||
// can use the TCefv8ContextRef.Current.Browser.SendProcessMessage(PID_BROWSER, msg) function
|
// can use the TCefv8ContextRef.Current.Browser.MainFrame.SendProcessMessage(PID_BROWSER, msg) function
|
||||||
// to send a message with the results to the browser process.
|
// to send a message with the results to the browser process.
|
||||||
|
|
||||||
// TCefv8ContextRef.Current returns the v8 context for the frame that is currently
|
// TCefv8ContextRef.Current returns the v8 context for the frame that is currently
|
||||||
// executing JavaScript, TCefv8ContextRef.Current.Browser.SendProcessMessage sends a message
|
// executing JavaScript, TCefv8ContextRef.Current.Browser.MainFrame.SendProcessMessage sends a message
|
||||||
// to the right browser even if you have created several browsers in one app.
|
// to the right browser even if you have created several browsers in one app.
|
||||||
|
|
||||||
// That message is received in the TChromium.OnProcessMessageReceived event.
|
// That message is received in the TChromium.OnProcessMessageReceived event.
|
||||||
|
@ -135,10 +135,10 @@ uses
|
|||||||
|
|
||||||
// TTestExtension can send information back to the browser with a process message.
|
// TTestExtension can send information back to the browser with a process message.
|
||||||
// The TTestExtension.mouseover function do this by calling
|
// The TTestExtension.mouseover function do this by calling
|
||||||
// TCefv8ContextRef.Current.Browser.SendProcessMessage(PID_BROWSER, msg);
|
// TCefv8ContextRef.Current.Browser.MainFrame.SendProcessMessage(PID_BROWSER, msg);
|
||||||
|
|
||||||
// TCefv8ContextRef.Current returns the v8 context for the frame that is currently executing JS,
|
// TCefv8ContextRef.Current returns the v8 context for the frame that is currently executing JS,
|
||||||
// TCefv8ContextRef.Current.Browser.SendProcessMessage should send a message to the right browser even
|
// TCefv8ContextRef.Current.Browser.MainFrame.SendProcessMessage should send a message to the right browser even
|
||||||
// if you have created several browsers in one app.
|
// if you have created several browsers in one app.
|
||||||
|
|
||||||
// That message is received in the TChromium.OnProcessMessageReceived event.
|
// That message is received in the TChromium.OnProcessMessageReceived event.
|
||||||
|
@ -289,6 +289,7 @@ begin
|
|||||||
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
|
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
|
||||||
GlobalCEFApp.LogFile := 'debug.log';
|
GlobalCEFApp.LogFile := 'debug.log';
|
||||||
GlobalCEFApp.LogSeverity := LOGSEVERITY_INFO;
|
GlobalCEFApp.LogSeverity := LOGSEVERITY_INFO;
|
||||||
|
//GlobalCEFApp.RemoteDebuggingPort := 19999;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMiniBrowserFrm.BackBtnClick(Sender: TObject);
|
procedure TMiniBrowserFrm.BackBtnClick(Sender: TObject);
|
||||||
|
@ -73,6 +73,7 @@ object Form1: TForm1
|
|||||||
OnAfterCreated = Chromium1AfterCreated
|
OnAfterCreated = Chromium1AfterCreated
|
||||||
OnBeforeClose = Chromium1BeforeClose
|
OnBeforeClose = Chromium1BeforeClose
|
||||||
OnClose = Chromium1Close
|
OnClose = Chromium1Close
|
||||||
|
OnOpenUrlFromTab = Chromium1OpenUrlFromTab
|
||||||
Left = 56
|
Left = 56
|
||||||
Top = 152
|
Top = 152
|
||||||
end
|
end
|
||||||
|
@ -79,6 +79,11 @@ type
|
|||||||
var settings: TCefBrowserSettings;
|
var settings: TCefBrowserSettings;
|
||||||
var extra_info: ICefDictionaryValue; var noJavascriptAccess,
|
var extra_info: ICefDictionaryValue; var noJavascriptAccess,
|
||||||
Result: Boolean);
|
Result: Boolean);
|
||||||
|
procedure Chromium1OpenUrlFromTab(Sender: TObject;
|
||||||
|
const browser: ICefBrowser; const frame: ICefFrame;
|
||||||
|
const targetUrl: ustring;
|
||||||
|
targetDisposition: TCefWindowOpenDisposition; userGesture: Boolean;
|
||||||
|
out Result: Boolean);
|
||||||
protected
|
protected
|
||||||
// Variables to control when can we destroy the form safely
|
// Variables to control when can we destroy the form safely
|
||||||
FCanClose : boolean; // Set to True in TChromium.OnBeforeClose
|
FCanClose : boolean; // Set to True in TChromium.OnBeforeClose
|
||||||
@ -189,6 +194,15 @@ begin
|
|||||||
aAction := cbaDelay;
|
aAction := cbaDelay;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TForm1.Chromium1OpenUrlFromTab(Sender: TObject;
|
||||||
|
const browser: ICefBrowser; const frame: ICefFrame;
|
||||||
|
const targetUrl: ustring; targetDisposition: TCefWindowOpenDisposition;
|
||||||
|
userGesture: Boolean; out Result: Boolean);
|
||||||
|
begin
|
||||||
|
// For simplicity, this demo blocks all popup windows and new tabs
|
||||||
|
Result := (targetDisposition in [WOD_NEW_FOREGROUND_TAB, WOD_NEW_BACKGROUND_TAB, WOD_NEW_POPUP, WOD_NEW_WINDOW]);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TForm1.BrowserCreatedMsg(var aMessage : TMessage);
|
procedure TForm1.BrowserCreatedMsg(var aMessage : TMessage);
|
||||||
begin
|
begin
|
||||||
Caption := 'Simple Browser 2';
|
Caption := 'Simple Browser 2';
|
||||||
|
@ -72,6 +72,7 @@ type
|
|||||||
procedure CEFUrlRequestClientComponent1DownloadProgress(Sender: TObject; const request: ICefUrlRequest; current, total: Int64);
|
procedure CEFUrlRequestClientComponent1DownloadProgress(Sender: TObject; const request: ICefUrlRequest; current, total: Int64);
|
||||||
procedure CEFUrlRequestClientComponent1RequestComplete(Sender: TObject; const request: ICefUrlRequest);
|
procedure CEFUrlRequestClientComponent1RequestComplete(Sender: TObject; const request: ICefUrlRequest);
|
||||||
procedure CEFUrlRequestClientComponent1CreateURLRequest(Sender: TObject);
|
procedure CEFUrlRequestClientComponent1CreateURLRequest(Sender: TObject);
|
||||||
|
|
||||||
private
|
private
|
||||||
FStream : TMemoryStream;
|
FStream : TMemoryStream;
|
||||||
FCanClose : boolean;
|
FCanClose : boolean;
|
||||||
|
@ -144,7 +144,7 @@ uses
|
|||||||
// procedure with a PID_RENDERER parameter. The render process receives those messages in
|
// procedure with a PID_RENDERER parameter. The render process receives those messages in
|
||||||
// the GlobalCEFApp.OnProcessMessageReceived event.
|
// the GlobalCEFApp.OnProcessMessageReceived event.
|
||||||
|
|
||||||
// To send messages from the render process you must use the browser.SendProcessMessage
|
// To send messages from the render process you must use the frame.SendProcessMessage
|
||||||
// procedure with a PID_BROWSER parameter. The browser process receives those messages in
|
// procedure with a PID_BROWSER parameter. The browser process receives those messages in
|
||||||
// the TChromium.OnProcessMessageReceived event.
|
// the TChromium.OnProcessMessageReceived event.
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// ************************************************************************
|
// ************************************************************************
|
||||||
// ***************************** CEF4Delphi *******************************
|
// ***************************** CEF4Delphi *******************************
|
||||||
// ************************************************************************
|
// ************************************************************************
|
||||||
//
|
//
|
||||||
@ -159,11 +159,11 @@ uses
|
|||||||
// extension called "myextension.mouseover".
|
// extension called "myextension.mouseover".
|
||||||
|
|
||||||
// The TTestExtensionHandler.Execute function is executed in the renderer process and it
|
// The TTestExtensionHandler.Execute function is executed in the renderer process and it
|
||||||
// can use the TCefv8ContextRef.Current.Browser.SendProcessMessage(PID_BROWSER, msg) function
|
// can use the TCefv8ContextRef.Current.Browser.MainFrame.SendProcessMessage(PID_BROWSER, msg) function
|
||||||
// to send a message with the results to the browser process.
|
// to send a message with the results to the browser process.
|
||||||
|
|
||||||
// TCefv8ContextRef.Current returns the v8 context for the frame that is currently
|
// TCefv8ContextRef.Current returns the v8 context for the frame that is currently
|
||||||
// executing JavaScript, TCefv8ContextRef.Current.Browser.SendProcessMessage sends a message
|
// executing JavaScript, TCefv8ContextRef.Current.Browser.MainFrame.SendProcessMessage sends a message
|
||||||
// to the right browser even if you have created several browsers in one app.
|
// to the right browser even if you have created several browsers in one app.
|
||||||
|
|
||||||
// That message is received in the TChromium.OnProcessMessageReceived event.
|
// That message is received in the TChromium.OnProcessMessageReceived event.
|
||||||
|
@ -42,7 +42,6 @@
|
|||||||
<ComponentName Value="Form1"/>
|
<ComponentName Value="Form1"/>
|
||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<UnitName Value="uSimpleBrowser2"/>
|
|
||||||
</Unit1>
|
</Unit1>
|
||||||
</Units>
|
</Units>
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
|
@ -4,11 +4,11 @@
|
|||||||
<PathDelim Value="\"/>
|
<PathDelim Value="\"/>
|
||||||
<Version Value="11"/>
|
<Version Value="11"/>
|
||||||
<BuildModes Active="Default"/>
|
<BuildModes Active="Default"/>
|
||||||
<Units Count="54">
|
<Units Count="55">
|
||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="SimpleBrowser2.lpr"/>
|
<Filename Value="SimpleBrowser2.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<EditorIndex Value="1"/>
|
<EditorIndex Value="2"/>
|
||||||
<CursorPos X="34" Y="26"/>
|
<CursorPos X="34" Y="26"/>
|
||||||
<UsageCount Value="20"/>
|
<UsageCount Value="20"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
@ -35,8 +35,8 @@
|
|||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<UnitName Value="uSimpleLazarusBrowser"/>
|
<UnitName Value="uSimpleLazarusBrowser"/>
|
||||||
<IsVisibleTab Value="True"/>
|
<IsVisibleTab Value="True"/>
|
||||||
<TopLine Value="98"/>
|
<TopLine Value="158"/>
|
||||||
<CursorPos X="69" Y="125"/>
|
<CursorPos X="7" Y="183"/>
|
||||||
<UsageCount Value="43"/>
|
<UsageCount Value="43"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
@ -416,8 +416,15 @@
|
|||||||
<CursorPos X="3" Y="133"/>
|
<CursorPos X="3" Y="133"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="10"/>
|
||||||
</Unit53>
|
</Unit53>
|
||||||
|
<Unit54>
|
||||||
|
<Filename Value="..\..\..\source\uCEFApplication.pas"/>
|
||||||
|
<EditorIndex Value="1"/>
|
||||||
|
<TopLine Value="37"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit54>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="3" HistoryIndex="2">
|
<JumpHistory Count="7" HistoryIndex="6">
|
||||||
<Position1>
|
<Position1>
|
||||||
<Filename Value="usimplelazarusbrowser.pas"/>
|
<Filename Value="usimplelazarusbrowser.pas"/>
|
||||||
<Caret Line="67" Column="29" TopLine="57"/>
|
<Caret Line="67" Column="29" TopLine="57"/>
|
||||||
@ -430,6 +437,22 @@
|
|||||||
<Filename Value="SimpleBrowser2.lpr"/>
|
<Filename Value="SimpleBrowser2.lpr"/>
|
||||||
<Caret Line="26" Column="34"/>
|
<Caret Line="26" Column="34"/>
|
||||||
</Position3>
|
</Position3>
|
||||||
|
<Position4>
|
||||||
|
<Filename Value="usimplelazarusbrowser.pas"/>
|
||||||
|
<Caret Line="118" Column="47" TopLine="56"/>
|
||||||
|
</Position4>
|
||||||
|
<Position5>
|
||||||
|
<Filename Value="usimplelazarusbrowser.pas"/>
|
||||||
|
<Caret Line="179" Column="36" TopLine="176"/>
|
||||||
|
</Position5>
|
||||||
|
<Position6>
|
||||||
|
<Filename Value="usimplelazarusbrowser.pas"/>
|
||||||
|
<Caret Line="181" TopLine="19"/>
|
||||||
|
</Position6>
|
||||||
|
<Position7>
|
||||||
|
<Filename Value="usimplelazarusbrowser.pas"/>
|
||||||
|
<Caret Line="75" Column="83" TopLine="43"/>
|
||||||
|
</Position7>
|
||||||
</JumpHistory>
|
</JumpHistory>
|
||||||
<RunParams>
|
<RunParams>
|
||||||
<FormatVersion Value="2"/>
|
<FormatVersion Value="2"/>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
object Form1: TForm1
|
object Form1: TForm1
|
||||||
Left = 201
|
Left = 407
|
||||||
Height = 574
|
Height = 574
|
||||||
Top = 182
|
Top = 183
|
||||||
Width = 878
|
Width = 878
|
||||||
Caption = 'Initializing browser. Please wait...'
|
Caption = 'Initializing browser. Please wait...'
|
||||||
ClientHeight = 574
|
ClientHeight = 574
|
||||||
@ -62,6 +62,7 @@ object Form1: TForm1
|
|||||||
OnAfterCreated = Chromium1AfterCreated
|
OnAfterCreated = Chromium1AfterCreated
|
||||||
OnBeforeClose = Chromium1BeforeClose
|
OnBeforeClose = Chromium1BeforeClose
|
||||||
OnClose = Chromium1Close
|
OnClose = Chromium1Close
|
||||||
|
OnOpenUrlFromTab = Chromium1OpenUrlFromTab
|
||||||
left = 40
|
left = 40
|
||||||
top = 136
|
top = 136
|
||||||
end
|
end
|
||||||
|
@ -67,6 +67,10 @@ type
|
|||||||
var noJavascriptAccess: Boolean; var Result: Boolean);
|
var noJavascriptAccess: Boolean; var Result: Boolean);
|
||||||
procedure Chromium1Close(Sender: TObject; const browser: ICefBrowser;
|
procedure Chromium1Close(Sender: TObject; const browser: ICefBrowser;
|
||||||
var aAction : TCefCloseBrowserAction);
|
var aAction : TCefCloseBrowserAction);
|
||||||
|
procedure Chromium1OpenUrlFromTab(Sender: TObject;
|
||||||
|
const browser: ICefBrowser; const frame: ICefFrame;
|
||||||
|
const targetUrl: ustring; targetDisposition: TCefWindowOpenDisposition;
|
||||||
|
userGesture: Boolean; out Result: Boolean);
|
||||||
procedure FormCloseQuery(Sender: TObject; var CanClose: boolean);
|
procedure FormCloseQuery(Sender: TObject; var CanClose: boolean);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
procedure FormShow(Sender: TObject);
|
procedure FormShow(Sender: TObject);
|
||||||
@ -169,6 +173,15 @@ begin
|
|||||||
Result := (targetDisposition in [WOD_NEW_FOREGROUND_TAB, WOD_NEW_BACKGROUND_TAB, WOD_NEW_POPUP, WOD_NEW_WINDOW]);
|
Result := (targetDisposition in [WOD_NEW_FOREGROUND_TAB, WOD_NEW_BACKGROUND_TAB, WOD_NEW_POPUP, WOD_NEW_WINDOW]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TForm1.Chromium1OpenUrlFromTab(Sender: TObject;
|
||||||
|
const browser: ICefBrowser; const frame: ICefFrame; const targetUrl: ustring;
|
||||||
|
targetDisposition: TCefWindowOpenDisposition; userGesture: Boolean; out
|
||||||
|
Result: Boolean);
|
||||||
|
begin
|
||||||
|
// For simplicity, this demo blocks all popup windows and new tabs
|
||||||
|
Result := (targetDisposition in [WOD_NEW_FOREGROUND_TAB, WOD_NEW_BACKGROUND_TAB, WOD_NEW_POPUP, WOD_NEW_WINDOW]);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TForm1.Chromium1Close(Sender: TObject; const browser: ICefBrowser; var aAction : TCefCloseBrowserAction);
|
procedure TForm1.Chromium1Close(Sender: TObject; const browser: ICefBrowser; var aAction : TCefCloseBrowserAction);
|
||||||
begin
|
begin
|
||||||
PostMessage(Handle, CEF_DESTROY, 0, 0);
|
PostMessage(Handle, CEF_DESTROY, 0, 0);
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
</CompilerOptions>
|
</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."/>
|
<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"/>
|
<License Value="MPL 1.1"/>
|
||||||
<Version Major="76" Minor="1" Release="9"/>
|
<Version Major="76" Minor="1" Release="10"/>
|
||||||
<Files Count="143">
|
<Files Count="143">
|
||||||
<Item1>
|
<Item1>
|
||||||
<Filename Value="..\source\uCEFAccessibilityHandler.pas"/>
|
<Filename Value="..\source\uCEFAccessibilityHandler.pas"/>
|
||||||
|
@ -62,7 +62,7 @@ uses
|
|||||||
const
|
const
|
||||||
CEF_SUPPORTED_VERSION_MAJOR = 76;
|
CEF_SUPPORTED_VERSION_MAJOR = 76;
|
||||||
CEF_SUPPORTED_VERSION_MINOR = 1;
|
CEF_SUPPORTED_VERSION_MINOR = 1;
|
||||||
CEF_SUPPORTED_VERSION_RELEASE = 9;
|
CEF_SUPPORTED_VERSION_RELEASE = 10;
|
||||||
CEF_SUPPORTED_VERSION_BUILD = 0;
|
CEF_SUPPORTED_VERSION_BUILD = 0;
|
||||||
|
|
||||||
CEF_CHROMEELF_VERSION_MAJOR = 76;
|
CEF_CHROMEELF_VERSION_MAJOR = 76;
|
||||||
@ -121,6 +121,7 @@ type
|
|||||||
FFlashEnabled : boolean;
|
FFlashEnabled : boolean;
|
||||||
FEnableMediaStream : boolean;
|
FEnableMediaStream : boolean;
|
||||||
FEnableSpeechInput : boolean;
|
FEnableSpeechInput : boolean;
|
||||||
|
FUseFakeUIForMediaStream : boolean;
|
||||||
FEnableGPU : boolean;
|
FEnableGPU : boolean;
|
||||||
FCheckCEFFiles : boolean;
|
FCheckCEFFiles : boolean;
|
||||||
FLibLoaded : boolean;
|
FLibLoaded : boolean;
|
||||||
@ -389,6 +390,7 @@ type
|
|||||||
property FlashEnabled : boolean read FFlashEnabled write FFlashEnabled;
|
property FlashEnabled : boolean read FFlashEnabled write FFlashEnabled;
|
||||||
property EnableMediaStream : boolean read FEnableMediaStream write FEnableMediaStream;
|
property EnableMediaStream : boolean read FEnableMediaStream write FEnableMediaStream;
|
||||||
property EnableSpeechInput : boolean read FEnableSpeechInput write FEnableSpeechInput;
|
property EnableSpeechInput : boolean read FEnableSpeechInput write FEnableSpeechInput;
|
||||||
|
property UseFakeUIForMediaStream : boolean read FUseFakeUIForMediaStream write FUseFakeUIForMediaStream;
|
||||||
property EnableGPU : boolean read FEnableGPU write FEnableGPU;
|
property EnableGPU : boolean read FEnableGPU write FEnableGPU;
|
||||||
property CheckCEFFiles : boolean read FCheckCEFFiles write FCheckCEFFiles;
|
property CheckCEFFiles : boolean read FCheckCEFFiles write FCheckCEFFiles;
|
||||||
property ShowMessageDlg : boolean read FShowMessageDlg write FShowMessageDlg;
|
property ShowMessageDlg : boolean read FShowMessageDlg write FShowMessageDlg;
|
||||||
@ -578,6 +580,7 @@ begin
|
|||||||
FFlashEnabled := True;
|
FFlashEnabled := True;
|
||||||
FEnableMediaStream := True;
|
FEnableMediaStream := True;
|
||||||
FEnableSpeechInput := True;
|
FEnableSpeechInput := True;
|
||||||
|
FUseFakeUIForMediaStream := False;
|
||||||
FEnableGPU := False;
|
FEnableGPU := False;
|
||||||
FCustomCommandLines := nil;
|
FCustomCommandLines := nil;
|
||||||
FCustomCommandLineValues := nil;
|
FCustomCommandLineValues := nil;
|
||||||
@ -1608,6 +1611,9 @@ begin
|
|||||||
commandLine.AppendSwitchWithValue('--enable-media-stream', IntToStr(Ord(FEnableMediaStream)));
|
commandLine.AppendSwitchWithValue('--enable-media-stream', IntToStr(Ord(FEnableMediaStream)));
|
||||||
commandLine.AppendSwitchWithValue('--enable-speech-input', IntToStr(Ord(FEnableSpeechInput)));
|
commandLine.AppendSwitchWithValue('--enable-speech-input', IntToStr(Ord(FEnableSpeechInput)));
|
||||||
|
|
||||||
|
if FUseFakeUIForMediaStream then
|
||||||
|
commandLine.AppendSwitch('--use-fake-ui-for-media-stream');
|
||||||
|
|
||||||
if not(FEnableGPU) then
|
if not(FEnableGPU) then
|
||||||
begin
|
begin
|
||||||
commandLine.AppendSwitch('--disable-gpu');
|
commandLine.AppendSwitch('--disable-gpu');
|
||||||
|
@ -76,7 +76,8 @@ type
|
|||||||
public
|
public
|
||||||
constructor CreateData(size: Cardinal; owned : boolean = False); virtual;
|
constructor CreateData(size: Cardinal; owned : boolean = False); virtual;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
function SameAs(aData : Pointer) : boolean;
|
function SameAs(aData : Pointer) : boolean; overload;
|
||||||
|
function SameAs(const aBaseRefCounted : ICefBaseRefCounted) : boolean; overload;
|
||||||
function Wrap: Pointer;
|
function Wrap: Pointer;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -90,7 +91,8 @@ type
|
|||||||
public
|
public
|
||||||
constructor Create(data: Pointer); virtual;
|
constructor Create(data: Pointer); virtual;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
function SameAs(aData : Pointer) : boolean;
|
function SameAs(aData : Pointer) : boolean; overload;
|
||||||
|
function SameAs(const aBaseRefCounted : ICefBaseRefCounted) : boolean; overload;
|
||||||
function Wrap: Pointer;
|
function Wrap: Pointer;
|
||||||
class function UnWrap(data: Pointer): ICefBaseRefCounted;
|
class function UnWrap(data: Pointer): ICefBaseRefCounted;
|
||||||
end;
|
end;
|
||||||
@ -221,6 +223,26 @@ begin
|
|||||||
Result := (FData = aData);
|
Result := (FData = aData);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TCefBaseRefCountedOwn.SameAs(const aBaseRefCounted : ICefBaseRefCounted) : boolean;
|
||||||
|
var
|
||||||
|
TempData : Pointer;
|
||||||
|
begin
|
||||||
|
Result := False;
|
||||||
|
|
||||||
|
if (aBaseRefCounted <> nil) then
|
||||||
|
begin
|
||||||
|
TempData := aBaseRefCounted.Wrap;
|
||||||
|
|
||||||
|
if (TempData <> nil) then
|
||||||
|
begin
|
||||||
|
Result := SameAs(TempData);
|
||||||
|
|
||||||
|
if assigned(PCefBaseRefCounted(TempData)^.release) then
|
||||||
|
PCefBaseRefCounted(TempData)^.release(PCefBaseRefCounted(TempData));
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
function TCefBaseRefCountedOwn.Wrap: Pointer;
|
function TCefBaseRefCountedOwn.Wrap: Pointer;
|
||||||
begin
|
begin
|
||||||
Result := FData;
|
Result := FData;
|
||||||
@ -280,6 +302,26 @@ begin
|
|||||||
Result := (FData = aData);
|
Result := (FData = aData);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TCefBaseRefCountedRef.SameAs(const aBaseRefCounted : ICefBaseRefCounted) : boolean;
|
||||||
|
var
|
||||||
|
TempData : Pointer;
|
||||||
|
begin
|
||||||
|
Result := False;
|
||||||
|
|
||||||
|
if (aBaseRefCounted <> nil) then
|
||||||
|
begin
|
||||||
|
TempData := aBaseRefCounted.Wrap;
|
||||||
|
|
||||||
|
if (TempData <> nil) then
|
||||||
|
begin
|
||||||
|
Result := SameAs(TempData);
|
||||||
|
|
||||||
|
if assigned(PCefBaseRefCounted(TempData)^.release) then
|
||||||
|
PCefBaseRefCounted(TempData)^.release(PCefBaseRefCounted(TempData));
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
class function TCefBaseRefCountedRef.UnWrap(data: Pointer): ICefBaseRefCounted;
|
class function TCefBaseRefCountedRef.UnWrap(data: Pointer): ICefBaseRefCounted;
|
||||||
begin
|
begin
|
||||||
if (data <> nil) then
|
if (data <> nil) then
|
||||||
|
@ -442,7 +442,8 @@ type
|
|||||||
ICefBaseRefCounted = interface
|
ICefBaseRefCounted = interface
|
||||||
['{1F9A7B44-DCDC-4477-9180-3ADD44BDEB7B}']
|
['{1F9A7B44-DCDC-4477-9180-3ADD44BDEB7B}']
|
||||||
function Wrap: Pointer;
|
function Wrap: Pointer;
|
||||||
function SameAs(aData : Pointer) : boolean;
|
function SameAs(aData : Pointer) : boolean; overload;
|
||||||
|
function SameAs(const aBaseRefCounted : ICefBaseRefCounted) : boolean; overload;
|
||||||
function HasOneRef : boolean;
|
function HasOneRef : boolean;
|
||||||
function HasAtLeastOneRef : boolean;
|
function HasAtLeastOneRef : boolean;
|
||||||
end;
|
end;
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
"UpdateLazPackages" : [
|
"UpdateLazPackages" : [
|
||||||
{
|
{
|
||||||
"ForceNotify" : true,
|
"ForceNotify" : true,
|
||||||
"InternalVersion" : 21,
|
"InternalVersion" : 22,
|
||||||
"Name" : "cef4delphi_lazarus.lpk",
|
"Name" : "cef4delphi_lazarus.lpk",
|
||||||
"Version" : "76.1.9.0"
|
"Version" : "76.1.10.0"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"UpdatePackageData" : {
|
"UpdatePackageData" : {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user