You've already forked CEF4Delphi
mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-11-23 21:34:53 +02:00
Update to CEF 95.7.10
Added TChromiumCore.OnPrefsUpdated. See issue #390
This commit is contained in:
@@ -217,7 +217,7 @@ type
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure Chromium1BeforeResourceLoad(Sender: TObject;
|
||||
const browser: ICefBrowser; const frame: ICefFrame;
|
||||
const request: ICefRequest; const callback: ICefRequestCallback;
|
||||
const request: ICefRequest; const callback: ICefCallback;
|
||||
out Result: TCefReturnValue);
|
||||
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
||||
procedure Chromium1Close(Sender: TObject; const browser: ICefBrowser;
|
||||
@@ -237,7 +237,7 @@ type
|
||||
procedure Chromium1CertificateError(Sender: TObject;
|
||||
const browser: ICefBrowser; certError: Integer;
|
||||
const requestUrl: ustring; const sslInfo: ICefSslInfo;
|
||||
const callback: ICefRequestCallback; out Result: Boolean);
|
||||
const callback: ICefCallback; out Result: Boolean);
|
||||
procedure Chromium1NavigationVisitorResultAvailable(Sender: TObject;
|
||||
const entry: ICefNavigationEntry; current: Boolean; index, total: Integer;
|
||||
var aResult: Boolean);
|
||||
@@ -555,7 +555,7 @@ end;
|
||||
|
||||
procedure TMiniBrowserFrm.Chromium1BeforeResourceLoad(Sender: TObject;
|
||||
const browser: ICefBrowser; const frame: ICefFrame;
|
||||
const request: ICefRequest; const callback: ICefRequestCallback;
|
||||
const request: ICefRequest; const callback: ICefCallback;
|
||||
out Result: TCefReturnValue);
|
||||
begin
|
||||
Result := RV_CONTINUE;
|
||||
@@ -570,7 +570,7 @@ end;
|
||||
procedure TMiniBrowserFrm.Chromium1CertificateError(Sender: TObject;
|
||||
const browser: ICefBrowser; certError: Integer;
|
||||
const requestUrl: ustring; const sslInfo: ICefSslInfo;
|
||||
const callback: ICefRequestCallback; out Result: Boolean);
|
||||
const callback: ICefCallback; out Result: Boolean);
|
||||
begin
|
||||
CefDebugLog('Certificate error code:' + inttostr(certError) +
|
||||
' - URL:' + requestUrl, CEF_LOG_SEVERITY_ERROR);
|
||||
|
||||
@@ -269,7 +269,7 @@ end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.GoBtnEnter(Sender: TObject);
|
||||
begin
|
||||
chrmosr.SendFocusEvent(False);
|
||||
chrmosr.SetFocus(False);
|
||||
end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.chrmosrAfterCreated(Sender: TObject; const browser: ICefBrowser);
|
||||
@@ -539,7 +539,7 @@ end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.ComboBox1Enter(Sender: TObject);
|
||||
begin
|
||||
chrmosr.SendFocusEvent(False);
|
||||
chrmosr.SetFocus(False);
|
||||
end;
|
||||
|
||||
function TOSRExternalPumpBrowserFrm.getModifiers(Shift: TShiftState): TCefEventFlags;
|
||||
@@ -749,7 +749,7 @@ end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.FormHide(Sender: TObject);
|
||||
begin
|
||||
chrmosr.SendFocusEvent(False);
|
||||
chrmosr.SetFocus(False);
|
||||
chrmosr.WasHidden(True);
|
||||
end;
|
||||
|
||||
@@ -758,7 +758,7 @@ begin
|
||||
if chrmosr.Initialized then
|
||||
begin
|
||||
chrmosr.WasHidden(False);
|
||||
chrmosr.SendFocusEvent(True);
|
||||
chrmosr.SetFocus(True);
|
||||
end
|
||||
else
|
||||
begin
|
||||
@@ -916,12 +916,12 @@ end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.Panel1Enter(Sender: TObject);
|
||||
begin
|
||||
chrmosr.SendFocusEvent(True);
|
||||
chrmosr.SetFocus(True);
|
||||
end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.Panel1Exit(Sender: TObject);
|
||||
begin
|
||||
chrmosr.SendFocusEvent(False);
|
||||
chrmosr.SetFocus(False);
|
||||
end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.Panel1IMECancelComposition(Sender: TObject);
|
||||
@@ -1009,7 +1009,7 @@ end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.SnapshotBtnEnter(Sender: TObject);
|
||||
begin
|
||||
chrmosr.SendFocusEvent(False);
|
||||
chrmosr.SetFocus(False);
|
||||
end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.Timer1Timer(Sender: TObject);
|
||||
|
||||
@@ -710,14 +710,14 @@ end;
|
||||
|
||||
procedure TChildForm.FormHide(Sender: TObject);
|
||||
begin
|
||||
chrmosr.SendFocusEvent(False);
|
||||
chrmosr.SetFocus(False);
|
||||
chrmosr.WasHidden(True);
|
||||
end;
|
||||
|
||||
procedure TChildForm.FormShow(Sender: TObject);
|
||||
begin
|
||||
chrmosr.WasHidden(False);
|
||||
chrmosr.SendFocusEvent(True);
|
||||
chrmosr.SetFocus(True);
|
||||
end;
|
||||
|
||||
procedure TChildForm.Panel1Click(Sender: TObject);
|
||||
@@ -871,12 +871,12 @@ end;
|
||||
|
||||
procedure TChildForm.Panel1Enter(Sender: TObject);
|
||||
begin
|
||||
chrmosr.SendFocusEvent(True);
|
||||
chrmosr.SetFocus(True);
|
||||
end;
|
||||
|
||||
procedure TChildForm.Panel1Exit(Sender: TObject);
|
||||
begin
|
||||
chrmosr.SendFocusEvent(False);
|
||||
chrmosr.SetFocus(False);
|
||||
end;
|
||||
|
||||
procedure TChildForm.Panel1IMECancelComposition(Sender: TObject);
|
||||
|
||||
@@ -89,7 +89,7 @@ type
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure Chromium1BeforeResourceLoad(Sender: TObject;
|
||||
const browser: ICefBrowser; const frame: ICefFrame;
|
||||
const request: ICefRequest; const callback: ICefRequestCallback;
|
||||
const request: ICefRequest; const callback: ICefCallback;
|
||||
out Result: TCefReturnValue);
|
||||
protected
|
||||
// Variables to control when can we destroy the form safely
|
||||
@@ -362,7 +362,7 @@ end;
|
||||
|
||||
procedure TForm1.Chromium1BeforeResourceLoad(Sender: TObject;
|
||||
const browser: ICefBrowser; const frame: ICefFrame;
|
||||
const request: ICefRequest; const callback: ICefRequestCallback;
|
||||
const request: ICefRequest; const callback: ICefCallback;
|
||||
out Result: TCefReturnValue);
|
||||
begin
|
||||
// This event is called before a resource request is loaded.
|
||||
|
||||
@@ -279,7 +279,7 @@ end;
|
||||
|
||||
procedure TForm1.GoBtnEnter(Sender: TObject);
|
||||
begin
|
||||
chrmosr.SendFocusEvent(False);
|
||||
chrmosr.SetFocus(False);
|
||||
end;
|
||||
|
||||
procedure TForm1.chrmosrAfterCreated(Sender: TObject; const browser: ICefBrowser);
|
||||
@@ -549,7 +549,7 @@ end;
|
||||
|
||||
procedure TForm1.ComboBox1Enter(Sender: TObject);
|
||||
begin
|
||||
chrmosr.SendFocusEvent(False);
|
||||
chrmosr.SetFocus(False);
|
||||
end;
|
||||
|
||||
function TForm1.getModifiers(Shift: TShiftState): TCefEventFlags;
|
||||
@@ -759,7 +759,7 @@ end;
|
||||
|
||||
procedure TForm1.FormHide(Sender: TObject);
|
||||
begin
|
||||
chrmosr.SendFocusEvent(False);
|
||||
chrmosr.SetFocus(False);
|
||||
chrmosr.WasHidden(True);
|
||||
end;
|
||||
|
||||
@@ -768,7 +768,7 @@ begin
|
||||
if chrmosr.Initialized then
|
||||
begin
|
||||
chrmosr.WasHidden(False);
|
||||
chrmosr.SendFocusEvent(True);
|
||||
chrmosr.SetFocus(True);
|
||||
end
|
||||
else
|
||||
begin
|
||||
@@ -926,12 +926,12 @@ end;
|
||||
|
||||
procedure TForm1.Panel1Enter(Sender: TObject);
|
||||
begin
|
||||
chrmosr.SendFocusEvent(True);
|
||||
chrmosr.SetFocus(True);
|
||||
end;
|
||||
|
||||
procedure TForm1.Panel1Exit(Sender: TObject);
|
||||
begin
|
||||
chrmosr.SendFocusEvent(False);
|
||||
chrmosr.SetFocus(False);
|
||||
end;
|
||||
|
||||
procedure TForm1.Panel1IMECancelComposition(Sender: TObject);
|
||||
@@ -1019,7 +1019,7 @@ end;
|
||||
|
||||
procedure TForm1.SnapshotBtnEnter(Sender: TObject);
|
||||
begin
|
||||
chrmosr.SendFocusEvent(False);
|
||||
chrmosr.SetFocus(False);
|
||||
end;
|
||||
|
||||
procedure TForm1.Timer1Timer(Sender: TObject);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// ************************************************************************
|
||||
// ************************************************************************
|
||||
// ***************************** CEF4Delphi *******************************
|
||||
// ************************************************************************
|
||||
//
|
||||
@@ -328,13 +328,13 @@ end;
|
||||
procedure TBrowserFrame.ShowBrowser;
|
||||
begin
|
||||
Chromium1.WasHidden(False);
|
||||
Chromium1.SendFocusEvent(True);
|
||||
Chromium1.SetFocus(True);
|
||||
Chromium1.AudioMuted := False;
|
||||
end;
|
||||
|
||||
procedure TBrowserFrame.HideBrowser;
|
||||
begin
|
||||
Chromium1.SendFocusEvent(False);
|
||||
Chromium1.SetFocus(False);
|
||||
Chromium1.WasHidden(True);
|
||||
Chromium1.AudioMuted := True;
|
||||
end;
|
||||
|
||||
@@ -273,7 +273,7 @@ begin
|
||||
GlobalCEFApp := TCefApplication.Create;
|
||||
GlobalCEFApp.MultiThreadedMessageLoop := False;
|
||||
GlobalCEFApp.ExternalMessagePump := False;
|
||||
//GlobalCEFApp.ChromeRuntime := True; // Enable this line to test the new "ChromeRuntime" mode. It's in experimental state.
|
||||
GlobalCEFApp.ChromeRuntime := True; // Enable this line to test the new "ChromeRuntime" mode. It's in experimental state.
|
||||
GlobalCEFApp.OnContextInitialized := GlobalCEFApp_OnContextInitialized;
|
||||
GlobalCEFApp.OnGetDefaultClient := GlobalCEFApp_OnGetDefaultClient; // This event is only used in "ChromeRuntime" mode
|
||||
end;
|
||||
|
||||
@@ -105,15 +105,11 @@ begin
|
||||
GlobalCEFApp := TCefApplication.Create;
|
||||
GlobalCEFApp.MultiThreadedMessageLoop := False;
|
||||
GlobalCEFApp.ExternalMessagePump := False;
|
||||
GlobalCEFApp.ChromeRuntime := True; // Enable this line to enable the "ChromeRuntime" mode. It's in experimental state.
|
||||
//GlobalCEFApp.ChromeRuntime := True; // Enable this line to enable the "ChromeRuntime" mode. It's in experimental state.
|
||||
GlobalCEFApp.DisablePopupBlocking := True;
|
||||
GlobalCEFApp.cache := 'cache';
|
||||
GlobalCEFApp.OnContextInitialized := GlobalCEFApp_OnContextInitialized;
|
||||
GlobalCEFApp.OnGetDefaultClient := GlobalCEFApp_OnGetDefaultClient; // This event is only used in "ChromeRuntime" mode
|
||||
|
||||
// This is a workaround for the CEF4Delphi issue #324 :
|
||||
// https://github.com/salvadordf/CEF4Delphi/issues/324
|
||||
GlobalCEFApp.DisableFeatures := 'WinUseBrowserSpellChecker';
|
||||
end;
|
||||
|
||||
procedure DestroyTinyBrowser;
|
||||
|
||||
Reference in New Issue
Block a user