You've already forked CEF4Delphi
mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-06-12 22:07:39 +02:00
Added GlobalCEFApp.SupportedSchemes
- Added TChromium.UpdateSupportedSchemes - Added local image selection to the EditorBrowser demo
This commit is contained in:
@ -89,9 +89,4 @@ object JSExtensionFrm: TJSExtensionFrm
|
||||
Left = 32
|
||||
Top = 288
|
||||
end
|
||||
object CEFSentinel1: TCEFSentinel
|
||||
OnClose = CEFSentinel1Close
|
||||
Left = 32
|
||||
Top = 360
|
||||
end
|
||||
end
|
||||
|
@ -71,7 +71,6 @@ type
|
||||
CEFWindowParent1: TCEFWindowParent;
|
||||
Chromium1: TChromium;
|
||||
Timer1: TTimer;
|
||||
CEFSentinel1: TCEFSentinel;
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure GoBtnClick(Sender: TObject);
|
||||
procedure Chromium1BeforeContextMenu(Sender: TObject;
|
||||
@ -100,7 +99,6 @@ type
|
||||
var aAction : TCefCloseBrowserAction);
|
||||
procedure Chromium1BeforeClose(Sender: TObject;
|
||||
const browser: ICefBrowser);
|
||||
procedure CEFSentinel1Close(Sender: TObject);
|
||||
protected
|
||||
FText : string;
|
||||
// Variables to control when can we destroy the form safely
|
||||
@ -275,8 +273,7 @@ uses
|
||||
// the TChromium.OnClose event.
|
||||
// 2. TChromium.OnClose sends a CEFBROWSER_DESTROY message to destroy CEFWindowParent1
|
||||
// in the main thread, which triggers the TChromium.OnBeforeClose event.
|
||||
// 3. TChromium.OnBeforeClose calls TCEFSentinel.Start, which will trigger TCEFSentinel.OnClose when the renderer processes are closed.
|
||||
// 4. TCEFSentinel.OnClose sets FCanClose := True and sends WM_CLOSE to the form.
|
||||
// 3. TChromium.OnBeforeClose sets FCanClose := True and sends WM_CLOSE to the form.
|
||||
|
||||
|
||||
procedure GlobalCEFApp_OnWebKitInitialized;
|
||||
@ -329,21 +326,15 @@ begin
|
||||
Chromium1.LoadURL(Edit1.Text);
|
||||
end;
|
||||
|
||||
procedure TJSExtensionFrm.CEFSentinel1Close(Sender: TObject);
|
||||
begin
|
||||
FCanClose := True;
|
||||
PostMessage(Handle, WM_CLOSE, 0, 0);
|
||||
end;
|
||||
|
||||
procedure TJSExtensionFrm.Chromium1AfterCreated(Sender: TObject; const browser: ICefBrowser);
|
||||
begin
|
||||
PostMessage(Handle, CEF_AFTERCREATED, 0, 0);
|
||||
end;
|
||||
|
||||
procedure TJSExtensionFrm.Chromium1BeforeClose(Sender: TObject;
|
||||
const browser: ICefBrowser);
|
||||
procedure TJSExtensionFrm.Chromium1BeforeClose(Sender: TObject; const browser: ICefBrowser);
|
||||
begin
|
||||
CEFSentinel1.Start;
|
||||
FCanClose := True;
|
||||
PostMessage(Handle, WM_CLOSE, 0, 0);
|
||||
end;
|
||||
|
||||
procedure TJSExtensionFrm.Chromium1BeforeContextMenu(Sender: TObject;
|
||||
|
Reference in New Issue
Block a user