1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-06-12 22:07:39 +02:00

Added TCEFTimerWorkScheduler

- Moved the GlobalCEFWorkScheduler creation after the GlobalCEFApp creation in all demos using it.
- Replaced TCEFWorkScheduler by TCEFTimerWorkScheduler in FMX demos for Linux and MacOS.
- Fixed context menu issue in FMXExternalPumpBrowser2 for Linux
- Fixed stability issues in FMXExternalPumpBrowser for MacOS
- Fixed 32bit build issues in TinyBrowser and ToolBoxBrowser2 demos.
- Added uCEFMacOSInterfaces and uCEFMacOSCustomCocoaTimer.
This commit is contained in:
Salvador Díaz Fau
2021-06-04 15:10:40 +02:00
parent b14abde967
commit 43ab8ef953
67 changed files with 2517 additions and 1406 deletions

View File

@ -14,7 +14,7 @@ uses
{$ENDIF}
uCEFInterfaces, uCEFTypes, uCEFConstants, uCEFViewComponent,
uCEFPanelComponent, uCEFWindowComponent,
uCEFBrowserViewComponent, uCEFChromiumCore, uCEFChromium;
uCEFBrowserViewComponent, uCEFChromiumCore, uCEFChromium, uCEFViewsFrameworkEvents;
const
CEFBROWSER_INITIALIZED = WM_APP + $100;
@ -23,6 +23,9 @@ const
DEFAULT_WINDOW_VIEW_HEIGHT = 600;
type
{ TMainForm }
TMainForm = class(TForm)
ButtonPnl: TPanel;
Edit1: TEdit;
@ -34,10 +37,10 @@ type
procedure FormShow(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure CEFWindowComponent1GetPreferredSize(const Sender: TObject; const view: ICefView; var aResult: TCefSize);
procedure CEFWindowComponent1WindowCreated(const Sender: TObject; const window: ICefWindow);
procedure CEFWindowComponent1WindowDestroyed(const Sender: TObject; const window: ICefWindow);
procedure CEFWindowComponent1CanClose(const Sender: TObject; const window: ICefWindow; var aResult: Boolean);
procedure CEFWindowComponent1CanClose(const Sender: TObject; const window: ICefWindow; var aResult: Boolean);
procedure CEFWindowComponent1GetInitialBounds(const Sender: TObject; const window: ICefWindow; var aResult: TCefRect);
procedure Chromium1TitleChange(Sender: TObject; const browser: ICefBrowser; const title: ustring);
procedure Chromium1BeforePopup(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; const targetUrl, targetFrameName: ustring; targetDisposition: TCefWindowOpenDisposition; userGesture: Boolean; const popupFeatures: TCefPopupFeatures; var windowInfo: TCefWindowInfo; var client: ICefClient; var settings: TCefBrowserSettings; var extra_info: ICefDictionaryValue; var noJavascriptAccess, Result: Boolean);
@ -133,14 +136,6 @@ begin
aResult := Chromium1.TryCloseBrowser;
end;
procedure TMainForm.CEFWindowComponent1GetPreferredSize(const Sender: TObject;
const view: ICefView; var aResult: TCefSize);
begin
// This is the initial window size
aResult.width := DEFAULT_WINDOW_VIEW_WIDTH;
aResult.height := DEFAULT_WINDOW_VIEW_HEIGHT;
end;
procedure TMainForm.CEFWindowComponent1WindowCreated(const Sender: TObject;
const window: ICefWindow);
var
@ -206,6 +201,16 @@ begin
EnableInterface;
end;
procedure TMainForm.CEFWindowComponent1GetInitialBounds(const Sender: TObject;
const window: ICefWindow; var aResult: TCefRect);
begin
// This is the initial window size
aResult.x := 0;
aResult.y := 0;
aResult.width := DEFAULT_WINDOW_VIEW_WIDTH;
aResult.height := DEFAULT_WINDOW_VIEW_HEIGHT;
end;
procedure TMainForm.EnableInterface;
begin
Caption := 'ToolBox Browser 2';