mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-06-02 21:57:37 +02:00
Merge pull request #240 from ahausladen/CEFwithoutVCL
Split uCEFApplication into UI and non UI (for SubProcesses) units
This commit is contained in:
commit
048292b553
@ -530,7 +530,7 @@ procedure TFMXExternalPumpBrowserFrm.chrmosrCursorChange(Sender : TObject;
|
|||||||
cursorType : TCefCursorType;
|
cursorType : TCefCursorType;
|
||||||
const customCursorInfo : PCefCursorInfo);
|
const customCursorInfo : PCefCursorInfo);
|
||||||
begin
|
begin
|
||||||
Panel1.Cursor := GefCursorToWindowsCursor(cursorType);
|
Panel1.Cursor := CefCursorToWindowsCursor(cursorType);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFMXExternalPumpBrowserFrm.chrmosrGetScreenInfo(Sender : TObject;
|
procedure TFMXExternalPumpBrowserFrm.chrmosrGetScreenInfo(Sender : TObject;
|
||||||
|
@ -307,7 +307,7 @@ procedure TWebBrowserFrm.chrmosrCursorChange( Sender : TObject;
|
|||||||
cursorType : TCefCursorType;
|
cursorType : TCefCursorType;
|
||||||
const customCursorInfo : PCefCursorInfo);
|
const customCursorInfo : PCefCursorInfo);
|
||||||
begin
|
begin
|
||||||
Panel1.Cursor := GefCursorToWindowsCursor(cursorType);
|
Panel1.Cursor := CefCursorToWindowsCursor(cursorType);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TWebBrowserFrm.chrmosrGetScreenInfo( Sender : TObject;
|
procedure TWebBrowserFrm.chrmosrGetScreenInfo( Sender : TObject;
|
||||||
|
@ -365,7 +365,7 @@ procedure TForm1.chrmosrCursorChange( Sender : TObject;
|
|||||||
cursorType : TCefCursorType;
|
cursorType : TCefCursorType;
|
||||||
const customCursorInfo : PCefCursorInfo);
|
const customCursorInfo : PCefCursorInfo);
|
||||||
begin
|
begin
|
||||||
Panel1.Cursor := GefCursorToWindowsCursor(cursorType);
|
Panel1.Cursor := CefCursorToWindowsCursor(cursorType);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TForm1.chrmosrGetScreenInfo( Sender : TObject;
|
procedure TForm1.chrmosrGetScreenInfo( Sender : TObject;
|
||||||
|
@ -358,7 +358,7 @@ procedure TOSRExternalPumpBrowserFrm.chrmosrCursorChange(Sender : TObject;
|
|||||||
cursorType : TCefCursorType;
|
cursorType : TCefCursorType;
|
||||||
const customCursorInfo : PCefCursorInfo);
|
const customCursorInfo : PCefCursorInfo);
|
||||||
begin
|
begin
|
||||||
Panel1.Cursor := GefCursorToWindowsCursor(cursorType);
|
Panel1.Cursor := CefCursorToWindowsCursor(cursorType);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TOSRExternalPumpBrowserFrm.chrmosrGetScreenInfo(Sender : TObject;
|
procedure TOSRExternalPumpBrowserFrm.chrmosrGetScreenInfo(Sender : TObject;
|
||||||
|
@ -360,7 +360,7 @@ procedure TChildForm.Chromium1CursorChange(Sender : TObject;
|
|||||||
cursorType : TCefCursorType;
|
cursorType : TCefCursorType;
|
||||||
const customCursorInfo : PCefCursorInfo);
|
const customCursorInfo : PCefCursorInfo);
|
||||||
begin
|
begin
|
||||||
Panel1.Cursor := GefCursorToWindowsCursor(cursorType);
|
Panel1.Cursor := CefCursorToWindowsCursor(cursorType);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TChildForm.Chromium1GetScreenInfo(Sender : TObject;
|
procedure TChildForm.Chromium1GetScreenInfo(Sender : TObject;
|
||||||
|
@ -358,7 +358,7 @@ procedure TForm1.chrmosrCursorChange(Sender : TObject;
|
|||||||
cursorType : TCefCursorType;
|
cursorType : TCefCursorType;
|
||||||
const customCursorInfo : PCefCursorInfo);
|
const customCursorInfo : PCefCursorInfo);
|
||||||
begin
|
begin
|
||||||
Panel1.Cursor := GefCursorToWindowsCursor(cursorType);
|
Panel1.Cursor := CefCursorToWindowsCursor(cursorType);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TForm1.chrmosrGetScreenInfo(Sender : TObject;
|
procedure TForm1.chrmosrGetScreenInfo(Sender : TObject;
|
||||||
|
@ -45,14 +45,14 @@ uses
|
|||||||
{$ELSE}
|
{$ELSE}
|
||||||
Windows,
|
Windows,
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
uCEFApplication;
|
uCEFApplicationCore;
|
||||||
|
|
||||||
// CEF3 needs to set the LARGEADDRESSAWARE flag which allows 32-bit processes
|
// CEF3 needs to set the LARGEADDRESSAWARE flag which allows 32-bit processes
|
||||||
// to use up to 3GB of RAM.
|
// to use up to 3GB of RAM.
|
||||||
{$SetPEFlags IMAGE_FILE_LARGE_ADDRESS_AWARE}
|
{$SetPEFlags IMAGE_FILE_LARGE_ADDRESS_AWARE}
|
||||||
|
|
||||||
begin
|
begin
|
||||||
GlobalCEFApp := TCefApplication.Create;
|
GlobalCEFApp := TCefApplicationCore.Create;
|
||||||
|
|
||||||
// The main process and the subprocess *MUST* have the same GlobalCEFApp
|
// The main process and the subprocess *MUST* have the same GlobalCEFApp
|
||||||
// properties and events, specially FrameworkDirPath, ResourcesDirPath,
|
// properties and events, specially FrameworkDirPath, ResourcesDirPath,
|
||||||
|
@ -290,7 +290,7 @@ procedure TChildForm.chrmosrCursorChange(Sender : TObject;
|
|||||||
cursorType : TCefCursorType;
|
cursorType : TCefCursorType;
|
||||||
const customCursorInfo : PCefCursorInfo);
|
const customCursorInfo : PCefCursorInfo);
|
||||||
begin
|
begin
|
||||||
Panel1.Cursor := GefCursorToWindowsCursor(cursorType);
|
Panel1.Cursor := CefCursorToWindowsCursor(cursorType);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TChildForm.chrmosrGetScreenInfo(Sender : TObject;
|
procedure TChildForm.chrmosrGetScreenInfo(Sender : TObject;
|
||||||
|
@ -306,7 +306,7 @@ procedure TForm1.chrmosrCursorChange(Sender : TObject;
|
|||||||
cursorType : TCefCursorType;
|
cursorType : TCefCursorType;
|
||||||
const customCursorInfo : PCefCursorInfo);
|
const customCursorInfo : PCefCursorInfo);
|
||||||
begin
|
begin
|
||||||
Panel1.Cursor := GefCursorToWindowsCursor(cursorType);
|
Panel1.Cursor := CefCursorToWindowsCursor(cursorType);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TForm1.chrmosrGetScreenInfo(Sender : TObject;
|
procedure TForm1.chrmosrGetScreenInfo(Sender : TObject;
|
||||||
|
@ -43,14 +43,14 @@ program SubProcess;
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
LCLIntf, LCLType, LMessages, Forms, Interfaces,
|
LCLIntf, LCLType, LMessages, Forms, Interfaces,
|
||||||
uCEFApplication;
|
uCEFApplicationCore;
|
||||||
|
|
||||||
// CEF3 needs to set the LARGEADDRESSAWARE flag which allows 32-bit processes
|
// CEF3 needs to set the LARGEADDRESSAWARE flag which allows 32-bit processes
|
||||||
// to use up to 3GB of RAM.
|
// to use up to 3GB of RAM.
|
||||||
{$SetPEFlags $20}
|
{$SetPEFlags $20}
|
||||||
|
|
||||||
begin
|
begin
|
||||||
GlobalCEFApp := TCefApplication.Create;
|
GlobalCEFApp := TCefApplicationCore.Create;
|
||||||
|
|
||||||
// The main process and the subprocess *MUST* have the same GlobalCEFApp
|
// The main process and the subprocess *MUST* have the same GlobalCEFApp
|
||||||
// properties and events, specially FrameworkDirPath, ResourcesDirPath,
|
// properties and events, specially FrameworkDirPath, ResourcesDirPath,
|
||||||
|
@ -54,7 +54,7 @@ uses
|
|||||||
{$ELSE}
|
{$ELSE}
|
||||||
Classes,
|
Classes,
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
uCEFTypes, uCEFInterfaces, uCEFBaseRefCounted, uCEFSchemeRegistrar, uCEFApplication;
|
uCEFTypes, uCEFInterfaces, uCEFBaseRefCounted, uCEFSchemeRegistrar, uCEFApplicationCore;
|
||||||
|
|
||||||
type
|
type
|
||||||
TCefAppOwn = class(TCefBaseRefCountedOwn, ICefApp)
|
TCefAppOwn = class(TCefBaseRefCountedOwn, ICefApp)
|
||||||
@ -71,7 +71,7 @@ type
|
|||||||
|
|
||||||
TCustomCefApp = class(TCefAppOwn)
|
TCustomCefApp = class(TCefAppOwn)
|
||||||
protected
|
protected
|
||||||
FCefApp : TCefApplication;
|
FCefApp : TCefApplicationCore;
|
||||||
FResourceBundleHandler : ICefResourceBundleHandler;
|
FResourceBundleHandler : ICefResourceBundleHandler;
|
||||||
FBrowserProcessHandler : ICefBrowserProcessHandler;
|
FBrowserProcessHandler : ICefBrowserProcessHandler;
|
||||||
FRenderProcessHandler : ICefRenderProcessHandler;
|
FRenderProcessHandler : ICefRenderProcessHandler;
|
||||||
@ -85,7 +85,7 @@ type
|
|||||||
procedure InitializeVars;
|
procedure InitializeVars;
|
||||||
|
|
||||||
public
|
public
|
||||||
constructor Create(const aCefApp : TCefApplication); reintroduce;
|
constructor Create(const aCefApp : TCefApplicationCore); reintroduce;
|
||||||
procedure BeforeDestruction; override;
|
procedure BeforeDestruction; override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -98,7 +98,7 @@ uses
|
|||||||
{$ELSE}
|
{$ELSE}
|
||||||
SysUtils,
|
SysUtils,
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
uCEFLibFunctions, uCEFMiscFunctions, uCEFCommandLine, uCEFConstants,
|
uCEFMiscFunctions, uCEFCommandLine, uCEFConstants,
|
||||||
uCEFBrowserProcessHandler, uCEFResourceBundleHandler, uCEFRenderProcessHandler;
|
uCEFBrowserProcessHandler, uCEFResourceBundleHandler, uCEFRenderProcessHandler;
|
||||||
|
|
||||||
|
|
||||||
@ -212,7 +212,7 @@ end;
|
|||||||
// TCustomCefApp
|
// TCustomCefApp
|
||||||
|
|
||||||
|
|
||||||
constructor TCustomCefApp.Create(const aCefApp : TCefApplication);
|
constructor TCustomCefApp.Create(const aCefApp : TCefApplicationCore);
|
||||||
begin
|
begin
|
||||||
inherited Create;
|
inherited Create;
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
2678
source/uCEFApplicationCore.pas
Normal file
2678
source/uCEFApplicationCore.pas
Normal file
File diff suppressed because it is too large
Load Diff
@ -102,7 +102,7 @@ type
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
uCEFTypes, uCEFMiscFunctions, uCEFConstants, uCEFApplication;
|
uCEFTypes, uCEFMiscFunctions;
|
||||||
|
|
||||||
|
|
||||||
// ***********************************************
|
// ***********************************************
|
||||||
|
@ -49,7 +49,7 @@ unit uCEFBrowserProcessHandler;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
uCEFBaseRefCounted, uCEFInterfaces, uCEFTypes, uCEFApplication;
|
uCEFBaseRefCounted, uCEFInterfaces, uCEFTypes, uCEFApplicationCore;
|
||||||
|
|
||||||
type
|
type
|
||||||
TCefBrowserProcessHandlerOwn = class(TCefBaseRefCountedOwn, ICefBrowserProcessHandler)
|
TCefBrowserProcessHandlerOwn = class(TCefBaseRefCountedOwn, ICefBrowserProcessHandler)
|
||||||
@ -66,7 +66,7 @@ type
|
|||||||
|
|
||||||
TCefCustomBrowserProcessHandler = class(TCefBrowserProcessHandlerOwn)
|
TCefCustomBrowserProcessHandler = class(TCefBrowserProcessHandlerOwn)
|
||||||
protected
|
protected
|
||||||
FCefApp : TCefApplication;
|
FCefApp : TCefApplicationCore;
|
||||||
|
|
||||||
procedure OnContextInitialized; override;
|
procedure OnContextInitialized; override;
|
||||||
procedure OnBeforeChildProcessLaunch(const commandLine: ICefCommandLine); override;
|
procedure OnBeforeChildProcessLaunch(const commandLine: ICefCommandLine); override;
|
||||||
@ -74,7 +74,7 @@ type
|
|||||||
procedure OnScheduleMessagePumpWork(const delayMs: Int64); override;
|
procedure OnScheduleMessagePumpWork(const delayMs: Int64); override;
|
||||||
|
|
||||||
public
|
public
|
||||||
constructor Create(const aCefApp : TCefApplication); reintroduce;
|
constructor Create(const aCefApp : TCefApplicationCore); reintroduce;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -171,7 +171,7 @@ end;
|
|||||||
// TCefCustomBrowserProcessHandler
|
// TCefCustomBrowserProcessHandler
|
||||||
|
|
||||||
|
|
||||||
constructor TCefCustomBrowserProcessHandler.Create(const aCefApp : TCefApplication);
|
constructor TCefCustomBrowserProcessHandler.Create(const aCefApp : TCefApplicationCore);
|
||||||
begin
|
begin
|
||||||
inherited Create;
|
inherited Create;
|
||||||
|
|
||||||
|
@ -234,7 +234,7 @@ procedure Register;
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
uCEFMiscFunctions, uCEFApplication;
|
uCEFMiscFunctions, uCEFApplicationCore;
|
||||||
|
|
||||||
constructor TBufferPanel.Create(AOwner: TComponent);
|
constructor TBufferPanel.Create(AOwner: TComponent);
|
||||||
begin
|
begin
|
||||||
|
@ -899,7 +899,7 @@ uses
|
|||||||
SysUtils, Math,
|
SysUtils, Math,
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
uCEFBrowser, uCEFValue, uCEFDictionaryValue, uCEFStringMultimap, uCEFFrame,
|
uCEFBrowser, uCEFValue, uCEFDictionaryValue, uCEFStringMultimap, uCEFFrame,
|
||||||
uCEFApplication, uCEFProcessMessage, uCEFRequestContext, {$IFNDEF FPC}uCEFOLEDragAndDrop,{$ENDIF}
|
uCEFApplicationCore, uCEFProcessMessage, uCEFRequestContext, {$IFNDEF FPC}uCEFOLEDragAndDrop,{$ENDIF}
|
||||||
uCEFPDFPrintCallback, uCEFResolveCallback, uCEFDeleteCookiesCallback, uCEFStringVisitor,
|
uCEFPDFPrintCallback, uCEFResolveCallback, uCEFDeleteCookiesCallback, uCEFStringVisitor,
|
||||||
uCEFListValue, uCEFNavigationEntryVisitor, uCEFDownloadImageCallBack, uCEFCookieManager,
|
uCEFListValue, uCEFNavigationEntryVisitor, uCEFDownloadImageCallBack, uCEFCookieManager,
|
||||||
uCEFRequestContextHandler, uCEFCookieVisitor, uCEFSetCookieCallback, uCEFResourceRequestHandler;
|
uCEFRequestContextHandler, uCEFCookieVisitor, uCEFSetCookieCallback, uCEFResourceRequestHandler;
|
||||||
|
@ -150,7 +150,7 @@ uses
|
|||||||
uCEFFocusHandler, uCEFContextMenuHandler, uCEFDialogHandler, uCEFKeyboardHandler,
|
uCEFFocusHandler, uCEFContextMenuHandler, uCEFDialogHandler, uCEFKeyboardHandler,
|
||||||
uCEFDisplayHandler, uCEFDownloadHandler, uCEFJsDialogHandler,
|
uCEFDisplayHandler, uCEFDownloadHandler, uCEFJsDialogHandler,
|
||||||
uCEFLifeSpanHandler, uCEFRequestHandler, uCEFRenderHandler, uCEFDragHandler,
|
uCEFLifeSpanHandler, uCEFRequestHandler, uCEFRenderHandler, uCEFDragHandler,
|
||||||
uCEFFindHandler, uCEFConstants, uCEFApplication, uCEFFrame;
|
uCEFFindHandler, uCEFConstants, uCEFApplicationCore, uCEFFrame;
|
||||||
|
|
||||||
|
|
||||||
// ******************************************************
|
// ******************************************************
|
||||||
|
@ -48,10 +48,10 @@ interface
|
|||||||
uses
|
uses
|
||||||
{$IFDEF DELPHI16_UP}
|
{$IFDEF DELPHI16_UP}
|
||||||
{$IFDEF MSWINDOWS}WinApi.Windows, WinApi.ActiveX, WinApi.ShlObj, WinApi.ShellApi,{$ENDIF}
|
{$IFDEF MSWINDOWS}WinApi.Windows, WinApi.ActiveX, WinApi.ShlObj, WinApi.ShellApi,{$ENDIF}
|
||||||
System.Classes, Vcl.Controls, System.SysUtils, System.Math, System.StrUtils, System.AnsiStrings,
|
System.Classes, System.SysUtils, System.Math, System.StrUtils, System.AnsiStrings,
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
{$IFDEF MSWINDOWS}Windows, ActiveX, ShlObj, Shellapi,{$ENDIF}
|
{$IFDEF MSWINDOWS}Windows, ActiveX, ShlObj, Shellapi,{$ENDIF}
|
||||||
Classes, Controls, SysUtils, Math, StrUtils, {$IFDEF DELPHI12_UP}AnsiStrings,{$ENDIF}
|
Classes, SysUtils, Math, StrUtils, {$IFDEF DELPHI12_UP}AnsiStrings,{$ENDIF}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
uCEFDragData, uCEFInterfaces, uCEFTypes, uCEFOLEDragAndDrop;
|
uCEFDragData, uCEFInterfaces, uCEFTypes, uCEFOLEDragAndDrop;
|
||||||
|
|
||||||
|
@ -153,7 +153,7 @@ implementation
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
System.SysUtils, System.Math,
|
System.SysUtils, System.Math,
|
||||||
FMX.Platform, uCEFMiscFunctions, uCEFApplication;
|
FMX.Platform, uCEFMiscFunctions, uCEFApplicationCore;
|
||||||
|
|
||||||
constructor TFMXBufferPanel.Create(AOwner: TComponent);
|
constructor TFMXBufferPanel.Create(AOwner: TComponent);
|
||||||
begin
|
begin
|
||||||
|
@ -848,7 +848,7 @@ implementation
|
|||||||
uses
|
uses
|
||||||
System.SysUtils, System.Math,
|
System.SysUtils, System.Math,
|
||||||
uCEFBrowser, uCEFValue, uCEFDictionaryValue, uCEFStringMultimap, uCEFFrame,
|
uCEFBrowser, uCEFValue, uCEFDictionaryValue, uCEFStringMultimap, uCEFFrame,
|
||||||
uCEFApplication, uCEFProcessMessage, uCEFRequestContext, uCEFCookieManager,
|
uCEFApplicationCore, uCEFProcessMessage, uCEFRequestContext, uCEFCookieManager,
|
||||||
uCEFPDFPrintCallback, uCEFResolveCallback, uCEFDeleteCookiesCallback, uCEFStringVisitor,
|
uCEFPDFPrintCallback, uCEFResolveCallback, uCEFDeleteCookiesCallback, uCEFStringVisitor,
|
||||||
uCEFListValue, uCEFNavigationEntryVisitor, uCEFDownloadImageCallBack,
|
uCEFListValue, uCEFNavigationEntryVisitor, uCEFDownloadImageCallBack,
|
||||||
uCEFRequestContextHandler, uCEFCookieVisitor, uCEFSetCookieCallback,
|
uCEFRequestContextHandler, uCEFCookieVisitor, uCEFSetCookieCallback,
|
||||||
|
@ -110,7 +110,7 @@ implementation
|
|||||||
uses
|
uses
|
||||||
{$IFDEF MSWINDOWS}WinApi.Windows,{$ENDIF} System.SysUtils, System.Math,
|
{$IFDEF MSWINDOWS}WinApi.Windows,{$ENDIF} System.SysUtils, System.Math,
|
||||||
FMX.Platform, FMX.Platform.Win, FMX.Forms,
|
FMX.Platform, FMX.Platform.Win, FMX.Forms,
|
||||||
uCEFMiscFunctions, uCEFApplication;
|
uCEFMiscFunctions, uCEFApplicationCore;
|
||||||
|
|
||||||
procedure DestroyGlobalFMXWorkScheduler;
|
procedure DestroyGlobalFMXWorkScheduler;
|
||||||
begin
|
begin
|
||||||
|
@ -49,7 +49,7 @@ unit uCEFLoadHandler;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
uCEFBaseRefCounted, uCEFInterfaces, uCEFTypes, uCEFApplication;
|
uCEFBaseRefCounted, uCEFInterfaces, uCEFTypes, uCEFApplicationCore;
|
||||||
|
|
||||||
type
|
type
|
||||||
TCefLoadHandlerOwn = class(TCefBaseRefCountedOwn, ICefLoadHandler)
|
TCefLoadHandlerOwn = class(TCefBaseRefCountedOwn, ICefLoadHandler)
|
||||||
@ -83,7 +83,7 @@ type
|
|||||||
|
|
||||||
TCustomRenderLoadHandler = class(TCefLoadHandlerOwn)
|
TCustomRenderLoadHandler = class(TCefLoadHandlerOwn)
|
||||||
protected
|
protected
|
||||||
FCefApp : TCefApplication;
|
FCefApp : TCefApplicationCore;
|
||||||
|
|
||||||
procedure OnLoadingStateChange(const browser: ICefBrowser; isLoading, canGoBack, canGoForward: Boolean); override;
|
procedure OnLoadingStateChange(const browser: ICefBrowser; isLoading, canGoBack, canGoForward: Boolean); override;
|
||||||
procedure OnLoadStart(const browser: ICefBrowser; const frame: ICefFrame; transitionType: TCefTransitionType); override;
|
procedure OnLoadStart(const browser: ICefBrowser; const frame: ICefFrame; transitionType: TCefTransitionType); override;
|
||||||
@ -91,7 +91,7 @@ type
|
|||||||
procedure OnLoadError(const browser: ICefBrowser; const frame: ICefFrame; errorCode: TCefErrorCode; const errorText, failedUrl: ustring); override;
|
procedure OnLoadError(const browser: ICefBrowser; const frame: ICefFrame; errorCode: TCefErrorCode; const errorText, failedUrl: ustring); override;
|
||||||
|
|
||||||
public
|
public
|
||||||
constructor Create(const aCefApp : TCefApplication); reintroduce; virtual;
|
constructor Create(const aCefApp : TCefApplicationCore); reintroduce; virtual;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -264,7 +264,7 @@ end;
|
|||||||
|
|
||||||
// TCustomRenderLoadHandler
|
// TCustomRenderLoadHandler
|
||||||
|
|
||||||
constructor TCustomRenderLoadHandler.Create(const aCefApp : TCefApplication);
|
constructor TCustomRenderLoadHandler.Create(const aCefApp : TCefApplicationCore);
|
||||||
begin
|
begin
|
||||||
inherited Create;
|
inherited Create;
|
||||||
|
|
||||||
|
@ -52,8 +52,8 @@ uses
|
|||||||
{$IFDEF DELPHI16_UP}
|
{$IFDEF DELPHI16_UP}
|
||||||
{$IFDEF MSWINDOWS}WinApi.Windows, WinApi.ActiveX,{$ENDIF} System.IOUtils, System.Classes, System.SysUtils, System.UITypes, System.Math,
|
{$IFDEF MSWINDOWS}WinApi.Windows, WinApi.ActiveX,{$ENDIF} System.IOUtils, System.Classes, System.SysUtils, System.UITypes, System.Math,
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
{$IFDEF MSWINDOWS}Windows, ActiveX,{$ENDIF} {$IFDEF DELPHI14_UP}IOUtils,{$ENDIF} Classes, SysUtils, Controls, Graphics, Math,
|
{$IFDEF MSWINDOWS}Windows, ActiveX,{$ENDIF} {$IFDEF DELPHI14_UP}IOUtils,{$ENDIF} Classes, SysUtils, Math,
|
||||||
{$IFDEF FPC}LCLType,{$IFNDEF MSWINDOWS}InterfaceBase, Forms,{$ENDIF}{$ENDIF}
|
{$IFDEF FPC}LCLType,{$IFNDEF MSWINDOWS}InterfaceBase,{$ENDIF}{$ENDIF}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
uCEFTypes, uCEFInterfaces, uCEFLibFunctions, uCEFResourceHandler,
|
uCEFTypes, uCEFInterfaces, uCEFLibFunctions, uCEFResourceHandler,
|
||||||
uCEFRegisterCDMCallback, uCEFConstants;
|
uCEFRegisterCDMCallback, uCEFConstants;
|
||||||
@ -223,7 +223,6 @@ function CefIsKeyToggled(aWparam : WPARAM) : boolean;
|
|||||||
function GetCefMouseModifiers : TCefEventFlags; overload;
|
function GetCefMouseModifiers : TCefEventFlags; overload;
|
||||||
function GetCefMouseModifiers(awparam : WPARAM) : TCefEventFlags; overload;
|
function GetCefMouseModifiers(awparam : WPARAM) : TCefEventFlags; overload;
|
||||||
function GetCefKeyboardModifiers(aWparam : WPARAM; aLparam : LPARAM) : TCefEventFlags;
|
function GetCefKeyboardModifiers(aWparam : WPARAM; aLparam : LPARAM) : TCefEventFlags;
|
||||||
function GefCursorToWindowsCursor(aCefCursor : TCefCursorType) : TCursor;
|
|
||||||
|
|
||||||
procedure DropEffectToDragOperation(aEffect : Longint; var aAllowedOps : TCefDragOperations);
|
procedure DropEffectToDragOperation(aEffect : Longint; var aAllowedOps : TCefDragOperations);
|
||||||
procedure DragOperationToDropEffect(const aDragOperations : TCefDragOperations; var aEffect: Longint);
|
procedure DragOperationToDropEffect(const aDragOperations : TCefDragOperations; var aEffect: Longint);
|
||||||
@ -248,7 +247,7 @@ function CefGetDataURI(aData : pointer; aSize : integer; const aMimeType : ustri
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
uCEFApplication, uCEFSchemeHandlerFactory, uCEFValue,
|
uCEFApplicationCore, uCEFSchemeHandlerFactory, uCEFValue,
|
||||||
uCEFBinaryValue, uCEFStringList;
|
uCEFBinaryValue, uCEFStringList;
|
||||||
|
|
||||||
function CefColorGetA(color: TCefColor): Byte;
|
function CefColorGetA(color: TCefColor): Byte;
|
||||||
@ -1929,41 +1928,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function GefCursorToWindowsCursor(aCefCursor : TCefCursorType) : TCursor;
|
|
||||||
begin
|
|
||||||
case aCefCursor of
|
|
||||||
CT_POINTER : Result := crArrow;
|
|
||||||
CT_CROSS : Result := crCross;
|
|
||||||
CT_HAND : Result := crHandPoint;
|
|
||||||
CT_IBEAM : Result := crIBeam;
|
|
||||||
CT_WAIT : Result := crHourGlass;
|
|
||||||
CT_HELP : Result := crHelp;
|
|
||||||
CT_EASTRESIZE : Result := crSizeWE;
|
|
||||||
CT_NORTHRESIZE : Result := crSizeNS;
|
|
||||||
CT_NORTHEASTRESIZE : Result := crSizeNESW;
|
|
||||||
CT_NORTHWESTRESIZE : Result := crSizeNWSE;
|
|
||||||
CT_SOUTHRESIZE : Result := crSizeNS;
|
|
||||||
CT_SOUTHEASTRESIZE : Result := crSizeNWSE;
|
|
||||||
CT_SOUTHWESTRESIZE : Result := crSizeNESW;
|
|
||||||
CT_WESTRESIZE : Result := crSizeWE;
|
|
||||||
CT_NORTHSOUTHRESIZE : Result := crSizeNS;
|
|
||||||
CT_EASTWESTRESIZE : Result := crSizeWE;
|
|
||||||
CT_NORTHEASTSOUTHWESTRESIZE : Result := crSizeNESW;
|
|
||||||
CT_NORTHWESTSOUTHEASTRESIZE : Result := crSizeNWSE;
|
|
||||||
CT_COLUMNRESIZE : Result := crHSplit;
|
|
||||||
CT_ROWRESIZE : Result := crVSplit;
|
|
||||||
CT_MOVE : Result := crSizeAll;
|
|
||||||
CT_PROGRESS : Result := crAppStart;
|
|
||||||
CT_NONE : Result := crNone;
|
|
||||||
CT_NODROP,
|
|
||||||
CT_NOTALLOWED : Result := crNo;
|
|
||||||
CT_GRAB,
|
|
||||||
CT_GRABBING : Result := crDrag;
|
|
||||||
|
|
||||||
else Result := crDefault;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure DropEffectToDragOperation(aEffect: Longint; var aAllowedOps : TCefDragOperations);
|
procedure DropEffectToDragOperation(aEffect: Longint; var aAllowedOps : TCefDragOperations);
|
||||||
begin
|
begin
|
||||||
aAllowedOps := DRAG_OPERATION_NONE;
|
aAllowedOps := DRAG_OPERATION_NONE;
|
||||||
|
@ -49,7 +49,7 @@ unit uCEFRegisterCDMCallback;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
uCEFBaseRefCounted, uCEFInterfaces, uCEFTypes, uCEFApplication;
|
uCEFBaseRefCounted, uCEFInterfaces, uCEFTypes, uCEFApplicationCore;
|
||||||
|
|
||||||
type
|
type
|
||||||
TCefRegisterCDMCallbackOwn = class(TCefBaseRefCountedOwn, ICefRegisterCDMCallback)
|
TCefRegisterCDMCallbackOwn = class(TCefBaseRefCountedOwn, ICefRegisterCDMCallback)
|
||||||
@ -72,12 +72,12 @@ type
|
|||||||
|
|
||||||
TCefCustomRegisterCDMCallback = class(TCefRegisterCDMCallbackOwn)
|
TCefCustomRegisterCDMCallback = class(TCefRegisterCDMCallbackOwn)
|
||||||
protected
|
protected
|
||||||
FCefApp : TCefApplication;
|
FCefApp : TCefApplicationCore;
|
||||||
|
|
||||||
procedure OnCDMRegistrationComplete(result: TCefCDMRegistrationError; const error_message: ustring); override;
|
procedure OnCDMRegistrationComplete(result: TCefCDMRegistrationError; const error_message: ustring); override;
|
||||||
|
|
||||||
public
|
public
|
||||||
constructor Create(const aCefApp : TCefApplication); reintroduce;
|
constructor Create(const aCefApp : TCefApplicationCore); reintroduce;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -147,7 +147,7 @@ end;
|
|||||||
// ************************************************
|
// ************************************************
|
||||||
|
|
||||||
|
|
||||||
constructor TCefCustomRegisterCDMCallback.Create(const aCefApp : TCefApplication);
|
constructor TCefCustomRegisterCDMCallback.Create(const aCefApp : TCefApplicationCore);
|
||||||
begin
|
begin
|
||||||
inherited Create;
|
inherited Create;
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ uses
|
|||||||
Classes,
|
Classes,
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
uCEFBaseRefCounted, uCEFInterfaces, uCEFTypes, uCEFListValue, uCEFBrowser, uCEFFrame, uCEFRequest,
|
uCEFBaseRefCounted, uCEFInterfaces, uCEFTypes, uCEFListValue, uCEFBrowser, uCEFFrame, uCEFRequest,
|
||||||
uCEFv8Context, uCEFv8Exception, uCEFv8StackTrace, uCEFDomNode, uCEFProcessMessage, uCEFApplication;
|
uCEFv8Context, uCEFv8Exception, uCEFv8StackTrace, uCEFDomNode, uCEFProcessMessage, uCEFApplicationCore;
|
||||||
|
|
||||||
type
|
type
|
||||||
TCefRenderProcessHandlerOwn = class(TCefBaseRefCountedOwn, ICefRenderProcessHandler)
|
TCefRenderProcessHandlerOwn = class(TCefBaseRefCountedOwn, ICefRenderProcessHandler)
|
||||||
@ -77,7 +77,7 @@ type
|
|||||||
|
|
||||||
TCefCustomRenderProcessHandler = class(TCefRenderProcessHandlerOwn)
|
TCefCustomRenderProcessHandler = class(TCefRenderProcessHandlerOwn)
|
||||||
protected
|
protected
|
||||||
FCefApp : TCefApplication;
|
FCefApp : TCefApplicationCore;
|
||||||
FLoadHandler : ICefLoadHandler;
|
FLoadHandler : ICefLoadHandler;
|
||||||
|
|
||||||
procedure OnRenderThreadCreated(const extraInfo: ICefListValue); override;
|
procedure OnRenderThreadCreated(const extraInfo: ICefListValue); override;
|
||||||
@ -92,7 +92,7 @@ type
|
|||||||
function OnProcessMessageReceived(const browser: ICefBrowser; const frame: ICefFrame; sourceProcess: TCefProcessId; const aMessage : ICefProcessMessage): Boolean; override;
|
function OnProcessMessageReceived(const browser: ICefBrowser; const frame: ICefFrame; sourceProcess: TCefProcessId; const aMessage : ICefProcessMessage): Boolean; override;
|
||||||
|
|
||||||
public
|
public
|
||||||
constructor Create(const aCefApp : TCefApplication); reintroduce;
|
constructor Create(const aCefApp : TCefApplicationCore); reintroduce;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -284,7 +284,7 @@ end;
|
|||||||
// TCefCustomRenderProcessHandler
|
// TCefCustomRenderProcessHandler
|
||||||
|
|
||||||
|
|
||||||
constructor TCefCustomRenderProcessHandler.Create(const aCefApp : TCefApplication);
|
constructor TCefCustomRenderProcessHandler.Create(const aCefApp : TCefApplicationCore);
|
||||||
begin
|
begin
|
||||||
inherited Create;
|
inherited Create;
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ uses
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
uCEFMiscFunctions, uCEFLibFunctions, uCEFBrowser, uCEFFrame, uCEFRequest, uCEFRequestCallback,
|
uCEFMiscFunctions, uCEFLibFunctions, uCEFBrowser, uCEFFrame, uCEFRequest, uCEFRequestCallback,
|
||||||
uCEFResponse, uCEFAuthCallback, uCEFSslInfo, uCEFSelectClientCertificateCallback, uCEFX509Certificate,
|
uCEFResponse, uCEFAuthCallback, uCEFSslInfo, uCEFSelectClientCertificateCallback, uCEFX509Certificate,
|
||||||
uCEFApplication;
|
uCEFApplicationCore;
|
||||||
|
|
||||||
function cef_request_handler_on_before_browse(self : PCefRequestHandler;
|
function cef_request_handler_on_before_browse(self : PCefRequestHandler;
|
||||||
browser : PCefBrowser;
|
browser : PCefBrowser;
|
||||||
|
@ -49,7 +49,7 @@ unit uCEFResourceBundleHandler;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
uCEFBaseRefCounted, uCEFInterfaces, uCEFTypes, uCEFApplication;
|
uCEFBaseRefCounted, uCEFInterfaces, uCEFTypes, uCEFApplicationCore;
|
||||||
|
|
||||||
type
|
type
|
||||||
TCefResourceBundleHandlerOwn = class(TCefBaseRefCountedOwn, ICefResourceBundleHandler)
|
TCefResourceBundleHandlerOwn = class(TCefBaseRefCountedOwn, ICefResourceBundleHandler)
|
||||||
@ -64,14 +64,14 @@ type
|
|||||||
|
|
||||||
TCefCustomResourceBundleHandler = class(TCefResourceBundleHandlerOwn)
|
TCefCustomResourceBundleHandler = class(TCefResourceBundleHandlerOwn)
|
||||||
protected
|
protected
|
||||||
FCefApp : TCefApplication;
|
FCefApp : TCefApplicationCore;
|
||||||
|
|
||||||
function GetLocalizedString(stringid: Integer; var stringVal: ustring): Boolean; override;
|
function GetLocalizedString(stringid: Integer; var stringVal: ustring): Boolean; override;
|
||||||
function GetDataResource(resourceId: Integer; var data: Pointer; var dataSize: NativeUInt): Boolean; override;
|
function GetDataResource(resourceId: Integer; var data: Pointer; var dataSize: NativeUInt): Boolean; override;
|
||||||
function GetDataResourceForScale(resourceId: Integer; scaleFactor: TCefScaleFactor; var data: Pointer; var dataSize: NativeUInt): Boolean; override;
|
function GetDataResourceForScale(resourceId: Integer; scaleFactor: TCefScaleFactor; var data: Pointer; var dataSize: NativeUInt): Boolean; override;
|
||||||
|
|
||||||
public
|
public
|
||||||
constructor Create(const aCefApp : TCefApplication); reintroduce;
|
constructor Create(const aCefApp : TCefApplicationCore); reintroduce;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -149,7 +149,7 @@ end;
|
|||||||
// TCefCustomResourceBundleHandler
|
// TCefCustomResourceBundleHandler
|
||||||
|
|
||||||
|
|
||||||
constructor TCefCustomResourceBundleHandler.Create(const aCefApp : TCefApplication);
|
constructor TCefCustomResourceBundleHandler.Create(const aCefApp : TCefApplicationCore);
|
||||||
begin
|
begin
|
||||||
inherited Create;
|
inherited Create;
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@ procedure Register;
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
uCEFLibFunctions, uCEFApplication, uCEFMiscFunctions, uCEFConstants;
|
uCEFLibFunctions, uCEFApplicationCore, uCEFMiscFunctions, uCEFConstants;
|
||||||
|
|
||||||
constructor TCEFSentinel.Create(AOwner: TComponent);
|
constructor TCEFSentinel.Create(AOwner: TComponent);
|
||||||
begin
|
begin
|
||||||
|
@ -51,9 +51,9 @@ interface
|
|||||||
uses
|
uses
|
||||||
{$IFDEF DELPHI16_UP}
|
{$IFDEF DELPHI16_UP}
|
||||||
{$IFDEF MSWINDOWS}WinApi.Windows, WinApi.Messages, WinApi.ActiveX,{$ENDIF}
|
{$IFDEF MSWINDOWS}WinApi.Windows, WinApi.Messages, WinApi.ActiveX,{$ENDIF}
|
||||||
System.Classes, Vcl.Controls, Vcl.Graphics, Vcl.Forms, System.Math,
|
System.Classes, System.Math,
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
{$IFDEF MSWINDOWS}Windows, ActiveX,{$ENDIF} Classes, Forms, Controls, Graphics, Math,
|
{$IFDEF MSWINDOWS}Windows, ActiveX,{$ENDIF} Classes, Math,
|
||||||
{$IFDEF FPC}
|
{$IFDEF FPC}
|
||||||
LCLProc, LCLType, LCLIntf, LResources, LMessages, InterfaceBase,
|
LCLProc, LCLType, LCLIntf, LResources, LMessages, InterfaceBase,
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
@ -167,7 +167,7 @@ procedure Register;
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
uCEFLibFunctions, uCEFApplication, uCEFMiscFunctions;
|
uCEFLibFunctions, uCEFApplicationCore, uCEFMiscFunctions;
|
||||||
|
|
||||||
// For more information about the TCEFServerComponent properties and functions
|
// For more information about the TCEFServerComponent properties and functions
|
||||||
// read the code comments in the CEF source file /include/capi/cef_server_cap.h
|
// read the code comments in the CEF source file /include/capi/cef_server_cap.h
|
||||||
|
@ -51,9 +51,9 @@ interface
|
|||||||
uses
|
uses
|
||||||
{$IFDEF DELPHI16_UP}
|
{$IFDEF DELPHI16_UP}
|
||||||
{$IFDEF MSWINDOWS}WinApi.Windows, WinApi.Messages, WinApi.ActiveX,{$ENDIF}
|
{$IFDEF MSWINDOWS}WinApi.Windows, WinApi.Messages, WinApi.ActiveX,{$ENDIF}
|
||||||
System.Classes, Vcl.Controls, Vcl.Graphics, Vcl.Forms, System.Math,
|
System.Classes, System.Math,
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
{$IFDEF MSWINDOWS}Windows, ActiveX,{$ENDIF} Classes, Forms, Controls, Graphics, Math,
|
{$IFDEF MSWINDOWS}Windows, ActiveX,{$ENDIF} Classes, Math,
|
||||||
{$IFDEF FPC}
|
{$IFDEF FPC}
|
||||||
LCLProc, LCLType, LCLIntf, LResources, LMessages, InterfaceBase,
|
LCLProc, LCLType, LCLIntf, LResources, LMessages, InterfaceBase,
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
|
@ -50,9 +50,9 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
{$IFDEF DELPHI16_UP}
|
{$IFDEF DELPHI16_UP}
|
||||||
{$IFDEF MSWINDOWS}WinApi.Windows, WinApi.Messages,{$ENDIF} System.Classes, Vcl.Controls, Vcl.Graphics, Vcl.Forms,
|
{$IFDEF MSWINDOWS}WinApi.Windows, WinApi.Messages,{$ENDIF} System.Classes,
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
{$IFDEF MSWINDOWS}Windows,{$ENDIF} Classes, Forms, Controls, Graphics,
|
{$IFDEF MSWINDOWS}Windows,{$ENDIF} Classes,
|
||||||
{$IFDEF FPC}
|
{$IFDEF FPC}
|
||||||
LCLProc, LCLType, LCLIntf, LResources, LMessages, InterfaceBase,
|
LCLProc, LCLType, LCLIntf, LResources, LMessages, InterfaceBase,
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
@ -133,7 +133,7 @@ uses
|
|||||||
{$ELSE}
|
{$ELSE}
|
||||||
SysUtils, Math,
|
SysUtils, Math,
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
uCEFMiscFunctions, uCEFApplication, uCEFTypes;
|
uCEFMiscFunctions, uCEFApplicationCore, uCEFTypes;
|
||||||
|
|
||||||
procedure DestroyGlobalCEFWorkScheduler;
|
procedure DestroyGlobalCEFWorkScheduler;
|
||||||
begin
|
begin
|
||||||
|
@ -89,11 +89,10 @@ implementation
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
{$IFDEF DELPHI16_UP}
|
{$IFDEF DELPHI16_UP}
|
||||||
System.SysUtils, System.Math,
|
System.SysUtils, System.Math;
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
SysUtils, Math,
|
SysUtils, Math;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
uCEFApplication;
|
|
||||||
|
|
||||||
constructor TCEFWorkSchedulerThread.Create;
|
constructor TCEFWorkSchedulerThread.Create;
|
||||||
begin
|
begin
|
||||||
|
@ -81,7 +81,7 @@ uses
|
|||||||
{$ELSE}
|
{$ELSE}
|
||||||
{$IFDEF MSWINDOWS}Windows,{$ENDIF} SysUtils,
|
{$IFDEF MSWINDOWS}Windows,{$ENDIF} SysUtils,
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
uCEFMiscFunctions, uCEFLibFunctions, uCEFApplication, uCEFStringList;
|
uCEFMiscFunctions, uCEFStringList;
|
||||||
|
|
||||||
function TCefX509CertPrincipalRef.GetDisplayName: ustring;
|
function TCefX509CertPrincipalRef.GetDisplayName: ustring;
|
||||||
begin
|
begin
|
||||||
|
Loading…
x
Reference in New Issue
Block a user