mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2024-11-15 07:45:56 +01:00
Update to CEF 117.1.4
This commit is contained in:
parent
1e5d96f16e
commit
8979dc8078
14
README.md
14
README.md
@ -3,15 +3,15 @@ CEF4Delphi is an open source project created by Salvador Díaz Fau to embed Chro
|
|||||||
|
|
||||||
CEF4Delphi is based on DCEF3 and fpCEF3. The original license of those projects still applies to CEF4Delphi. Read the license terms in the LICENSE.md file.
|
CEF4Delphi is based on DCEF3 and fpCEF3. The original license of those projects still applies to CEF4Delphi. Read the license terms in the LICENSE.md file.
|
||||||
|
|
||||||
CEF4Delphi uses CEF 116.0.27 which includes Chromium 116.0.5845.190.
|
CEF4Delphi uses CEF 117.1.4 which includes Chromium 117.0.5938.92.
|
||||||
|
|
||||||
The CEF binaries used by CEF4Delphi are available for download at Spotify :
|
The CEF binaries used by CEF4Delphi are available for download at Spotify :
|
||||||
* [Windows 32 bits](https://cef-builds.spotifycdn.com/cef_binary_116.0.27%2Bgd8c85ac%2Bchromium-116.0.5845.190_windows32.tar.bz2)
|
* [Windows 32 bits](https://cef-builds.spotifycdn.com/cef_binary_117.1.4%2Bga26f38b%2Bchromium-117.0.5938.92_windows32.tar.bz2)
|
||||||
* [Windows 64 bits](https://cef-builds.spotifycdn.com/cef_binary_116.0.27%2Bgd8c85ac%2Bchromium-116.0.5845.190_windows64.tar.bz2)
|
* [Windows 64 bits](https://cef-builds.spotifycdn.com/cef_binary_117.1.4%2Bga26f38b%2Bchromium-117.0.5938.92_windows64.tar.bz2)
|
||||||
* [Linux x86 64 bits](https://cef-builds.spotifycdn.com/cef_binary_116.0.27%2Bgd8c85ac%2Bchromium-116.0.5845.190_linux64.tar.bz2)
|
* [Linux x86 64 bits](https://cef-builds.spotifycdn.com/cef_binary_117.1.4%2Bga26f38b%2Bchromium-117.0.5938.92_linux64.tar.bz2)
|
||||||
* [Linux ARM 32 bits](https://cef-builds.spotifycdn.com/cef_binary_116.0.27%2Bgd8c85ac%2Bchromium-116.0.5845.190_linuxarm.tar.bz2)
|
* [Linux ARM 32 bits](https://cef-builds.spotifycdn.com/cef_binary_117.1.4%2Bga26f38b%2Bchromium-117.0.5938.92_linuxarm.tar.bz2)
|
||||||
* [Linux ARM 64 bits](https://cef-builds.spotifycdn.com/cef_binary_116.0.27%2Bgd8c85ac%2Bchromium-116.0.5845.190_linuxarm64.tar.bz2)
|
* [Linux ARM 64 bits](https://cef-builds.spotifycdn.com/cef_binary_117.1.4%2Bga26f38b%2Bchromium-117.0.5938.92_linuxarm64.tar.bz2)
|
||||||
* [MacOS x86 64 bits](https://cef-builds.spotifycdn.com/cef_binary_116.0.27%2Bgd8c85ac%2Bchromium-116.0.5845.190_macosx64.tar.bz2)
|
* [MacOS x86 64 bits](https://cef-builds.spotifycdn.com/cef_binary_117.1.4%2Bga26f38b%2Bchromium-117.0.5938.92_macosx64.tar.bz2)
|
||||||
|
|
||||||
CEF4Delphi was developed and tested on Delphi 11.3 and it has been tested in Delphi 7, Delphi XE, Delphi 10, Delphi 10.2, Delphi 10.3, Delphi 10.4 and Lazarus 2.2.6/FPC 3.2.2. CEF4Delphi includes VCL, FireMonkey (FMX) and Lazarus components.
|
CEF4Delphi was developed and tested on Delphi 11.3 and it has been tested in Delphi 7, Delphi XE, Delphi 10, Delphi 10.2, Delphi 10.3, Delphi 10.4 and Lazarus 2.2.6/FPC 3.2.2. CEF4Delphi includes VCL, FireMonkey (FMX) and Lazarus components.
|
||||||
|
|
||||||
|
Binary file not shown.
@ -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="116" Release="27"/>
|
<Version Major="117" Minor="1" Release="4"/>
|
||||||
<Files Count="214">
|
<Files Count="214">
|
||||||
<Item1>
|
<Item1>
|
||||||
<Filename Value="..\source\uCEFAccessibilityHandler.pas"/>
|
<Filename Value="..\source\uCEFAccessibilityHandler.pas"/>
|
||||||
|
@ -78,6 +78,7 @@ type
|
|||||||
FLocale : ustring;
|
FLocale : ustring;
|
||||||
FLogFile : ustring;
|
FLogFile : ustring;
|
||||||
FLogSeverity : TCefLogSeverity;
|
FLogSeverity : TCefLogSeverity;
|
||||||
|
FLogItems : TCefLogItems;
|
||||||
FJavaScriptFlags : ustring;
|
FJavaScriptFlags : ustring;
|
||||||
FResourcesDirPath : ustring;
|
FResourcesDirPath : ustring;
|
||||||
FLocalesDirPath : ustring;
|
FLocalesDirPath : ustring;
|
||||||
@ -600,6 +601,13 @@ type
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
property LogSeverity : TCefLogSeverity read FLogSeverity write FLogSeverity;
|
property LogSeverity : TCefLogSeverity read FLogSeverity write FLogSeverity;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
/// The log items prepended to each log line. If not set the default log items
|
||||||
|
/// will be used. Also configurable using the "log-items" command-line switch
|
||||||
|
/// with a value of "none" for no log items, or a comma-delimited list of
|
||||||
|
/// values "pid", "tid", "timestamp" or "tickcount" for custom log items.
|
||||||
|
/// </summary>
|
||||||
|
property LogItems : TCefLogItems read FLogItems write FLogItems;
|
||||||
|
/// <summary>
|
||||||
/// Custom flags that will be used when initializing the V8 JavaScript engine.
|
/// Custom flags that will be used when initializing the V8 JavaScript engine.
|
||||||
/// The consequences of using custom flags may not be well tested. Also
|
/// The consequences of using custom flags may not be well tested. Also
|
||||||
/// configurable using the "js-flags" command-line switch.
|
/// configurable using the "js-flags" command-line switch.
|
||||||
@ -1707,6 +1715,7 @@ begin
|
|||||||
FLocale := '';
|
FLocale := '';
|
||||||
FLogFile := '';
|
FLogFile := '';
|
||||||
FLogSeverity := LOGSEVERITY_DISABLE;
|
FLogSeverity := LOGSEVERITY_DISABLE;
|
||||||
|
FLogItems := LOG_ITEMS_DEFAULT;
|
||||||
FJavaScriptFlags := '';
|
FJavaScriptFlags := '';
|
||||||
FResourcesDirPath := '';
|
FResourcesDirPath := '';
|
||||||
FLocalesDirPath := '';
|
FLocalesDirPath := '';
|
||||||
@ -2654,6 +2663,7 @@ begin
|
|||||||
aSettings.locale := CefString(FLocale);
|
aSettings.locale := CefString(FLocale);
|
||||||
aSettings.log_file := CefString(FLogFile);
|
aSettings.log_file := CefString(FLogFile);
|
||||||
aSettings.log_severity := FLogSeverity;
|
aSettings.log_severity := FLogSeverity;
|
||||||
|
aSettings.log_items := FLogItems;
|
||||||
aSettings.javascript_flags := CefString(FJavaScriptFlags);
|
aSettings.javascript_flags := CefString(FJavaScriptFlags);
|
||||||
aSettings.resources_dir_path := CefString(ResourcesDirPath);
|
aSettings.resources_dir_path := CefString(ResourcesDirPath);
|
||||||
aSettings.locales_dir_path := CefString(LocalesDirPath);
|
aSettings.locales_dir_path := CefString(LocalesDirPath);
|
||||||
|
@ -19,6 +19,9 @@ uses
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
type
|
type
|
||||||
|
/// <summary>
|
||||||
|
/// Class that stores a copy of the raw bitmap buffer sent by CEF in the TChromiumCore.OnPaint event.
|
||||||
|
/// </summary>
|
||||||
TCEFBitmapBitBuffer = class
|
TCEFBitmapBitBuffer = class
|
||||||
protected
|
protected
|
||||||
FBuffer : pointer;
|
FBuffer : pointer;
|
||||||
@ -39,15 +42,41 @@ type
|
|||||||
public
|
public
|
||||||
constructor Create(aWidth, aHeight : integer);
|
constructor Create(aWidth, aHeight : integer);
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
|
/// <summary>
|
||||||
|
/// Updates the image size.
|
||||||
|
/// </summary>
|
||||||
procedure UpdateSize(aWidth, aHeight : integer);
|
procedure UpdateSize(aWidth, aHeight : integer);
|
||||||
|
/// <summary>
|
||||||
|
/// Image width.
|
||||||
|
/// </summary>
|
||||||
property Width : integer read FImageWidth;
|
property Width : integer read FImageWidth;
|
||||||
|
/// <summary>
|
||||||
|
/// Image height.
|
||||||
|
/// </summary>
|
||||||
property Height : integer read FImageHeight;
|
property Height : integer read FImageHeight;
|
||||||
|
/// <summary>
|
||||||
|
/// Buffer length.
|
||||||
|
/// </summary>
|
||||||
property BufferLength : integer read GetBufferLength;
|
property BufferLength : integer read GetBufferLength;
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if the buffer is empty.
|
||||||
|
/// </summary>
|
||||||
property Empty : boolean read GetEmpty;
|
property Empty : boolean read GetEmpty;
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a pointer to the first byte in of the Y scnaline.
|
||||||
|
/// </summary>
|
||||||
property Scanline[y : integer] : PByte read GetScanline;
|
property Scanline[y : integer] : PByte read GetScanline;
|
||||||
property ScanlineSize : integer read GetScanlineSize;
|
/// <summary>
|
||||||
|
/// Returns the scanline size.
|
||||||
|
/// </summary>
|
||||||
|
property ScanlineSize : integer read GetScanlineSize;
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the real buffer scanline size.
|
||||||
|
/// </summary>
|
||||||
property BufferScanlineSize : integer read GetBufferScanlineSize;
|
property BufferScanlineSize : integer read GetBufferScanlineSize;
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a pointer to the buffer that stores the image.
|
||||||
|
/// </summary>
|
||||||
property BufferBits : pointer read FBuffer;
|
property BufferBits : pointer read FBuffer;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -24,18 +24,22 @@ uses
|
|||||||
|
|
||||||
type
|
type
|
||||||
{$IFNDEF FPC}{$IFDEF DELPHI16_UP}[ComponentPlatformsAttribute(pfidWindows or pfidOSX or pfidLinux)]{$ENDIF}{$ENDIF}
|
{$IFNDEF FPC}{$IFDEF DELPHI16_UP}[ComponentPlatformsAttribute(pfidWindows or pfidOSX or pfidLinux)]{$ENDIF}{$ENDIF}
|
||||||
|
/// <summary>
|
||||||
|
/// Component hosting a ICefBrowserView instance. Used in Chrome runtime mode only.
|
||||||
|
/// </summary>
|
||||||
TCEFBrowserViewComponent = class(TCEFViewComponent, ICefBrowserViewDelegateEvents)
|
TCEFBrowserViewComponent = class(TCEFViewComponent, ICefBrowserViewDelegateEvents)
|
||||||
protected
|
protected
|
||||||
FBrowserView : ICefBrowserView;
|
FBrowserView : ICefBrowserView;
|
||||||
FBrowserViewDlg : ICefBrowserViewDelegate;
|
FBrowserViewDlg : ICefBrowserViewDelegate;
|
||||||
|
|
||||||
// ICefBrowserViewDelegateEvents
|
// ICefBrowserViewDelegateEvents
|
||||||
FOnBrowserCreated : TOnBrowserCreatedEvent;
|
FOnBrowserCreated : TOnBrowserCreatedEvent;
|
||||||
FOnBrowserDestroyed : TOnBrowserDestroyedEvent;
|
FOnBrowserDestroyed : TOnBrowserDestroyedEvent;
|
||||||
FOnGetDelegateForPopupBrowserView : TOnGetDelegateForPopupBrowserViewEvent;
|
FOnGetDelegateForPopupBrowserView : TOnGetDelegateForPopupBrowserViewEvent;
|
||||||
FOnPopupBrowserViewCreated : TOnPopupBrowserViewCreatedEvent;
|
FOnPopupBrowserViewCreated : TOnPopupBrowserViewCreatedEvent;
|
||||||
FOnGetChromeToolbarType : TOnGetChromeToolbarTypeEvent;
|
FOnGetChromeToolbarType : TOnGetChromeToolbarTypeEvent;
|
||||||
FOnGestureCommand : TOnGestureCommandEvent;
|
FOnUseFramelessWindowForPictureInPicture : TOnUseFramelessWindowForPictureInPicture;
|
||||||
|
FOnGestureCommand : TOnGestureCommandEvent;
|
||||||
|
|
||||||
procedure DestroyView; override;
|
procedure DestroyView; override;
|
||||||
procedure Initialize; override;
|
procedure Initialize; override;
|
||||||
@ -51,23 +55,95 @@ type
|
|||||||
procedure doOnGetDelegateForPopupBrowserView(const browser_view: ICefBrowserView; const settings: TCefBrowserSettings; const client: ICefClient; is_devtools: boolean; var aResult : ICefBrowserViewDelegate);
|
procedure doOnGetDelegateForPopupBrowserView(const browser_view: ICefBrowserView; const settings: TCefBrowserSettings; const client: ICefClient; is_devtools: boolean; var aResult : ICefBrowserViewDelegate);
|
||||||
procedure doOnPopupBrowserViewCreated(const browser_view, popup_browser_view: ICefBrowserView; is_devtools: boolean; var aResult : boolean);
|
procedure doOnPopupBrowserViewCreated(const browser_view, popup_browser_view: ICefBrowserView; is_devtools: boolean; var aResult : boolean);
|
||||||
procedure doOnGetChromeToolbarType(var aChromeToolbarType: TCefChromeToolbarType);
|
procedure doOnGetChromeToolbarType(var aChromeToolbarType: TCefChromeToolbarType);
|
||||||
|
procedure doOnUseFramelessWindowForPictureInPicture(const browser_view: ICefBrowserView; var aResult: boolean);
|
||||||
procedure doOnGestureCommand(const browser_view: ICefBrowserView; gesture_command: TCefGestureCommand; var aResult : boolean);
|
procedure doOnGestureCommand(const browser_view: ICefBrowserView; gesture_command: TCefGestureCommand; var aResult : boolean);
|
||||||
|
|
||||||
public
|
public
|
||||||
|
/// <summary>
|
||||||
|
/// Create a new ICefBrowserView. The underlying ICefBrowser will not be created
|
||||||
|
/// until this view is added to the views hierarchy. The optional |extra_info|
|
||||||
|
/// parameter provides an opportunity to specify extra information specific to
|
||||||
|
/// the created browser that will be passed to
|
||||||
|
/// ICefRenderProcessHandler.OnBrowserCreated in the render process.
|
||||||
|
/// </summary>
|
||||||
function CreateBrowserView(const client: ICefClient; const url: ustring; const settings: TCefBrowserSettings; const extra_info: ICefDictionaryValue; const request_context: ICefRequestContext): boolean;
|
function CreateBrowserView(const client: ICefClient; const url: ustring; const settings: TCefBrowserSettings; const extra_info: ICefDictionaryValue; const request_context: ICefRequestContext): boolean;
|
||||||
|
/// <summary>
|
||||||
|
/// Updates the internal ICefBrowserView with the ICefBrowserView associated with |browser|.
|
||||||
|
/// </summary>
|
||||||
function GetForBrowser(const browser: ICefBrowser): boolean;
|
function GetForBrowser(const browser: ICefBrowser): boolean;
|
||||||
|
/// <summary>
|
||||||
|
/// Sets whether accelerators registered with ICefWindow.SetAccelerator are
|
||||||
|
/// triggered before or after the event is sent to the ICefBrowser. If
|
||||||
|
/// |prefer_accelerators| is true (1) then the matching accelerator will be
|
||||||
|
/// triggered immediately and the event will not be sent to the ICefBrowser.
|
||||||
|
/// If |prefer_accelerators| is false (0) then the matching accelerator will
|
||||||
|
/// only be triggered if the event is not handled by web content or by
|
||||||
|
/// ICefKeyboardHandler. The default value is false (0).
|
||||||
|
/// </summary>
|
||||||
procedure SetPreferAccelerators(prefer_accelerators: boolean);
|
procedure SetPreferAccelerators(prefer_accelerators: boolean);
|
||||||
|
|
||||||
property Browser : ICefBrowser read GetBrowser;
|
/// <summary>
|
||||||
property BrowserView : ICefBrowserView read FBrowserView;
|
/// Returns the ICefBrowser hosted by this BrowserView. Will return NULL if
|
||||||
|
/// the browser has not yet been created or has already been destroyed.
|
||||||
|
/// </summary>
|
||||||
|
property Browser : ICefBrowser read GetBrowser;
|
||||||
|
/// <summary>
|
||||||
|
/// ICefBrowserView assiciated to this component.
|
||||||
|
/// </summary>
|
||||||
|
property BrowserView : ICefBrowserView read FBrowserView;
|
||||||
|
|
||||||
published
|
published
|
||||||
property OnBrowserCreated : TOnBrowserCreatedEvent read FOnBrowserCreated write FOnBrowserCreated;
|
/// <summary>
|
||||||
property OnBrowserDestroyed : TOnBrowserDestroyedEvent read FOnBrowserDestroyed write FOnBrowserDestroyed;
|
/// Called when |browser| associated with |browser_view| is created. This
|
||||||
property OnGetDelegateForPopupBrowserView : TOnGetDelegateForPopupBrowserViewEvent read FOnGetDelegateForPopupBrowserView write FOnGetDelegateForPopupBrowserView;
|
/// function will be called after ICefLifeSpanHandler.OnAfterCreated()
|
||||||
property OnPopupBrowserViewCreated : TOnPopupBrowserViewCreatedEvent read FOnPopupBrowserViewCreated write FOnPopupBrowserViewCreated;
|
/// is called for |browser| and before OnPopupBrowserViewCreated() is
|
||||||
property OnGetChromeToolbarType : TOnGetChromeToolbarTypeEvent read FOnGetChromeToolbarType write FOnGetChromeToolbarType;
|
/// called for |browser|'s parent delegate if |browser| is a popup.
|
||||||
property OnGestureCommand : TOnGestureCommandEvent read FOnGestureCommand write FOnGestureCommand;
|
/// </summary>
|
||||||
|
property OnBrowserCreated : TOnBrowserCreatedEvent read FOnBrowserCreated write FOnBrowserCreated;
|
||||||
|
/// <summary>
|
||||||
|
/// Called when |browser| associated with |browser_view| is destroyed. Release
|
||||||
|
/// all references to |browser| and do not attempt to execute any functions on
|
||||||
|
/// |browser| after this callback returns. This function will be called before
|
||||||
|
/// ICefLifeSpanHandler.OnBeforeClose() is called for |browser|.
|
||||||
|
/// </summary>
|
||||||
|
property OnBrowserDestroyed : TOnBrowserDestroyedEvent read FOnBrowserDestroyed write FOnBrowserDestroyed;
|
||||||
|
/// <summary>
|
||||||
|
/// Called before a new popup BrowserView is created. The popup originated
|
||||||
|
/// from |browser_view|. |settings| and |client| are the values returned from
|
||||||
|
/// ICefLifeSpanHandler.OnBeforePopup(). |is_devtools| will be true (1)
|
||||||
|
/// if the popup will be a DevTools browser. Return the delegate that will be
|
||||||
|
/// used for the new popup BrowserView.
|
||||||
|
/// </summary>
|
||||||
|
property OnGetDelegateForPopupBrowserView : TOnGetDelegateForPopupBrowserViewEvent read FOnGetDelegateForPopupBrowserView write FOnGetDelegateForPopupBrowserView;
|
||||||
|
/// <summary>
|
||||||
|
/// Called after |popup_browser_view| is created. This function will be called
|
||||||
|
/// after ICefLifeSpanHandler.OnAfterCreated() and OnBrowserCreated()
|
||||||
|
/// are called for the new popup browser. The popup originated from
|
||||||
|
/// |browser_view|. |is_devtools| will be true (1) if the popup is a DevTools
|
||||||
|
/// browser. Optionally add |popup_browser_view| to the views hierarchy
|
||||||
|
/// yourself and return true (1). Otherwise return false (0) and a default
|
||||||
|
/// ICefWindow will be created for the popup.
|
||||||
|
/// </summary>
|
||||||
|
property OnPopupBrowserViewCreated : TOnPopupBrowserViewCreatedEvent read FOnPopupBrowserViewCreated write FOnPopupBrowserViewCreated;
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the Chrome toolbar type that will be available via
|
||||||
|
/// ICefBrowserView.GetChromeToolbar(). See that function for related
|
||||||
|
/// documentation.
|
||||||
|
/// </summary>
|
||||||
|
property OnGetChromeToolbarType : TOnGetChromeToolbarTypeEvent read FOnGetChromeToolbarType write FOnGetChromeToolbarType;
|
||||||
|
/// <summary>
|
||||||
|
/// Return true (1) to create frameless windows for Document picture-in-
|
||||||
|
/// picture popups. Content in frameless windows should specify draggable
|
||||||
|
/// regions using "-webkit-app-region: drag" CSS.
|
||||||
|
/// </summary>
|
||||||
|
property OnUseFramelessWindowForPictureInPicture : TOnUseFramelessWindowForPictureInPicture read FOnUseFramelessWindowForPictureInPicture write FOnUseFramelessWindowForPictureInPicture;
|
||||||
|
/// <summary>
|
||||||
|
/// Called when |browser_view| receives a gesture command. Return true (1) to
|
||||||
|
/// handle (or disable) a |gesture_command| or false (0) to propagate the
|
||||||
|
/// gesture to the browser for default handling. With the Chrome runtime these
|
||||||
|
/// commands can also be handled via cef_command_handler_t::OnChromeCommand.
|
||||||
|
/// </summary>
|
||||||
|
property OnGestureCommand : TOnGestureCommandEvent read FOnGestureCommand write FOnGestureCommand;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$IFDEF FPC}
|
{$IFDEF FPC}
|
||||||
@ -110,14 +186,15 @@ procedure TCEFBrowserViewComponent.Initialize;
|
|||||||
begin
|
begin
|
||||||
inherited Initialize;
|
inherited Initialize;
|
||||||
|
|
||||||
FBrowserView := nil;
|
FBrowserView := nil;
|
||||||
FBrowserViewDlg := nil;
|
FBrowserViewDlg := nil;
|
||||||
FOnBrowserCreated := nil;
|
FOnBrowserCreated := nil;
|
||||||
FOnBrowserDestroyed := nil;
|
FOnBrowserDestroyed := nil;
|
||||||
FOnGetDelegateForPopupBrowserView := nil;
|
FOnGetDelegateForPopupBrowserView := nil;
|
||||||
FOnPopupBrowserViewCreated := nil;
|
FOnPopupBrowserViewCreated := nil;
|
||||||
FOnGetChromeToolbarType := nil;
|
FOnGetChromeToolbarType := nil;
|
||||||
FOnGestureCommand := nil;
|
FOnUseFramelessWindowForPictureInPicture := nil;
|
||||||
|
FOnGestureCommand := nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCEFBrowserViewComponent.DestroyView;
|
procedure TCEFBrowserViewComponent.DestroyView;
|
||||||
@ -227,12 +304,19 @@ begin
|
|||||||
FOnGetChromeToolbarType(self, aChromeToolbarType);
|
FOnGetChromeToolbarType(self, aChromeToolbarType);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCEFBrowserViewComponent.doOnUseFramelessWindowForPictureInPicture(const browser_view : ICefBrowserView;
|
||||||
|
var aResult : boolean);
|
||||||
|
begin
|
||||||
|
if assigned(FOnUseFramelessWindowForPictureInPicture) then
|
||||||
|
FOnUseFramelessWindowForPictureInPicture(self, browser_view, aResult);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCEFBrowserViewComponent.doOnGestureCommand(const browser_view : ICefBrowserView;
|
procedure TCEFBrowserViewComponent.doOnGestureCommand(const browser_view : ICefBrowserView;
|
||||||
gesture_command : TCefGestureCommand;
|
gesture_command : TCefGestureCommand;
|
||||||
var aResult : boolean);
|
var aResult : boolean);
|
||||||
begin
|
begin
|
||||||
if assigned(FOnGestureCommand) then
|
if assigned(FOnGestureCommand) then
|
||||||
FOnGestureCommand(self, browser_view, aResult);
|
FOnGestureCommand(self, browser_view, gesture_command, aResult);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$IFDEF FPC}
|
{$IFDEF FPC}
|
||||||
|
@ -26,7 +26,8 @@ type
|
|||||||
procedure OnBrowserDestroyed(const browser_view: ICefBrowserView; const browser: ICefBrowser);
|
procedure OnBrowserDestroyed(const browser_view: ICefBrowserView; const browser: ICefBrowser);
|
||||||
procedure OnGetDelegateForPopupBrowserView(const browser_view: ICefBrowserView; const settings: TCefBrowserSettings; const client: ICefClient; is_devtools: boolean; var aResult : ICefBrowserViewDelegate);
|
procedure OnGetDelegateForPopupBrowserView(const browser_view: ICefBrowserView; const settings: TCefBrowserSettings; const client: ICefClient; is_devtools: boolean; var aResult : ICefBrowserViewDelegate);
|
||||||
procedure OnPopupBrowserViewCreated(const browser_view, popup_browser_view: ICefBrowserView; is_devtools: boolean; var aResult : boolean);
|
procedure OnPopupBrowserViewCreated(const browser_view, popup_browser_view: ICefBrowserView; is_devtools: boolean; var aResult : boolean);
|
||||||
function GetChromeToolbarType: TCefChromeToolbarType;
|
procedure OnGetChromeToolbarType(var aResult: TCefChromeToolbarType);
|
||||||
|
procedure OnUseFramelessWindowForPictureInPicture(const browser_view: ICefBrowserView; var aResult: boolean);
|
||||||
procedure OnGestureCommand(const browser_view: ICefBrowserView; gesture_command: TCefGestureCommand; var aResult : boolean);
|
procedure OnGestureCommand(const browser_view: ICefBrowserView; gesture_command: TCefGestureCommand; var aResult : boolean);
|
||||||
|
|
||||||
public
|
public
|
||||||
@ -39,7 +40,8 @@ type
|
|||||||
procedure OnBrowserDestroyed(const browser_view: ICefBrowserView; const browser: ICefBrowser); virtual;
|
procedure OnBrowserDestroyed(const browser_view: ICefBrowserView; const browser: ICefBrowser); virtual;
|
||||||
procedure OnGetDelegateForPopupBrowserView(const browser_view: ICefBrowserView; const settings: TCefBrowserSettings; const client: ICefClient; is_devtools: boolean; var aResult : ICefBrowserViewDelegate); virtual;
|
procedure OnGetDelegateForPopupBrowserView(const browser_view: ICefBrowserView; const settings: TCefBrowserSettings; const client: ICefClient; is_devtools: boolean; var aResult : ICefBrowserViewDelegate); virtual;
|
||||||
procedure OnPopupBrowserViewCreated(const browser_view, popup_browser_view: ICefBrowserView; is_devtools: boolean; var aResult : boolean); virtual;
|
procedure OnPopupBrowserViewCreated(const browser_view, popup_browser_view: ICefBrowserView; is_devtools: boolean; var aResult : boolean); virtual;
|
||||||
function GetChromeToolbarType: TCefChromeToolbarType; virtual;
|
procedure OnGetChromeToolbarType(var aResult: TCefChromeToolbarType); virtual;
|
||||||
|
procedure OnUseFramelessWindowForPictureInPicture(const browser_view: ICefBrowserView; var aResult: boolean); virtual;
|
||||||
procedure OnGestureCommand(const browser_view: ICefBrowserView; gesture_command: TCefGestureCommand; var aResult : boolean); virtual;
|
procedure OnGestureCommand(const browser_view: ICefBrowserView; gesture_command: TCefGestureCommand; var aResult : boolean); virtual;
|
||||||
|
|
||||||
procedure InitializeCEFMethods; override;
|
procedure InitializeCEFMethods; override;
|
||||||
@ -69,7 +71,8 @@ type
|
|||||||
procedure OnBrowserDestroyed(const browser_view: ICefBrowserView; const browser: ICefBrowser); override;
|
procedure OnBrowserDestroyed(const browser_view: ICefBrowserView; const browser: ICefBrowser); override;
|
||||||
procedure OnGetDelegateForPopupBrowserView(const browser_view: ICefBrowserView; const settings: TCefBrowserSettings; const client: ICefClient; is_devtools: boolean; var aResult : ICefBrowserViewDelegate); override;
|
procedure OnGetDelegateForPopupBrowserView(const browser_view: ICefBrowserView; const settings: TCefBrowserSettings; const client: ICefClient; is_devtools: boolean; var aResult : ICefBrowserViewDelegate); override;
|
||||||
procedure OnPopupBrowserViewCreated(const browser_view, popup_browser_view: ICefBrowserView; is_devtools: boolean; var aResult : boolean); override;
|
procedure OnPopupBrowserViewCreated(const browser_view, popup_browser_view: ICefBrowserView; is_devtools: boolean; var aResult : boolean); override;
|
||||||
function GetChromeToolbarType: TCefChromeToolbarType; override;
|
procedure OnGetChromeToolbarType(var aResult: TCefChromeToolbarType); override;
|
||||||
|
procedure OnUseFramelessWindowForPictureInPicture(const browser_view: ICefBrowserView; var aResult: boolean); override;
|
||||||
procedure OnGestureCommand(const browser_view: ICefBrowserView; gesture_command: TCefGestureCommand; var aResult : boolean); override;
|
procedure OnGestureCommand(const browser_view: ICefBrowserView; gesture_command: TCefGestureCommand; var aResult : boolean); override;
|
||||||
|
|
||||||
public
|
public
|
||||||
@ -126,9 +129,15 @@ begin
|
|||||||
ord(is_devtools)) <> 0);
|
ord(is_devtools)) <> 0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCefBrowserViewDelegateRef.GetChromeToolbarType: TCefChromeToolbarType;
|
procedure TCefBrowserViewDelegateRef.OnGetChromeToolbarType(var aResult : TCefChromeToolbarType);
|
||||||
begin
|
begin
|
||||||
Result := PCefBrowserViewDelegate(FData)^.get_chrome_toolbar_type(PCefBrowserViewDelegate(FData));
|
aResult := PCefBrowserViewDelegate(FData)^.get_chrome_toolbar_type(PCefBrowserViewDelegate(FData));
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TCefBrowserViewDelegateRef.OnUseFramelessWindowForPictureInPicture(const browser_view: ICefBrowserView; var aResult: boolean);
|
||||||
|
begin
|
||||||
|
aResult := (PCefBrowserViewDelegate(FData)^.use_frameless_window_for_picture_in_picture(PCefBrowserViewDelegate(FData),
|
||||||
|
CefGetData(browser_view)) <> 0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCefBrowserViewDelegateRef.OnGestureCommand(const browser_view : ICefBrowserView;
|
procedure TCefBrowserViewDelegateRef.OnGestureCommand(const browser_view : ICefBrowserView;
|
||||||
@ -229,7 +238,23 @@ begin
|
|||||||
Result := CEF_CTT_NONE;
|
Result := CEF_CTT_NONE;
|
||||||
|
|
||||||
if (TempObject <> nil) and (TempObject is TCefBrowserViewDelegateOwn) then
|
if (TempObject <> nil) and (TempObject is TCefBrowserViewDelegateOwn) then
|
||||||
Result := TCefBrowserViewDelegateOwn(TempObject).GetChromeToolbarType();
|
TCefBrowserViewDelegateOwn(TempObject).OnGetChromeToolbarType(Result);
|
||||||
|
end;
|
||||||
|
|
||||||
|
function cef_browserview_delegate_use_frameless_window_for_picture_in_picture(self : PCefBrowserViewDelegate;
|
||||||
|
browser_view : PCefBrowserView): integer; stdcall;
|
||||||
|
var
|
||||||
|
TempObject : TObject;
|
||||||
|
TempResult : boolean;
|
||||||
|
begin
|
||||||
|
TempObject := CefGetObject(self);
|
||||||
|
TempResult := False;
|
||||||
|
|
||||||
|
if (TempObject <> nil) and (TempObject is TCefBrowserViewDelegateOwn) then
|
||||||
|
TCefBrowserViewDelegateOwn(TempObject).OnUseFramelessWindowForPictureInPicture(TCefBrowserViewRef.UnWrap(browser_view),
|
||||||
|
TempResult);
|
||||||
|
|
||||||
|
Result := ord(TempResult);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function cef_browserview_delegate_on_gesture_command(self : PCefBrowserViewDelegate;
|
function cef_browserview_delegate_on_gesture_command(self : PCefBrowserViewDelegate;
|
||||||
@ -263,12 +288,13 @@ begin
|
|||||||
|
|
||||||
with PCefBrowserViewDelegate(FData)^ do
|
with PCefBrowserViewDelegate(FData)^ do
|
||||||
begin
|
begin
|
||||||
on_browser_created := {$IFDEF FPC}@{$ENDIF}cef_browserview_delegate_on_browser_created;
|
on_browser_created := {$IFDEF FPC}@{$ENDIF}cef_browserview_delegate_on_browser_created;
|
||||||
on_browser_destroyed := {$IFDEF FPC}@{$ENDIF}cef_browserview_delegate_on_browser_destroyed;
|
on_browser_destroyed := {$IFDEF FPC}@{$ENDIF}cef_browserview_delegate_on_browser_destroyed;
|
||||||
get_delegate_for_popup_browser_view := {$IFDEF FPC}@{$ENDIF}cef_browserview_delegate_get_delegate_for_popup_browser_view;
|
get_delegate_for_popup_browser_view := {$IFDEF FPC}@{$ENDIF}cef_browserview_delegate_get_delegate_for_popup_browser_view;
|
||||||
on_popup_browser_view_created := {$IFDEF FPC}@{$ENDIF}cef_browserview_delegate_on_popup_browser_view_created;
|
on_popup_browser_view_created := {$IFDEF FPC}@{$ENDIF}cef_browserview_delegate_on_popup_browser_view_created;
|
||||||
get_chrome_toolbar_type := {$IFDEF FPC}@{$ENDIF}cef_browserview_delegate_get_chrome_toolbar_type;
|
get_chrome_toolbar_type := {$IFDEF FPC}@{$ENDIF}cef_browserview_delegate_get_chrome_toolbar_type;
|
||||||
on_gesture_command := {$IFDEF FPC}@{$ENDIF}cef_browserview_delegate_on_gesture_command;
|
use_frameless_window_for_picture_in_picture := {$IFDEF FPC}@{$ENDIF}cef_browserview_delegate_use_frameless_window_for_picture_in_picture;
|
||||||
|
on_gesture_command := {$IFDEF FPC}@{$ENDIF}cef_browserview_delegate_on_gesture_command;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -284,22 +310,27 @@ end;
|
|||||||
|
|
||||||
procedure TCefBrowserViewDelegateOwn.OnGetDelegateForPopupBrowserView(const browser_view: ICefBrowserView; const settings: TCefBrowserSettings; const client: ICefClient; is_devtools: boolean; var aResult : ICefBrowserViewDelegate);
|
procedure TCefBrowserViewDelegateOwn.OnGetDelegateForPopupBrowserView(const browser_view: ICefBrowserView; const settings: TCefBrowserSettings; const client: ICefClient; is_devtools: boolean; var aResult : ICefBrowserViewDelegate);
|
||||||
begin
|
begin
|
||||||
//
|
aResult := nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCefBrowserViewDelegateOwn.OnPopupBrowserViewCreated(const browser_view, popup_browser_view: ICefBrowserView; is_devtools: boolean; var aResult : boolean);
|
procedure TCefBrowserViewDelegateOwn.OnPopupBrowserViewCreated(const browser_view, popup_browser_view: ICefBrowserView; is_devtools: boolean; var aResult : boolean);
|
||||||
begin
|
begin
|
||||||
//
|
aResult := False;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCefBrowserViewDelegateOwn.GetChromeToolbarType: TCefChromeToolbarType;
|
procedure TCefBrowserViewDelegateOwn.OnGetChromeToolbarType(var aResult: TCefChromeToolbarType);
|
||||||
begin
|
begin
|
||||||
Result := CEF_CTT_NONE;
|
aResult := CEF_CTT_NONE;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TCefBrowserViewDelegateOwn.OnUseFramelessWindowForPictureInPicture(const browser_view: ICefBrowserView; var aResult: boolean);
|
||||||
|
begin
|
||||||
|
aResult := False;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCefBrowserViewDelegateOwn.OnGestureCommand(const browser_view: ICefBrowserView; gesture_command: TCefGestureCommand; var aResult : boolean);
|
procedure TCefBrowserViewDelegateOwn.OnGestureCommand(const browser_view: ICefBrowserView; gesture_command: TCefGestureCommand; var aResult : boolean);
|
||||||
begin
|
begin
|
||||||
//
|
aResult := False;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -316,6 +347,8 @@ end;
|
|||||||
|
|
||||||
procedure TCustomBrowserViewDelegate.OnGetPreferredSize(const view: ICefView; var aResult : TCefSize);
|
procedure TCustomBrowserViewDelegate.OnGetPreferredSize(const view: ICefView; var aResult : TCefSize);
|
||||||
begin
|
begin
|
||||||
|
inherited OnGetPreferredSize(view, aResult);
|
||||||
|
|
||||||
try
|
try
|
||||||
if (FEvents <> nil) then
|
if (FEvents <> nil) then
|
||||||
ICefBrowserViewDelegateEvents(FEvents).doOnGetPreferredSize(view, aResult);
|
ICefBrowserViewDelegateEvents(FEvents).doOnGetPreferredSize(view, aResult);
|
||||||
@ -327,6 +360,8 @@ end;
|
|||||||
|
|
||||||
procedure TCustomBrowserViewDelegate.OnGetMinimumSize(const view: ICefView; var aResult : TCefSize);
|
procedure TCustomBrowserViewDelegate.OnGetMinimumSize(const view: ICefView; var aResult : TCefSize);
|
||||||
begin
|
begin
|
||||||
|
inherited OnGetMinimumSize(view, aResult);
|
||||||
|
|
||||||
try
|
try
|
||||||
if (FEvents <> nil) then
|
if (FEvents <> nil) then
|
||||||
ICefBrowserViewDelegateEvents(FEvents).doOnGetMinimumSize(view, aResult);
|
ICefBrowserViewDelegateEvents(FEvents).doOnGetMinimumSize(view, aResult);
|
||||||
@ -338,6 +373,8 @@ end;
|
|||||||
|
|
||||||
procedure TCustomBrowserViewDelegate.OnGetMaximumSize(const view: ICefView; var aResult : TCefSize);
|
procedure TCustomBrowserViewDelegate.OnGetMaximumSize(const view: ICefView; var aResult : TCefSize);
|
||||||
begin
|
begin
|
||||||
|
inherited OnGetMaximumSize(view, aResult);
|
||||||
|
|
||||||
try
|
try
|
||||||
if (FEvents <> nil) then
|
if (FEvents <> nil) then
|
||||||
ICefBrowserViewDelegateEvents(FEvents).doOnGetMaximumSize(view, aResult);
|
ICefBrowserViewDelegateEvents(FEvents).doOnGetMaximumSize(view, aResult);
|
||||||
@ -349,6 +386,8 @@ end;
|
|||||||
|
|
||||||
procedure TCustomBrowserViewDelegate.OnGetHeightForWidth(const view: ICefView; width: Integer; var aResult: Integer);
|
procedure TCustomBrowserViewDelegate.OnGetHeightForWidth(const view: ICefView; width: Integer; var aResult: Integer);
|
||||||
begin
|
begin
|
||||||
|
inherited OnGetHeightForWidth(view, width, aResult);
|
||||||
|
|
||||||
try
|
try
|
||||||
if (FEvents <> nil) then
|
if (FEvents <> nil) then
|
||||||
ICefBrowserViewDelegateEvents(FEvents).doOnGetHeightForWidth(view, width, aResult);
|
ICefBrowserViewDelegateEvents(FEvents).doOnGetHeightForWidth(view, width, aResult);
|
||||||
@ -448,6 +487,8 @@ end;
|
|||||||
|
|
||||||
procedure TCustomBrowserViewDelegate.OnGetDelegateForPopupBrowserView(const browser_view: ICefBrowserView; const settings: TCefBrowserSettings; const client: ICefClient; is_devtools: boolean; var aResult : ICefBrowserViewDelegate);
|
procedure TCustomBrowserViewDelegate.OnGetDelegateForPopupBrowserView(const browser_view: ICefBrowserView; const settings: TCefBrowserSettings; const client: ICefClient; is_devtools: boolean; var aResult : ICefBrowserViewDelegate);
|
||||||
begin
|
begin
|
||||||
|
inherited OnGetDelegateForPopupBrowserView(browser_view, settings, client, is_devtools, aResult);
|
||||||
|
|
||||||
try
|
try
|
||||||
if (FEvents <> nil) then
|
if (FEvents <> nil) then
|
||||||
ICefBrowserViewDelegateEvents(FEvents).doOnGetDelegateForPopupBrowserView(browser_view, settings, client, is_devtools, aResult);
|
ICefBrowserViewDelegateEvents(FEvents).doOnGetDelegateForPopupBrowserView(browser_view, settings, client, is_devtools, aResult);
|
||||||
@ -459,6 +500,8 @@ end;
|
|||||||
|
|
||||||
procedure TCustomBrowserViewDelegate.OnPopupBrowserViewCreated(const browser_view, popup_browser_view: ICefBrowserView; is_devtools: boolean; var aResult : boolean);
|
procedure TCustomBrowserViewDelegate.OnPopupBrowserViewCreated(const browser_view, popup_browser_view: ICefBrowserView; is_devtools: boolean; var aResult : boolean);
|
||||||
begin
|
begin
|
||||||
|
inherited OnPopupBrowserViewCreated(browser_view, popup_browser_view, is_devtools, aResult);
|
||||||
|
|
||||||
try
|
try
|
||||||
if (FEvents <> nil) then
|
if (FEvents <> nil) then
|
||||||
ICefBrowserViewDelegateEvents(FEvents).doOnPopupBrowserViewCreated(browser_view, popup_browser_view, is_devtools, aResult);
|
ICefBrowserViewDelegateEvents(FEvents).doOnPopupBrowserViewCreated(browser_view, popup_browser_view, is_devtools, aResult);
|
||||||
@ -468,16 +511,29 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCustomBrowserViewDelegate.GetChromeToolbarType: TCefChromeToolbarType;
|
procedure TCustomBrowserViewDelegate.OnGetChromeToolbarType(var aResult: TCefChromeToolbarType);
|
||||||
begin
|
begin
|
||||||
Result := inherited GetChromeToolbarType();
|
inherited OnGetChromeToolbarType(aResult);
|
||||||
|
|
||||||
try
|
try
|
||||||
if (FEvents <> nil) then
|
if (FEvents <> nil) then
|
||||||
ICefBrowserViewDelegateEvents(FEvents).doOnGetChromeToolbarType(Result);
|
ICefBrowserViewDelegateEvents(FEvents).doOnGetChromeToolbarType(aResult);
|
||||||
except
|
except
|
||||||
on e : exception do
|
on e : exception do
|
||||||
if CustomExceptionHandler('TCustomBrowserViewDelegate.GetChromeToolbarType', e) then raise;
|
if CustomExceptionHandler('TCustomBrowserViewDelegate.OnGetChromeToolbarType', e) then raise;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TCustomBrowserViewDelegate.OnUseFramelessWindowForPictureInPicture(const browser_view: ICefBrowserView; var aResult: boolean);
|
||||||
|
begin
|
||||||
|
inherited OnUseFramelessWindowForPictureInPicture(browser_view, aResult);
|
||||||
|
|
||||||
|
try
|
||||||
|
if (FEvents <> nil) then
|
||||||
|
ICefBrowserViewDelegateEvents(FEvents).doOnUseFramelessWindowForPictureInPicture(browser_view, aResult);
|
||||||
|
except
|
||||||
|
on e : exception do
|
||||||
|
if CustomExceptionHandler('TCustomBrowserViewDelegate.OnUseFramelessWindowForPictureInPicture', e) then raise;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -111,41 +111,141 @@ type
|
|||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
procedure AfterConstruction; override;
|
procedure AfterConstruction; override;
|
||||||
|
/// <summary>
|
||||||
|
/// Save the visible web contents as a bitmap file.
|
||||||
|
/// </summary>
|
||||||
function SaveToFile(const aFilename : string) : boolean;
|
function SaveToFile(const aFilename : string) : boolean;
|
||||||
|
/// <summary>
|
||||||
|
/// Invalidate this panel.
|
||||||
|
/// </summary>
|
||||||
function InvalidatePanel : boolean;
|
function InvalidatePanel : boolean;
|
||||||
|
/// <summary>
|
||||||
|
/// Acquires the synchronization object before drawing into the background bitmap.
|
||||||
|
/// </summary>
|
||||||
function BeginBufferDraw : boolean;
|
function BeginBufferDraw : boolean;
|
||||||
|
/// <summary>
|
||||||
|
/// Releases the synchronization object after drawing into the background bitmap.
|
||||||
|
/// </summary>
|
||||||
procedure EndBufferDraw;
|
procedure EndBufferDraw;
|
||||||
|
/// <summary>
|
||||||
|
/// Draws aBitmap into the background bitmap buffer at the specified coordinates.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="x">x coordinate where the bitmap will be drawn.</param>
|
||||||
|
/// <param name="y">y coordinate where the bitmap will be drawn.</param>
|
||||||
|
/// <param name="aBitmap">Bitmap that will be drawn into the background bitmap.</param>
|
||||||
procedure BufferDraw(x, y : integer; const aBitmap : TBitmap); overload;
|
procedure BufferDraw(x, y : integer; const aBitmap : TBitmap); overload;
|
||||||
|
/// <summary>
|
||||||
|
/// Draws a part of aBitmap into the background bitmap buffer at the specified rectangle.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="aBitmap">Bitmap that will be drawn into the background bitmap.</param>
|
||||||
|
/// <param name="aSrcRect">Rectangle that defines the area of aBitmap that will be drawn into the background bitmap.</param>
|
||||||
|
/// <param name="aDstRect">Rectangle that defines the area of the background bitmap where aBitmap will be drawn.</param>
|
||||||
procedure BufferDraw(const aBitmap : TBitmap; const aSrcRect, aDstRect : TRect); overload;
|
procedure BufferDraw(const aBitmap : TBitmap; const aSrcRect, aDstRect : TRect); overload;
|
||||||
function UpdateBufferDimensions(aWidth, aHeight : integer) : boolean;
|
/// <summary>
|
||||||
|
/// Update the background bitmap size.
|
||||||
|
/// </summary>
|
||||||
|
function UpdateBufferDimensions(aWidth, aHeight : integer) : boolean;
|
||||||
|
/// <summary>
|
||||||
|
/// Update the image size of the original buffer copy.
|
||||||
|
/// </summary>
|
||||||
function UpdateOrigBufferDimensions(aWidth, aHeight : integer) : boolean;
|
function UpdateOrigBufferDimensions(aWidth, aHeight : integer) : boolean;
|
||||||
|
/// <summary>
|
||||||
|
/// Update the popup image size of the original buffer copy.
|
||||||
|
/// </summary>
|
||||||
function UpdateOrigPopupBufferDimensions(aWidth, aHeight : integer) : boolean;
|
function UpdateOrigPopupBufferDimensions(aWidth, aHeight : integer) : boolean;
|
||||||
|
/// <summary>
|
||||||
|
/// Update the FDeviceScaleFactor value with the current scale.
|
||||||
|
/// </summary>
|
||||||
procedure UpdateDeviceScaleFactor;
|
procedure UpdateDeviceScaleFactor;
|
||||||
|
/// <summary>
|
||||||
|
/// Check if the background image buffers have the same dimensions as this panel. Returns true if they have the same size.
|
||||||
|
/// </summary>
|
||||||
function BufferIsResized(aUseMutex : boolean = True) : boolean;
|
function BufferIsResized(aUseMutex : boolean = True) : boolean;
|
||||||
|
/// <summary>
|
||||||
|
/// Creates the IME handler.
|
||||||
|
/// </summary>
|
||||||
procedure CreateIMEHandler;
|
procedure CreateIMEHandler;
|
||||||
|
/// <summary>
|
||||||
|
/// Calls ChangeCompositionRange in the IME handler.
|
||||||
|
/// </summary>
|
||||||
procedure ChangeCompositionRange(const selection_range : TCefRange; const character_bounds : TCefRectDynArray);
|
procedure ChangeCompositionRange(const selection_range : TCefRange; const character_bounds : TCefRectDynArray);
|
||||||
|
/// <summary>
|
||||||
|
/// Copy the contents from the original popup buffer copy to the main buffer copy.
|
||||||
|
/// </summary>
|
||||||
procedure DrawOrigPopupBuffer(const aSrcRect, aDstRect : TRect);
|
procedure DrawOrigPopupBuffer(const aSrcRect, aDstRect : TRect);
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the scanline size.
|
||||||
|
/// </summary>
|
||||||
property ScanlineSize : integer read FScanlineSize;
|
property ScanlineSize : integer read FScanlineSize;
|
||||||
|
/// <summary>
|
||||||
|
/// Image width.
|
||||||
|
/// </summary>
|
||||||
property BufferWidth : integer read GetBufferWidth;
|
property BufferWidth : integer read GetBufferWidth;
|
||||||
|
/// <summary>
|
||||||
|
/// Image height.
|
||||||
|
/// </summary>
|
||||||
property BufferHeight : integer read GetBufferHeight;
|
property BufferHeight : integer read GetBufferHeight;
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a pointer to the buffer that stores the image.
|
||||||
|
/// </summary>
|
||||||
property BufferBits : pointer read GetBufferBits;
|
property BufferBits : pointer read GetBufferBits;
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the screen scale.
|
||||||
|
/// </summary>
|
||||||
property ScreenScale : single read GetScreenScale;
|
property ScreenScale : single read GetScreenScale;
|
||||||
|
/// <summary>
|
||||||
|
/// Screen scale value used instead of the real one.
|
||||||
|
/// </summary>
|
||||||
property ForcedDeviceScaleFactor : single read FForcedDeviceScaleFactor write FForcedDeviceScaleFactor;
|
property ForcedDeviceScaleFactor : single read FForcedDeviceScaleFactor write FForcedDeviceScaleFactor;
|
||||||
|
/// <summary>
|
||||||
|
/// Clear the background image before copying the original buffer contents.
|
||||||
|
/// </summary>
|
||||||
property MustInitBuffer : boolean read FMustInitBuffer write FMustInitBuffer;
|
property MustInitBuffer : boolean read FMustInitBuffer write FMustInitBuffer;
|
||||||
|
/// <summary>
|
||||||
|
/// Background bitmap.
|
||||||
|
/// </summary>
|
||||||
property Buffer : TBitmap read FBuffer;
|
property Buffer : TBitmap read FBuffer;
|
||||||
|
/// <summary>
|
||||||
|
/// Copy of the raw main bitmap buffer sent by CEF in the TChromiumCore.OnPaint event.
|
||||||
|
/// </summary>
|
||||||
property OrigBuffer : TCEFBitmapBitBuffer read FOrigBuffer;
|
property OrigBuffer : TCEFBitmapBitBuffer read FOrigBuffer;
|
||||||
|
/// <summary>
|
||||||
|
/// Image width of the raw main bitmap buffer copy.
|
||||||
|
/// </summary>
|
||||||
property OrigBufferWidth : integer read GetOrigBufferWidth;
|
property OrigBufferWidth : integer read GetOrigBufferWidth;
|
||||||
|
/// <summary>
|
||||||
|
/// Image height of the raw main bitmap buffer copy.
|
||||||
|
/// </summary>
|
||||||
property OrigBufferHeight : integer read GetOrigBufferHeight;
|
property OrigBufferHeight : integer read GetOrigBufferHeight;
|
||||||
|
/// <summary>
|
||||||
|
/// Copy of the raw popup bitmap buffer sent by CEF in the TChromiumCore.OnPaint event.
|
||||||
|
/// </summary>
|
||||||
property OrigPopupBuffer : TCEFBitmapBitBuffer read FOrigPopupBuffer;
|
property OrigPopupBuffer : TCEFBitmapBitBuffer read FOrigPopupBuffer;
|
||||||
|
/// <summary>
|
||||||
|
/// Image width of the raw popup bitmap buffer copy.
|
||||||
|
/// </summary>
|
||||||
property OrigPopupBufferWidth : integer read GetOrigPopupBufferWidth;
|
property OrigPopupBufferWidth : integer read GetOrigPopupBufferWidth;
|
||||||
|
/// <summary>
|
||||||
|
/// Image height of the raw popup bitmap buffer copy.
|
||||||
|
/// </summary>
|
||||||
property OrigPopupBufferHeight : integer read GetOrigPopupBufferHeight;
|
property OrigPopupBufferHeight : integer read GetOrigPopupBufferHeight;
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a pointer to the raw popup bitmap buffer copye.
|
||||||
|
/// </summary>
|
||||||
property OrigPopupBufferBits : pointer read GetOrigPopupBufferBits;
|
property OrigPopupBufferBits : pointer read GetOrigPopupBufferBits;
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the scanline size of the raw popup bitmap buffer copy.
|
||||||
|
/// </summary>
|
||||||
property OrigPopupScanlineSize : integer read FOrigPopupScanlineSize;
|
property OrigPopupScanlineSize : integer read FOrigPopupScanlineSize;
|
||||||
|
|
||||||
{$IFDEF MSWINDOWS}
|
{$IFDEF MSWINDOWS}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the handle of the parent form.
|
||||||
|
/// </summary>
|
||||||
property ParentFormHandle : TCefWindowHandle read GetParentFormHandle;
|
property ParentFormHandle : TCefWindowHandle read GetParentFormHandle;
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the parent form.
|
||||||
|
/// </summary>
|
||||||
property ParentForm : TCustomForm read GetParentForm;
|
property ParentForm : TCustomForm read GetParentForm;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
|
@ -159,6 +159,8 @@ end;
|
|||||||
|
|
||||||
procedure TCustomButtonDelegate.OnGetPreferredSize(const view: ICefView; var aResult : TCefSize);
|
procedure TCustomButtonDelegate.OnGetPreferredSize(const view: ICefView; var aResult : TCefSize);
|
||||||
begin
|
begin
|
||||||
|
inherited OnGetPreferredSize(view, aResult);
|
||||||
|
|
||||||
try
|
try
|
||||||
if (FEvents <> nil) then
|
if (FEvents <> nil) then
|
||||||
ICefButtonDelegateEvents(FEvents).doOnGetPreferredSize(view, aResult);
|
ICefButtonDelegateEvents(FEvents).doOnGetPreferredSize(view, aResult);
|
||||||
@ -170,6 +172,8 @@ end;
|
|||||||
|
|
||||||
procedure TCustomButtonDelegate.OnGetMinimumSize(const view: ICefView; var aResult : TCefSize);
|
procedure TCustomButtonDelegate.OnGetMinimumSize(const view: ICefView; var aResult : TCefSize);
|
||||||
begin
|
begin
|
||||||
|
inherited OnGetMinimumSize(view, aResult);
|
||||||
|
|
||||||
try
|
try
|
||||||
if (FEvents <> nil) then
|
if (FEvents <> nil) then
|
||||||
ICefButtonDelegateEvents(FEvents).doOnGetMinimumSize(view, aResult);
|
ICefButtonDelegateEvents(FEvents).doOnGetMinimumSize(view, aResult);
|
||||||
@ -181,6 +185,8 @@ end;
|
|||||||
|
|
||||||
procedure TCustomButtonDelegate.OnGetMaximumSize(const view: ICefView; var aResult : TCefSize);
|
procedure TCustomButtonDelegate.OnGetMaximumSize(const view: ICefView; var aResult : TCefSize);
|
||||||
begin
|
begin
|
||||||
|
inherited OnGetMaximumSize(view, aResult);
|
||||||
|
|
||||||
try
|
try
|
||||||
if (FEvents <> nil) then
|
if (FEvents <> nil) then
|
||||||
ICefButtonDelegateEvents(FEvents).doOnGetMaximumSize(view, aResult);
|
ICefButtonDelegateEvents(FEvents).doOnGetMaximumSize(view, aResult);
|
||||||
@ -192,6 +198,8 @@ end;
|
|||||||
|
|
||||||
procedure TCustomButtonDelegate.OnGetHeightForWidth(const view: ICefView; width: Integer; var aResult: Integer);
|
procedure TCustomButtonDelegate.OnGetHeightForWidth(const view: ICefView; width: Integer; var aResult: Integer);
|
||||||
begin
|
begin
|
||||||
|
inherited OnGetHeightForWidth(view, width, aResult);
|
||||||
|
|
||||||
try
|
try
|
||||||
if (FEvents <> nil) then
|
if (FEvents <> nil) then
|
||||||
ICefButtonDelegateEvents(FEvents).doOnGetHeightForWidth(view, width, aResult);
|
ICefButtonDelegateEvents(FEvents).doOnGetHeightForWidth(view, width, aResult);
|
||||||
|
@ -782,42 +782,72 @@ type
|
|||||||
function SetNewBrowserParent(aNewParentHwnd : HWND) : boolean;
|
function SetNewBrowserParent(aNewParentHwnd : HWND) : boolean;
|
||||||
{$ENDIF MSWINDOWS}
|
{$ENDIF MSWINDOWS}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to create the browser after the global request context has been
|
/// <para>Used to create the browser after the global request context has been
|
||||||
/// initialized. You need to set all properties and events before calling
|
/// initialized. You need to set all properties and events before calling
|
||||||
/// this function because it will only create the internal handlers needed
|
/// this function because it will only create the internal handlers needed
|
||||||
/// for those events and the property values will be used in the browser
|
/// for those events and the property values will be used in the browser
|
||||||
/// initialization.
|
/// initialization.</para>
|
||||||
/// The browser will be fully initialized when the TChromiumCore.OnAfterCreated
|
/// <para>The browser will be fully initialized when the TChromiumCore.OnAfterCreated
|
||||||
/// event is triggered.
|
/// event is triggered.</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
function CreateBrowser(aParentHandle : TCefWindowHandle; aParentRect : TRect; const aWindowName : ustring = ''; const aContext : ICefRequestContext = nil; const aExtraInfo : ICefDictionaryValue = nil; aForceAsPopup : boolean = False) : boolean; overload; virtual;
|
function CreateBrowser(aParentHandle : TCefWindowHandle; aParentRect : TRect; const aWindowName : ustring = ''; const aContext : ICefRequestContext = nil; const aExtraInfo : ICefDictionaryValue = nil; aForceAsPopup : boolean = False) : boolean; overload; virtual;
|
||||||
|
/// <summary>
|
||||||
|
/// <para>Used to create the browser after the global request context has been
|
||||||
|
/// initialized. You need to set all properties and events before calling
|
||||||
|
/// this function because it will only create the internal handlers needed
|
||||||
|
/// for those events and the property values will be used in the browser
|
||||||
|
/// initialization.</para>
|
||||||
|
/// <para>The browser will be fully initialized when the TChromiumCore.OnAfterCreated
|
||||||
|
/// event is triggered.</para>
|
||||||
|
/// </summary>
|
||||||
function CreateBrowser(const aURL : ustring; const aBrowserViewComp : TCEFBrowserViewComponent; const aContext : ICefRequestContext = nil; const aExtraInfo : ICefDictionaryValue = nil) : boolean; overload; virtual;
|
function CreateBrowser(const aURL : ustring; const aBrowserViewComp : TCEFBrowserViewComponent; const aContext : ICefRequestContext = nil; const aExtraInfo : ICefDictionaryValue = nil) : boolean; overload; virtual;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to navigate to a URL in the specified frame or the main frame.
|
/// Used to navigate to a URL in the specified frame or the main frame.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
procedure LoadURL(const aURL : ustring; const aFrameName : ustring = ''); overload;
|
procedure LoadURL(const aURL : ustring; const aFrameName : ustring = ''); overload;
|
||||||
|
/// <summary>
|
||||||
|
/// Used to navigate to a URL in the specified frame or the main frame.
|
||||||
|
/// </summary>
|
||||||
procedure LoadURL(const aURL : ustring; const aFrame : ICefFrame); overload;
|
procedure LoadURL(const aURL : ustring; const aFrame : ICefFrame); overload;
|
||||||
|
/// <summary>
|
||||||
|
/// Used to navigate to a URL in the specified frame or the main frame.
|
||||||
|
/// </summary>
|
||||||
procedure LoadURL(const aURL : ustring; const aFrameIdentifier : int64); overload;
|
procedure LoadURL(const aURL : ustring; const aFrameIdentifier : int64); overload;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to load a DATA URI with the HTML string contents in the specified frame or the main frame.
|
/// Used to load a DATA URI with the HTML string contents in the specified frame or the main frame.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
procedure LoadString(const aHTML : ustring; const aFrameName : ustring = ''); overload;
|
procedure LoadString(const aHTML : ustring; const aFrameName : ustring = ''); overload;
|
||||||
|
/// <summary>
|
||||||
|
/// Used to load a DATA URI with the HTML string contents in the specified frame or the main frame.
|
||||||
|
/// </summary>
|
||||||
procedure LoadString(const aHTML : ustring; const aFrame : ICefFrame); overload;
|
procedure LoadString(const aHTML : ustring; const aFrame : ICefFrame); overload;
|
||||||
|
/// <summary>
|
||||||
|
/// Used to load a DATA URI with the HTML string contents in the specified frame or the main frame.
|
||||||
|
/// </summary>
|
||||||
procedure LoadString(const aHTML : ustring; const aFrameIdentifier : int64); overload;
|
procedure LoadString(const aHTML : ustring; const aFrameIdentifier : int64); overload;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to load a DATA URI with the stream contents in the specified frame or the main frame.
|
/// Used to load a DATA URI with the stream contents in the specified frame or the main frame.
|
||||||
/// The DATA URI will be configured with the mime type and charset specified in the parameters.
|
/// The DATA URI will be configured with the mime type and charset specified in the parameters.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
procedure LoadResource(const aStream : TCustomMemoryStream; const aMimeType, aCharset : string; const aFrameName : ustring = ''); overload;
|
procedure LoadResource(const aStream : TCustomMemoryStream; const aMimeType, aCharset : string; const aFrameName : ustring = ''); overload;
|
||||||
|
/// <summary>
|
||||||
|
/// Used to load a DATA URI with the stream contents in the specified frame or the main frame.
|
||||||
|
/// The DATA URI will be configured with the mime type and charset specified in the parameters.
|
||||||
|
/// </summary>
|
||||||
procedure LoadResource(const aStream : TCustomMemoryStream; const aMimeType, aCharset : string; const aFrame : ICefFrame); overload;
|
procedure LoadResource(const aStream : TCustomMemoryStream; const aMimeType, aCharset : string; const aFrame : ICefFrame); overload;
|
||||||
|
/// <summary>
|
||||||
|
/// Used to load a DATA URI with the stream contents in the specified frame or the main frame.
|
||||||
|
/// The DATA URI will be configured with the mime type and charset specified in the parameters.
|
||||||
|
/// </summary>
|
||||||
procedure LoadResource(const aStream : TCustomMemoryStream; const aMimeType, aCharset : string; const aFrameIdentifier : int64); overload;
|
procedure LoadResource(const aStream : TCustomMemoryStream; const aMimeType, aCharset : string; const aFrameIdentifier : int64); overload;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Load the request represented by the aRequest object.
|
/// Load the request represented by the aRequest object.
|
||||||
///
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
/// WARNING: This function will fail with bad IPC message reason
|
/// WARNING: This function will fail with bad IPC message reason
|
||||||
/// INVALID_INITIATOR_ORIGIN (213) unless you first navigate to the request
|
/// INVALID_INITIATOR_ORIGIN (213) unless you first navigate to the request
|
||||||
/// origin using some other mechanism (LoadURL, link click, etc).
|
/// origin using some other mechanism (LoadURL, link click, etc).
|
||||||
/// </summary>
|
/// </remarks>
|
||||||
procedure LoadRequest(const aRequest: ICefRequest);
|
procedure LoadRequest(const aRequest: ICefRequest);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Navigate backwards.
|
/// Navigate backwards.
|
||||||
@ -854,20 +884,20 @@ type
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
procedure SimulateMouseWheel(aDeltaX, aDeltaY : integer);
|
procedure SimulateMouseWheel(aDeltaX, aDeltaY : integer);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Clears all certificate exceptions that were added as part of handling
|
/// <para>Clears all certificate exceptions that were added as part of handling
|
||||||
/// OnCertificateError. If you call this it is recommended that you also call
|
/// OnCertificateError. If you call this it is recommended that you also call
|
||||||
/// CloseAllConnections() or you risk not being prompted again for server
|
/// CloseAllConnections() or you risk not being prompted again for server
|
||||||
/// certificates if you reconnect quickly.
|
/// certificates if you reconnect quickly.</para>
|
||||||
/// If aClearImmediately is false then OnCertificateExceptionsCleared is
|
/// <para>If aClearImmediately is false then OnCertificateExceptionsCleared is
|
||||||
/// triggered when the exceptions are cleared.
|
/// triggered when the exceptions are cleared.</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
function ClearCertificateExceptions(aClearImmediately : boolean = True) : boolean;
|
function ClearCertificateExceptions(aClearImmediately : boolean = True) : boolean;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Clears all HTTP authentication credentials that were added as part of
|
/// <para>Clears all HTTP authentication credentials that were added as part of
|
||||||
/// handling GetAuthCredentials. If |callback| is non-NULL it will be executed
|
/// handling GetAuthCredentials. If |callback| is non-NULL it will be executed
|
||||||
/// on the UI thread after completion.
|
/// on the UI thread after completion.</para>
|
||||||
/// If aClearImmediately is false then OnHttpAuthCredentialsCleared is triggered
|
/// <para>If aClearImmediately is false then OnHttpAuthCredentialsCleared is triggered
|
||||||
/// when the credeintials are cleared.
|
/// when the credeintials are cleared.</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
function ClearHttpAuthCredentials(aClearImmediately : boolean = True) : boolean;
|
function ClearHttpAuthCredentials(aClearImmediately : boolean = True) : boolean;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -877,17 +907,17 @@ type
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
function CloseAllConnections(aCloseImmediately : boolean = True) : boolean;
|
function CloseAllConnections(aCloseImmediately : boolean = True) : boolean;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Retrieve all the HTML content from the specified frame or the main frame.
|
/// <para>Retrieve all the HTML content from the specified frame or the main frame.
|
||||||
/// Leave aFrameName empty to get the HTML source from the main frame.
|
/// Leave aFrameName empty to get the HTML source from the main frame.</para>
|
||||||
/// It uses a CefStringVisitor to get the HTML content asynchronously and the
|
/// <para>It uses a CefStringVisitor to get the HTML content asynchronously and the
|
||||||
/// result will be received in the TChromiumCore.OnTextResultAvailable event.
|
/// result will be received in the TChromiumCore.OnTextResultAvailable event.</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
procedure RetrieveHTML(const aFrameName : ustring = ''); overload;
|
procedure RetrieveHTML(const aFrameName : ustring = ''); overload;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Retrieve all the HTML content from the specified frame or the main frame.
|
/// <para>Retrieve all the HTML content from the specified frame or the main frame.
|
||||||
/// Set aFrame to nil to get the HTML source from the main frame.
|
/// Set aFrame to nil to get the HTML source from the main frame.</para>
|
||||||
/// It uses a CefStringVisitor to get the HTML content asynchronously and the
|
/// <para>It uses a CefStringVisitor to get the HTML content asynchronously and the
|
||||||
/// result will be received in the TChromiumCore.OnTextResultAvailable event.
|
/// result will be received in the TChromiumCore.OnTextResultAvailable event.</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
procedure RetrieveHTML(const aFrame : ICefFrame); overload;
|
procedure RetrieveHTML(const aFrame : ICefFrame); overload;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -933,14 +963,28 @@ type
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
function GetFrameIdentifiers(var aFrameCount : NativeUInt; var aFrameIdentifierArray : TCefFrameIdentifierArray) : boolean;
|
function GetFrameIdentifiers(var aFrameCount : NativeUInt; var aFrameIdentifierArray : TCefFrameIdentifierArray) : boolean;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Execute a string of JavaScript code in this frame. The |aScriptURL|
|
/// Execute a string of JavaScript code in this frame.
|
||||||
/// parameter is the URL where the script in question can be found, if any.
|
|
||||||
/// The renderer may request this URL to show the developer the source of the
|
|
||||||
/// error. The |aStartLine| parameter is the base line number to use for
|
|
||||||
/// error reporting.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="aCode">JavaScript code.</param>
|
||||||
|
/// <param name="aScriptURL">The URL where the script in question can be found, if any. The renderer may request this URL to show the developer the source of the error.</param>
|
||||||
|
/// <param name="aFrameName">Name of the frame where the JavaScript code will be executed. This name is generated automatically by Chromium. See ICefBrowser.GetFrameNames.</param>
|
||||||
|
/// <param name="aStartLine">The base line number to use for error reporting.</param>
|
||||||
procedure ExecuteJavaScript(const aCode, aScriptURL : ustring; const aFrameName : ustring = ''; aStartLine : integer = 0); overload;
|
procedure ExecuteJavaScript(const aCode, aScriptURL : ustring; const aFrameName : ustring = ''; aStartLine : integer = 0); overload;
|
||||||
|
/// <summary>
|
||||||
|
/// Execute a string of JavaScript code in this frame.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="aCode">JavaScript code.</param>
|
||||||
|
/// <param name="aScriptURL">The URL where the script in question can be found, if any. The renderer may request this URL to show the developer the source of the error.</param>
|
||||||
|
/// <param name="aFrame">Frame where the JavaScript code will be executed.</param>
|
||||||
|
/// <param name="aStartLine">The base line number to use for error reporting.</param>
|
||||||
procedure ExecuteJavaScript(const aCode, aScriptURL : ustring; const aFrame : ICefFrame; aStartLine : integer = 0); overload;
|
procedure ExecuteJavaScript(const aCode, aScriptURL : ustring; const aFrame : ICefFrame; aStartLine : integer = 0); overload;
|
||||||
|
/// <summary>
|
||||||
|
/// Execute a string of JavaScript code in this frame.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="aCode">JavaScript code.</param>
|
||||||
|
/// <param name="aScriptURL">The URL where the script in question can be found, if any. The renderer may request this URL to show the developer the source of the error.</param>
|
||||||
|
/// <param name="aFrameIdentifier">Frame where the JavaScript code will be executed.</param>
|
||||||
|
/// <param name="aStartLine">The base line number to use for error reporting.</param>
|
||||||
procedure ExecuteJavaScript(const aCode, aScriptURL : ustring; const aFrameIdentifier : int64; aStartLine : integer = 0); overload;
|
procedure ExecuteJavaScript(const aCode, aScriptURL : ustring; const aFrameIdentifier : int64; aStartLine : integer = 0); overload;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to update the browser preferences using the TChromiumCore property values asynchronously.
|
/// Used to update the browser preferences using the TChromiumCore property values asynchronously.
|
||||||
@ -989,21 +1033,21 @@ type
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
function DeleteCookies(const url : ustring = ''; const cookieName : ustring = ''; aDeleteImmediately : boolean = False) : boolean;
|
function DeleteCookies(const url : ustring = ''; const cookieName : ustring = ''; aDeleteImmediately : boolean = False) : boolean;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// TChromiumCore.VisitAllCookies triggers the TChromiumCore.OnCookiesVisited event for each cookie
|
/// <para>TChromiumCore.VisitAllCookies triggers the TChromiumCore.OnCookiesVisited event for each cookie
|
||||||
/// aID is an optional parameter to identify which VisitAllCookies call has triggered the
|
/// aID is an optional parameter to identify which VisitAllCookies call has triggered the
|
||||||
/// OnCookiesVisited event.
|
/// OnCookiesVisited event.</para>
|
||||||
/// TChromiumCore.OnCookiesVisited may not be triggered if the cookie store is empty but the
|
/// <para>TChromiumCore.OnCookiesVisited may not be triggered if the cookie store is empty but the
|
||||||
/// TChromium.OnCookieVisitorDestroyed event will always be triggered to signal when the browser
|
/// TChromium.OnCookieVisitorDestroyed event will always be triggered to signal when the browser
|
||||||
/// when the visit is over.
|
/// when the visit is over.</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
function VisitAllCookies(aID : integer = 0) : boolean;
|
function VisitAllCookies(aID : integer = 0) : boolean;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// TChromiumCore.VisitURLCookies triggers the TChromiumCore.OnCookiesVisited event for each cookie
|
/// <para>TChromiumCore.VisitURLCookies triggers the TChromiumCore.OnCookiesVisited event for each cookie
|
||||||
/// aID is an optional parameter to identify which VisitURLCookies call has triggered the
|
/// aID is an optional parameter to identify which VisitURLCookies call has triggered the
|
||||||
/// OnCookiesVisited event.
|
/// OnCookiesVisited event.</para>
|
||||||
/// TChromiumCore.OnCookiesVisited may not be triggered if the cookie store is empty but the
|
/// <para>TChromiumCore.OnCookiesVisited may not be triggered if the cookie store is empty but the
|
||||||
/// TChromium.OnCookieVisitorDestroyed event will always be triggered to signal when the browser
|
/// TChromium.OnCookieVisitorDestroyed event will always be triggered to signal when the browser
|
||||||
/// when the visit is over.
|
/// when the visit is over.</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
function VisitURLCookies(const url : ustring; includeHttpOnly : boolean = False; aID : integer = 0) : boolean;
|
function VisitURLCookies(const url : ustring; includeHttpOnly : boolean = False; aID : integer = 0) : boolean;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -1033,7 +1077,7 @@ type
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
procedure CloseDevTools(const aDevToolsWnd : TCefWindowHandle); overload;
|
procedure CloseDevTools(const aDevToolsWnd : TCefWindowHandle); overload;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Send a function call message over the DevTools protocol. |message_| must be
|
/// <para>Send a function call message over the DevTools protocol. |message_| must be
|
||||||
/// a UTF8-encoded JSON dictionary that contains "id" (int), "function"
|
/// a UTF8-encoded JSON dictionary that contains "id" (int), "function"
|
||||||
/// (string) and "params" (dictionary, optional) values. See the DevTools
|
/// (string) and "params" (dictionary, optional) values. See the DevTools
|
||||||
/// protocol documentation at https://chromedevtools.github.io/devtools-
|
/// protocol documentation at https://chromedevtools.github.io/devtools-
|
||||||
@ -1044,40 +1088,37 @@ type
|
|||||||
/// will be applied asynchronously and any messages that fail due to
|
/// will be applied asynchronously and any messages that fail due to
|
||||||
/// formatting errors or missing parameters may be discarded without
|
/// formatting errors or missing parameters may be discarded without
|
||||||
/// notification. Prefer ExecuteDevToolsMethod if a more structured approach
|
/// notification. Prefer ExecuteDevToolsMethod if a more structured approach
|
||||||
/// to message formatting is desired.
|
/// to message formatting is desired.</para>
|
||||||
///
|
/// <para>Every valid function call will result in an asynchronous function result
|
||||||
/// Every valid function call will result in an asynchronous function result
|
|
||||||
/// or error message that references the sent message "id". Event messages are
|
/// or error message that references the sent message "id". Event messages are
|
||||||
/// received while notifications are enabled (for example, between function
|
/// received while notifications are enabled (for example, between function
|
||||||
/// calls for "Page.enable" and "Page.disable"). All received messages will be
|
/// calls for "Page.enable" and "Page.disable"). All received messages will be
|
||||||
/// delivered to the observer(s) registered with AddDevToolsMessageObserver.
|
/// delivered to the observer(s) registered with AddDevToolsMessageObserver.
|
||||||
/// See ICefDevToolsMessageObserver.OnDevToolsMessage documentation for
|
/// See ICefDevToolsMessageObserver.OnDevToolsMessage documentation for
|
||||||
/// details of received message contents.
|
/// details of received message contents.</para>
|
||||||
///
|
/// <para>Usage of the SendDevToolsMessage, ExecuteDevToolsMethod and
|
||||||
/// Usage of the SendDevToolsMessage, ExecuteDevToolsMethod and
|
|
||||||
/// AddDevToolsMessageObserver functions does not require an active DevTools
|
/// AddDevToolsMessageObserver functions does not require an active DevTools
|
||||||
/// front-end or remote-debugging session. Other active DevTools sessions will
|
/// front-end or remote-debugging session. Other active DevTools sessions will
|
||||||
/// continue to function independently. However, any modification of global
|
/// continue to function independently. However, any modification of global
|
||||||
/// browser state by one session may not be reflected in the UI of other
|
/// browser state by one session may not be reflected in the UI of other
|
||||||
/// sessions.
|
/// sessions.</para>
|
||||||
///
|
/// <para>Communication with the DevTools front-end (when displayed) can be logged
|
||||||
/// Communication with the DevTools front-end (when displayed) can be logged
|
|
||||||
/// for development purposes by passing the `--devtools-protocol-log-
|
/// for development purposes by passing the `--devtools-protocol-log-
|
||||||
/// file=<path>` command-line flag.
|
/// file=<path>` command-line flag.</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
function SendDevToolsMessage(const message_: ustring): boolean;
|
function SendDevToolsMessage(const message_: ustring): boolean;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Execute a function call over the DevTools protocol. This is a more
|
/// <para>Execute a function call over the DevTools protocol. This is a more
|
||||||
/// structured version of SendDevToolsMessage. |message_id| is an incremental
|
/// structured version of SendDevToolsMessage. |message_id| is an incremental
|
||||||
/// number that uniquely identifies the message (pass 0 to have the next
|
/// number that uniquely identifies the message (pass 0 to have the next
|
||||||
/// number assigned automatically based on previous values). |function| is the
|
/// number assigned automatically based on previous values). |function| is the
|
||||||
/// function name. |params| are the function parameters, which may be NULL.
|
/// function name. |params| are the function parameters, which may be NULL.</para>
|
||||||
/// See the DevTools protocol documentation (linked above) for details of
|
/// <para>See the DevTools protocol documentation (linked above) for details of
|
||||||
/// supported functions and the expected |params| dictionary contents. This
|
/// supported functions and the expected |params| dictionary contents. This
|
||||||
/// function will return the assigned message ID if called on the UI thread
|
/// function will return the assigned message ID if called on the UI thread
|
||||||
/// and the message was successfully submitted for validation, otherwise 0.
|
/// and the message was successfully submitted for validation, otherwise 0.</para>
|
||||||
/// See the SendDevToolsMessage documentation for additional usage
|
/// <para>See the SendDevToolsMessage documentation for additional usage
|
||||||
/// information.
|
/// information.</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
function ExecuteDevToolsMethod(message_id: integer; const method: ustring; const params: ICefDictionaryValue): Integer;
|
function ExecuteDevToolsMethod(message_id: integer; const method: ustring; const params: ICefDictionaryValue): Integer;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -1088,12 +1129,12 @@ type
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
function AddDevToolsMessageObserver(const observer: ICefDevToolsMessageObserver): ICefRegistration;
|
function AddDevToolsMessageObserver(const observer: ICefDevToolsMessageObserver): ICefRegistration;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Search for |searchText|. |forward| indicates whether to search forward or
|
/// <para>Search for |searchText|. |forward| indicates whether to search forward or
|
||||||
/// backward within the page. |matchCase| indicates whether the search should
|
/// backward within the page. |matchCase| indicates whether the search should
|
||||||
/// be case-sensitive. |findNext| indicates whether this is the first request
|
/// be case-sensitive. |findNext| indicates whether this is the first request
|
||||||
/// or a follow-up. The search will be restarted if |searchText| or
|
/// or a follow-up. The search will be restarted if |searchText| or
|
||||||
/// |matchCase| change. The search will be stopped if |searchText| is NULL.
|
/// |matchCase| change. The search will be stopped if |searchText| is NULL.</para>
|
||||||
/// OnFindResult will be triggered to report find results.
|
/// <para>OnFindResult will be triggered to report find results.</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
procedure Find(const aSearchText : ustring; aForward, aMatchCase, aFindNext : Boolean);
|
procedure Find(const aSearchText : ustring; aForward, aMatchCase, aFindNext : Boolean);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -1105,12 +1146,12 @@ type
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
procedure Print;
|
procedure Print;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Print the current browser contents to the PDF file specified by |path| and
|
/// <para>Print the current browser contents to the PDF file specified by |path| and
|
||||||
/// execute |callback| on completion. The caller is responsible for deleting
|
/// execute |callback| on completion. The caller is responsible for deleting
|
||||||
/// |path| when done. For PDF printing to work on Linux you must implement the
|
/// |path| when done. For PDF printing to work on Linux you must implement the
|
||||||
/// ICefPrintHandler.GetPdfPaperSize function.
|
/// ICefPrintHandler.GetPdfPaperSize function.</para>
|
||||||
/// The TChromiumCore.OnPdfPrintFinished event will be triggered when the PDF
|
/// <para>The TChromiumCore.OnPdfPrintFinished event will be triggered when the PDF
|
||||||
/// file is created.
|
/// file is created.</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
procedure PrintToPDF(const aFilePath : ustring);
|
procedure PrintToPDF(const aFilePath : ustring);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -1270,51 +1311,54 @@ type
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
procedure SendProcessMessage(targetProcess: TCefProcessId; const ProcMessage: ICefProcessMessage; const aFrameIdentifier : int64); overload;
|
procedure SendProcessMessage(targetProcess: TCefProcessId; const ProcMessage: ICefProcessMessage; const aFrameIdentifier : int64); overload;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Create a new URL request that will be treated as originating from this
|
/// <para>Create a new URL request that will be treated as originating from this
|
||||||
/// frame and the associated browser. Use TCustomCefUrlrequestClient.Create instead if
|
/// frame and the associated browser. Use TCustomCefUrlrequestClient.Create instead if
|
||||||
/// you do not want the request to have this association, in which case it may
|
/// you do not want the request to have this association, in which case it may
|
||||||
/// be handled differently (see documentation on that function). A request
|
/// be handled differently (see documentation on that function). A request
|
||||||
/// created with this function may only originate from the browser process,
|
/// created with this function may only originate from the browser process,
|
||||||
/// and will behave as follows:
|
/// and will behave as follows:</para>
|
||||||
|
/// </code>
|
||||||
/// - It may be intercepted by the client via CefResourceRequestHandler or
|
/// - It may be intercepted by the client via CefResourceRequestHandler or
|
||||||
/// CefSchemeHandlerFactory.
|
/// CefSchemeHandlerFactory.
|
||||||
/// - POST data may only contain a single element of type PDE_TYPE_FILE or
|
/// - POST data may only contain a single element of type PDE_TYPE_FILE or
|
||||||
/// PDE_TYPE_BYTES.
|
/// PDE_TYPE_BYTES.
|
||||||
///
|
/// </code>
|
||||||
/// The |request| object will be marked as read-only after calling this
|
/// <para>The |request| object will be marked as read-only after calling this
|
||||||
/// function.
|
/// function.</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
function CreateUrlRequest(const request: ICefRequest; const client: ICefUrlrequestClient; const aFrameName : ustring = ''): ICefUrlRequest; overload;
|
function CreateUrlRequest(const request: ICefRequest; const client: ICefUrlrequestClient; const aFrameName : ustring = ''): ICefUrlRequest; overload;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Create a new URL request that will be treated as originating from this
|
/// <para>Create a new URL request that will be treated as originating from this
|
||||||
/// frame and the associated browser. Use TCustomCefUrlrequestClient.Create instead if
|
/// frame and the associated browser. Use TCustomCefUrlrequestClient.Create instead if
|
||||||
/// you do not want the request to have this association, in which case it may
|
/// you do not want the request to have this association, in which case it may
|
||||||
/// be handled differently (see documentation on that function). A request
|
/// be handled differently (see documentation on that function). A request
|
||||||
/// created with this function may only originate from the browser process,
|
/// created with this function may only originate from the browser process,
|
||||||
/// and will behave as follows:
|
/// and will behave as follows:</para>
|
||||||
|
/// <code>
|
||||||
/// - It may be intercepted by the client via CefResourceRequestHandler or
|
/// - It may be intercepted by the client via CefResourceRequestHandler or
|
||||||
/// CefSchemeHandlerFactory.
|
/// CefSchemeHandlerFactory.
|
||||||
/// - POST data may only contain a single element of type PDE_TYPE_FILE or
|
/// - POST data may only contain a single element of type PDE_TYPE_FILE or
|
||||||
/// PDE_TYPE_BYTES.
|
/// PDE_TYPE_BYTES.
|
||||||
///
|
/// </code>
|
||||||
/// The |request| object will be marked as read-only after calling this
|
/// <para>The |request| object will be marked as read-only after calling this
|
||||||
/// function.
|
/// function.</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
function CreateUrlRequest(const request: ICefRequest; const client: ICefUrlrequestClient; const aFrame : ICefFrame): ICefUrlRequest; overload;
|
function CreateUrlRequest(const request: ICefRequest; const client: ICefUrlrequestClient; const aFrame : ICefFrame): ICefUrlRequest; overload;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Create a new URL request that will be treated as originating from this
|
/// <para>Create a new URL request that will be treated as originating from this
|
||||||
/// frame and the associated browser. Use TCustomCefUrlrequestClient.Create instead if
|
/// frame and the associated browser. Use TCustomCefUrlrequestClient.Create instead if
|
||||||
/// you do not want the request to have this association, in which case it may
|
/// you do not want the request to have this association, in which case it may
|
||||||
/// be handled differently (see documentation on that function). A request
|
/// be handled differently (see documentation on that function). A request
|
||||||
/// created with this function may only originate from the browser process,
|
/// created with this function may only originate from the browser process,
|
||||||
/// and will behave as follows:
|
/// and will behave as follows:</para>
|
||||||
|
/// <code>
|
||||||
/// - It may be intercepted by the client via CefResourceRequestHandler or
|
/// - It may be intercepted by the client via CefResourceRequestHandler or
|
||||||
/// CefSchemeHandlerFactory.
|
/// CefSchemeHandlerFactory.
|
||||||
/// - POST data may only contain a single element of type PDE_TYPE_FILE or
|
/// - POST data may only contain a single element of type PDE_TYPE_FILE or
|
||||||
/// PDE_TYPE_BYTES.
|
/// PDE_TYPE_BYTES.
|
||||||
///
|
/// </code>
|
||||||
/// The |request| object will be marked as read-only after calling this
|
/// <para>The |request| object will be marked as read-only after calling this
|
||||||
/// function.
|
/// function.</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
function CreateUrlRequest(const request: ICefRequest; const client: ICefUrlrequestClient; const aFrameIdentifier : int64): ICefUrlRequest; overload;
|
function CreateUrlRequest(const request: ICefRequest; const client: ICefUrlrequestClient; const aFrameIdentifier : int64): ICefUrlRequest; overload;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -1322,29 +1366,27 @@ type
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
procedure SetFocus(focus: Boolean);
|
procedure SetFocus(focus: Boolean);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set accessibility state for all frames. |accessibility_state| may be
|
/// <para>Set accessibility state for all frames. |accessibility_state| may be
|
||||||
/// default, enabled or disabled. If |accessibility_state| is STATE_DEFAULT
|
/// default, enabled or disabled. If |accessibility_state| is STATE_DEFAULT
|
||||||
/// then accessibility will be disabled by default and the state may be
|
/// then accessibility will be disabled by default and the state may be
|
||||||
/// further controlled with the "force-renderer-accessibility" and "disable-
|
/// further controlled with the "force-renderer-accessibility" and "disable-
|
||||||
/// renderer-accessibility" command-line switches. If |accessibility_state| is
|
/// renderer-accessibility" command-line switches. If |accessibility_state| is
|
||||||
/// STATE_ENABLED then accessibility will be enabled. If |accessibility_state|
|
/// STATE_ENABLED then accessibility will be enabled. If |accessibility_state|
|
||||||
/// is STATE_DISABLED then accessibility will be completely disabled.
|
/// is STATE_DISABLED then accessibility will be completely disabled.</para>
|
||||||
///
|
/// <para>For windowed browsers accessibility will be enabled in Complete mode
|
||||||
/// For windowed browsers accessibility will be enabled in Complete mode
|
|
||||||
/// (which corresponds to kAccessibilityModeComplete in Chromium). In this
|
/// (which corresponds to kAccessibilityModeComplete in Chromium). In this
|
||||||
/// mode all platform accessibility objects will be created and managed by
|
/// mode all platform accessibility objects will be created and managed by
|
||||||
/// Chromium's internal implementation. The client needs only to detect the
|
/// Chromium's internal implementation. The client needs only to detect the
|
||||||
/// screen reader and call this function appropriately. For example, on macOS
|
/// screen reader and call this function appropriately. For example, on macOS
|
||||||
/// the client can handle the @"AXEnhancedUserStructure" accessibility
|
/// the client can handle the @"AXEnhancedUserStructure" accessibility
|
||||||
/// attribute to detect VoiceOver state changes and on Windows the client can
|
/// attribute to detect VoiceOver state changes and on Windows the client can
|
||||||
/// handle WM_GETOBJECT with OBJID_CLIENT to detect accessibility readers.
|
/// handle WM_GETOBJECT with OBJID_CLIENT to detect accessibility readers.</para>
|
||||||
///
|
/// <para>For windowless browsers accessibility will be enabled in TreeOnly mode
|
||||||
/// For windowless browsers accessibility will be enabled in TreeOnly mode
|
|
||||||
/// (which corresponds to kAccessibilityModeWebContentsOnly in Chromium). In
|
/// (which corresponds to kAccessibilityModeWebContentsOnly in Chromium). In
|
||||||
/// this mode renderer accessibility is enabled, the full tree is computed,
|
/// this mode renderer accessibility is enabled, the full tree is computed,
|
||||||
/// and events are passed to CefAccessibiltyHandler, but platform
|
/// and events are passed to CefAccessibiltyHandler, but platform
|
||||||
/// accessibility objects are not created. The client may implement platform
|
/// accessibility objects are not created. The client may implement platform
|
||||||
/// accessibility objects using CefAccessibiltyHandler callbacks if desired.
|
/// accessibility objects using CefAccessibiltyHandler callbacks if desired.</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
procedure SetAccessibilityState(accessibilityState: TCefState);
|
procedure SetAccessibilityState(accessibilityState: TCefState);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -1398,29 +1440,28 @@ type
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
procedure DragSourceSystemDragEnded;
|
procedure DragSourceSystemDragEnded;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Begins a new composition or updates the existing composition. Blink has a
|
/// <para>Begins a new composition or updates the existing composition. Blink has a
|
||||||
/// special node (a composition node) that allows the input function to change
|
/// special node (a composition node) that allows the input function to change
|
||||||
/// text without affecting other DOM nodes. |text| is the optional text that
|
/// text without affecting other DOM nodes. |text| is the optional text that
|
||||||
/// will be inserted into the composition node. |underlines| is an optional
|
/// will be inserted into the composition node. |underlines| is an optional
|
||||||
/// set of ranges that will be underlined in the resulting text.
|
/// set of ranges that will be underlined in the resulting text.</para>
|
||||||
/// |replacement_range| is an optional range of the existing text that will be
|
/// <para>|replacement_range| is an optional range of the existing text that will be
|
||||||
/// replaced. |selection_range| is an optional range of the resulting text
|
/// replaced. |selection_range| is an optional range of the resulting text
|
||||||
/// that will be selected after insertion or replacement. The
|
/// that will be selected after insertion or replacement. The
|
||||||
/// |replacement_range| value is only used on OS X.
|
/// |replacement_range| value is only used on OS X.</para>
|
||||||
///
|
/// <para>This function may be called multiple times as the composition changes.
|
||||||
/// This function may be called multiple times as the composition changes.
|
|
||||||
/// When the client is done making changes the composition should either be
|
/// When the client is done making changes the composition should either be
|
||||||
/// canceled or completed. To cancel the composition call
|
/// canceled or completed. To cancel the composition call
|
||||||
/// ImeCancelComposition. To complete the composition call either
|
/// ImeCancelComposition. To complete the composition call either
|
||||||
/// ImeCommitText or ImeFinishComposingText. Completion is usually signaled
|
/// ImeCommitText or ImeFinishComposingText. Completion is usually signaled
|
||||||
/// when:
|
/// when:</para>
|
||||||
///
|
/// <code>
|
||||||
/// 1. The client receives a WM_IME_COMPOSITION message with a GCS_RESULTSTR
|
/// 1. The client receives a WM_IME_COMPOSITION message with a GCS_RESULTSTR
|
||||||
/// flag (on Windows), or;
|
/// flag (on Windows), or;
|
||||||
/// 2. The client receives a "commit" signal of GtkIMContext (on Linux), or;
|
/// 2. The client receives a "commit" signal of GtkIMContext (on Linux), or;
|
||||||
/// 3. insertText of NSTextInput is called (on Mac).
|
/// 3. insertText of NSTextInput is called (on Mac).
|
||||||
///
|
/// </code>
|
||||||
/// This function is only used when window rendering is disabled.
|
/// <para>This function is only used when window rendering is disabled.</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
procedure IMESetComposition(const text: ustring; const underlines : TCefCompositionUnderlineDynArray; const replacement_range, selection_range : PCefRange);
|
procedure IMESetComposition(const text: ustring; const underlines : TCefCompositionUnderlineDynArray; const replacement_range, selection_range : PCefRange);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -1487,25 +1528,24 @@ type
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
procedure NotifyCurrentRoutes;
|
procedure NotifyCurrentRoutes;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Create a new route between |source| and |sink|. Source and sink must be
|
/// <para>Create a new route between |source| and |sink|. Source and sink must be
|
||||||
/// valid, compatible (as reported by ICefMediaSink.IsCompatibleWith), and
|
/// valid, compatible (as reported by ICefMediaSink.IsCompatibleWith), and
|
||||||
/// a route between them must not already exist. |callback| will be executed
|
/// a route between them must not already exist. |callback| will be executed
|
||||||
/// on success or failure. If route creation succeeds it will also trigger an
|
/// on success or failure. If route creation succeeds it will also trigger an
|
||||||
/// asynchronous call to ICefMediaObserver.OnRoutes on all registered
|
/// asynchronous call to ICefMediaObserver.OnRoutes on all registered
|
||||||
/// observers.
|
/// observers.</para>
|
||||||
/// This procedure is asynchronous and the result, ICefMediaRoute and the error
|
/// <para>This procedure is asynchronous and the result, ICefMediaRoute and the error
|
||||||
/// message will be available in the TChromium.OnMediaRouteCreateFinished event.
|
/// message will be available in the TChromium.OnMediaRouteCreateFinished event.</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
procedure CreateRoute(const source: ICefMediaSource; const sink: ICefMediaSink);
|
procedure CreateRoute(const source: ICefMediaSource; const sink: ICefMediaSink);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Asynchronously retrieves device info.
|
/// <para>Asynchronously retrieves device info.</para>
|
||||||
/// This procedure will trigger OnMediaSinkDeviceInfo with the device info.
|
/// <para>This procedure will trigger OnMediaSinkDeviceInfo with the device info.</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
procedure GetDeviceInfo(const aMediaSink: ICefMediaSink);
|
procedure GetDeviceInfo(const aMediaSink: ICefMediaSink);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Load an extension.
|
/// <para>Load an extension.</para>
|
||||||
///
|
/// <para>If extension resources will be read from disk using the default load
|
||||||
/// If extension resources will be read from disk using the default load
|
|
||||||
/// implementation then |root_directory| should be the absolute path to the
|
/// implementation then |root_directory| should be the absolute path to the
|
||||||
/// extension resources directory and |manifest| should be NULL. If extension
|
/// extension resources directory and |manifest| should be NULL. If extension
|
||||||
/// resources will be provided by the client (e.g. via cef_request_handler_t
|
/// resources will be provided by the client (e.g. via cef_request_handler_t
|
||||||
@ -1513,32 +1553,28 @@ type
|
|||||||
/// component unique to the extension (if not absolute this will be internally
|
/// component unique to the extension (if not absolute this will be internally
|
||||||
/// prefixed with the PK_DIR_RESOURCES path) and |manifest| should contain the
|
/// prefixed with the PK_DIR_RESOURCES path) and |manifest| should contain the
|
||||||
/// contents that would otherwise be read from the "manifest.json" file on
|
/// contents that would otherwise be read from the "manifest.json" file on
|
||||||
/// disk.
|
/// disk.</para>
|
||||||
///
|
/// <para>The loaded extension will be accessible in all contexts sharing the same
|
||||||
/// The loaded extension will be accessible in all contexts sharing the same
|
|
||||||
/// storage (HasExtension returns true (1)). However, only the context on
|
/// storage (HasExtension returns true (1)). However, only the context on
|
||||||
/// which this function was called is considered the loader (DidLoadExtension
|
/// which this function was called is considered the loader (DidLoadExtension
|
||||||
/// returns true (1)) and only the loader will receive
|
/// returns true (1)) and only the loader will receive
|
||||||
/// cef_request_context_handler_t callbacks for the extension.
|
/// TCustomRequestContextHandler callbacks for the extension.</para>
|
||||||
///
|
/// <para>TCustomExtensionHandler.OnExtensionLoaded will be called on load success
|
||||||
/// cef_extension_handler_t::OnExtensionLoaded will be called on load success
|
/// or TCustomExtensionHandler.OnExtensionLoadFailed will be called on load
|
||||||
/// or cef_extension_handler_t::OnExtensionLoadFailed will be called on load
|
/// failure.</para>
|
||||||
/// failure.
|
/// <para>If the extension specifies a background script via the "background"
|
||||||
///
|
/// manifest key then TCustomExtensionHandler.OnBeforeBackgroundBrowser will
|
||||||
/// If the extension specifies a background script via the "background"
|
|
||||||
/// manifest key then cef_extension_handler_t::OnBeforeBackgroundBrowser will
|
|
||||||
/// be called to create the background browser. See that function for
|
/// be called to create the background browser. See that function for
|
||||||
/// additional information about background scripts.
|
/// additional information about background scripts.</para>
|
||||||
///
|
/// <para>For visible extension views the client application should evaluate the
|
||||||
/// For visible extension views the client application should evaluate the
|
|
||||||
/// manifest to determine the correct extension URL to load and then pass that
|
/// manifest to determine the correct extension URL to load and then pass that
|
||||||
/// URL to the cef_browser_host_t::CreateBrowser* function after the extension
|
/// URL to the ICefBrowserHost.CreateBrowser* function after the extension
|
||||||
/// has loaded. For example, the client can look for the "browser_action"
|
/// has loaded. For example, the client can look for the "browser_action"
|
||||||
/// manifest key as documented at
|
/// manifest key as documented at
|
||||||
/// https://developer.chrome.com/extensions/browserAction. Extension URLs take
|
/// https://developer.chrome.com/extensions/browserAction. Extension URLs take
|
||||||
/// the form "chrome-extension://<extension_id>/<path>".
|
/// the form "chrome-extension://<extension_id>/<path>".</para>
|
||||||
///
|
/// <para>Browsers that host extensions differ from normal browsers as follows:</para>
|
||||||
/// Browsers that host extensions differ from normal browsers as follows:
|
/// <code>
|
||||||
/// - Can access chrome.* JavaScript APIs if allowed by the manifest. Visit
|
/// - Can access chrome.* JavaScript APIs if allowed by the manifest. Visit
|
||||||
/// chrome://extensions-support for the list of extension APIs currently
|
/// chrome://extensions-support for the list of extension APIs currently
|
||||||
/// supported by CEF.
|
/// supported by CEF.
|
||||||
@ -1546,9 +1582,9 @@ type
|
|||||||
/// - Pinch-zooming is disabled.
|
/// - Pinch-zooming is disabled.
|
||||||
/// - CefBrowserHost::GetExtension returns the hosted extension.
|
/// - CefBrowserHost::GetExtension returns the hosted extension.
|
||||||
/// - CefBrowserHost::IsBackgroundHost returns true for background hosts.
|
/// - CefBrowserHost::IsBackgroundHost returns true for background hosts.
|
||||||
///
|
/// </code>
|
||||||
/// See https://developer.chrome.com/extensions for extension implementation
|
/// <para>See https://developer.chrome.com/extensions for extension implementation
|
||||||
/// and usage documentation.
|
/// and usage documentation.</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
function LoadExtension(const root_directory: ustring; const manifest: ICefDictionaryValue = nil; const handler: ICefExtensionHandler = nil; const requestContext : ICefRequestContext = nil) : boolean;
|
function LoadExtension(const root_directory: ustring; const manifest: ICefDictionaryValue = nil; const handler: ICefExtensionHandler = nil; const requestContext : ICefRequestContext = nil) : boolean;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -1586,18 +1622,17 @@ type
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
function GetWebsiteSetting(const requesting_url, top_level_url: ustring; content_type: TCefContentSettingTypes): ICefValue;
|
function GetWebsiteSetting(const requesting_url, top_level_url: ustring; content_type: TCefContentSettingTypes): ICefValue;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets the current value for |content_type| for the specified URLs in the
|
/// <para>Sets the current value for |content_type| for the specified URLs in the
|
||||||
/// default scope. If both URLs are NULL, and the context is not incognito,
|
/// default scope. If both URLs are NULL, and the context is not incognito,
|
||||||
/// the default value will be set. Pass nullptr for |value| to remove the
|
/// the default value will be set. Pass nullptr for |value| to remove the
|
||||||
/// default value for this content type.
|
/// default value for this content type.</para>
|
||||||
///
|
/// <para>WARNING: Incorrect usage of this function may cause instability or
|
||||||
/// WARNING: Incorrect usage of this function may cause instability or
|
|
||||||
/// security issues in Chromium. Make sure that you first understand the
|
/// security issues in Chromium. Make sure that you first understand the
|
||||||
/// potential impact of any changes to |content_type| by reviewing the related
|
/// potential impact of any changes to |content_type| by reviewing the related
|
||||||
/// source code in Chromium. For example, if you plan to modify
|
/// source code in Chromium. For example, if you plan to modify
|
||||||
/// CEF_CONTENT_SETTING_TYPE_POPUPS, first review and understand the usage of
|
/// CEF_CONTENT_SETTING_TYPE_POPUPS, first review and understand the usage of
|
||||||
/// ContentSettingsType::POPUPS in Chromium:
|
/// ContentSettingsType::POPUPS in Chromium:
|
||||||
/// https://source.chromium.org/search?q=ContentSettingsType::POPUPS
|
/// https://source.chromium.org/search?q=ContentSettingsType::POPUPS</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
procedure SetWebsiteSetting(const requesting_url, top_level_url: ustring; content_type: TCefContentSettingTypes; const value: ICefValue);
|
procedure SetWebsiteSetting(const requesting_url, top_level_url: ustring; content_type: TCefContentSettingTypes; const value: ICefValue);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -1608,22 +1643,21 @@ type
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
function GetContentSetting(const requesting_url, top_level_url: ustring; content_type: TCefContentSettingTypes): TCefContentSettingValues;
|
function GetContentSetting(const requesting_url, top_level_url: ustring; content_type: TCefContentSettingTypes): TCefContentSettingValues;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets the current value for |content_type| for the specified URLs in the
|
/// <para>Sets the current value for |content_type| for the specified URLs in the
|
||||||
/// default scope. If both URLs are NULL, and the context is not incognito,
|
/// default scope. If both URLs are NULL, and the context is not incognito,
|
||||||
/// the default value will be set. Pass CEF_CONTENT_SETTING_VALUE_DEFAULT for
|
/// the default value will be set. Pass CEF_CONTENT_SETTING_VALUE_DEFAULT for
|
||||||
/// |value| to use the default value for this content type.
|
/// |value| to use the default value for this content type.</para>
|
||||||
///
|
/// <para>WARNING: Incorrect usage of this function may cause instability or
|
||||||
/// WARNING: Incorrect usage of this function may cause instability or
|
|
||||||
/// security issues in Chromium. Make sure that you first understand the
|
/// security issues in Chromium. Make sure that you first understand the
|
||||||
/// potential impact of any changes to |content_type| by reviewing the related
|
/// potential impact of any changes to |content_type| by reviewing the related
|
||||||
/// source code in Chromium. For example, if you plan to modify
|
/// source code in Chromium. For example, if you plan to modify
|
||||||
/// CEF_CONTENT_SETTING_TYPE_POPUPS, first review and understand the usage of
|
/// CEF_CONTENT_SETTING_TYPE_POPUPS, first review and understand the usage of
|
||||||
/// ContentSettingsType::POPUPS in Chromium:
|
/// ContentSettingsType::POPUPS in Chromium:
|
||||||
/// https://source.chromium.org/search?q=ContentSettingsType::POPUPS
|
/// https://source.chromium.org/search?q=ContentSettingsType::POPUPS</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
procedure SetContentSetting(const requesting_url, top_level_url: ustring; content_type: TCefContentSettingTypes; value: TCefContentSettingValues);
|
procedure SetContentSetting(const requesting_url, top_level_url: ustring; content_type: TCefContentSettingTypes; value: TCefContentSettingValues);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// First URL loaded by the browser after its creation.
|
/// First URL loaded by the browser after its creation.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
property DefaultUrl : ustring read FDefaultUrl write SetDefaultUrl;
|
property DefaultUrl : ustring read FDefaultUrl write SetDefaultUrl;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -1635,7 +1669,7 @@ type
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
property FontOptions : TChromiumFontOptions read FFontOptions write FFontOptions;
|
property FontOptions : TChromiumFontOptions read FFontOptions write FFontOptions;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Properties used to fill the TCefPdfPrintSettings record which is used in the TChromiumCore.PrintToPDF call.
|
/// Properties used to fill the TCefPdfPrintSettings record which is used in the TChromiumCore.PrintToPDF call.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
property PDFPrintOptions : TPDFPrintOptions read FPDFPrintOptions write FPDFPrintOptions;
|
property PDFPrintOptions : TPDFPrintOptions read FPDFPrintOptions write FPDFPrintOptions;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -2538,47 +2572,47 @@ type
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
property OnBeforeClose : TOnBeforeClose read FOnBeforeClose write FOnBeforeClose;
|
property OnBeforeClose : TOnBeforeClose read FOnBeforeClose write FOnBeforeClose;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called when a browser has recieved a request to close. This may result
|
/// <para>Called when a browser has recieved a request to close. This may result
|
||||||
/// directly from a call to ICefBrowserHost.*CloseBrowser or indirectly
|
/// directly from a call to ICefBrowserHost.*CloseBrowser or indirectly
|
||||||
/// if the browser is parented to a top-level window created by CEF and the
|
/// if the browser is parented to a top-level window created by CEF and the
|
||||||
/// user attempts to close that window (by clicking the 'X', for example). The
|
/// user attempts to close that window (by clicking the 'X', for example). The
|
||||||
/// OnClose function will be called after the JavaScript 'onunload' event
|
/// OnClose function will be called after the JavaScript 'onunload' event
|
||||||
/// has been fired.
|
/// has been fired.</para>
|
||||||
///
|
///
|
||||||
/// An application should handle top-level owner window close notifications by
|
/// <para>An application should handle top-level owner window close notifications by
|
||||||
/// calling ICefBrowserHost.TryCloseBrowser or
|
/// calling ICefBrowserHost.TryCloseBrowser or
|
||||||
/// ICefBrowserHost.CloseBrowser(false) instead of allowing the window
|
/// ICefBrowserHost.CloseBrowser(false) instead of allowing the window
|
||||||
/// to close immediately (see the examples below). This gives CEF an
|
/// to close immediately (see the examples below). This gives CEF an
|
||||||
/// opportunity to process the 'onbeforeunload' event and optionally cancel
|
/// opportunity to process the 'onbeforeunload' event and optionally cancel
|
||||||
/// the close before OnClose is called.
|
/// the close before OnClose is called.</para>
|
||||||
///
|
///
|
||||||
/// When windowed rendering is enabled CEF will internally create a window or
|
/// <para>When windowed rendering is enabled CEF will internally create a window or
|
||||||
/// view to host the browser. In that case returning false (0) from OnClose()
|
/// view to host the browser. In that case returning false (0) from OnClose()
|
||||||
/// will send the standard close notification to the browser's top-level owner
|
/// will send the standard close notification to the browser's top-level owner
|
||||||
/// window (e.g. WM_CLOSE on Windows, performClose: on OS X, "delete_event" on
|
/// window (e.g. WM_CLOSE on Windows, performClose: on OS X, "delete_event" on
|
||||||
/// Linux or ICefWindowDelegate.CanClose callback from Views). If the
|
/// Linux or ICefWindowDelegate.CanClose callback from Views). If the
|
||||||
/// browser's host window/view has already been destroyed (via view hierarchy
|
/// browser's host window/view has already been destroyed (via view hierarchy
|
||||||
/// tear-down, for example) then OnClose() will not be called for that
|
/// tear-down, for example) then OnClose() will not be called for that
|
||||||
/// browser since is no longer possible to cancel the close.
|
/// browser since is no longer possible to cancel the close.</para>
|
||||||
///
|
///
|
||||||
/// When windowed rendering is disabled returning false (0) from OnClose()
|
/// <para>When windowed rendering is disabled returning false (0) from OnClose()
|
||||||
/// will cause the browser object to be destroyed immediately.
|
/// will cause the browser object to be destroyed immediately.</para>
|
||||||
///
|
///
|
||||||
/// If the browser's top-level owner window requires a non-standard close
|
/// <para>If the browser's top-level owner window requires a non-standard close
|
||||||
/// notification then send that notification from OnClose() and return true
|
/// notification then send that notification from OnClose() and return true.</para>
|
||||||
/// (1).
|
|
||||||
///
|
///
|
||||||
/// The ICefLifeSpanHandler.OnBeforeClose function will be called
|
/// <para>The ICefLifeSpanHandler.OnBeforeClose function will be called
|
||||||
/// after OnClose() (if OnClose() is called) and immediately before the
|
/// after OnClose() (if OnClose() is called) and immediately before the
|
||||||
/// browser object is destroyed. The application should only exit after
|
/// browser object is destroyed. The application should only exit after
|
||||||
/// OnBeforeClose() has been called for all existing browsers.
|
/// OnBeforeClose() has been called for all existing browsers.</para>
|
||||||
///
|
///
|
||||||
/// The below examples describe what should happen during window close when
|
/// <para>The below examples describe what should happen during window close when
|
||||||
/// the browser is parented to an application-provided top-level window.
|
/// the browser is parented to an application-provided top-level window.</para>
|
||||||
///
|
///
|
||||||
/// Example 1: Using ICefBrowserHost.TryCloseBrowser(). This is
|
/// <para>Example 1: Using ICefBrowserHost.TryCloseBrowser(). This is
|
||||||
/// recommended for clients using standard close handling and windows created
|
/// recommended for clients using standard close handling and windows created
|
||||||
/// on the browser process UI thread.
|
/// on the browser process UI thread.</para>
|
||||||
|
/// <code>
|
||||||
/// 1. User clicks the window close button which sends a close notification
|
/// 1. User clicks the window close button which sends a close notification
|
||||||
/// to the application's top-level window.
|
/// to the application's top-level window.
|
||||||
/// 2. Application's top-level window receives the close notification and
|
/// 2. Application's top-level window receives the close notification and
|
||||||
@ -2598,11 +2632,12 @@ type
|
|||||||
/// 8. Application's top-level window is destroyed.
|
/// 8. Application's top-level window is destroyed.
|
||||||
/// 9. Application's OnBeforeClose() handler is called and the browser object is destroyed.
|
/// 9. Application's OnBeforeClose() handler is called and the browser object is destroyed.
|
||||||
/// 10. Application exits by calling cef_quit_message_loop() if no other browsers exist.
|
/// 10. Application exits by calling cef_quit_message_loop() if no other browsers exist.
|
||||||
///
|
/// </code>
|
||||||
/// Example 2: Using ICefBrowserHost::CloseBrowser(false) and
|
/// <para>Example 2: Using ICefBrowserHost::CloseBrowser(false) and
|
||||||
/// implementing the OnClose() callback. This is recommended for clients
|
/// implementing the OnClose() callback. This is recommended for clients
|
||||||
/// using non-standard close handling or windows that were not created on the
|
/// using non-standard close handling or windows that were not created on the
|
||||||
/// browser process UI thread.
|
/// browser process UI thread.</para>
|
||||||
|
/// <code>
|
||||||
/// 1. User clicks the window close button which sends a close notification
|
/// 1. User clicks the window close button which sends a close notification
|
||||||
/// to the application's top-level window.
|
/// to the application's top-level window.
|
||||||
/// 2. Application's top-level window receives the close notification and:
|
/// 2. Application's top-level window receives the close notification and:
|
||||||
@ -2622,6 +2657,7 @@ type
|
|||||||
/// 9. Application's top-level window is destroyed.
|
/// 9. Application's top-level window is destroyed.
|
||||||
/// 10. Application's OnBeforeClose() handler is called and the browser object is destroyed.
|
/// 10. Application's OnBeforeClose() handler is called and the browser object is destroyed.
|
||||||
/// 11. Application exits by calling cef_quit_message_loop() if no other browsers exist.
|
/// 11. Application exits by calling cef_quit_message_loop() if no other browsers exist.
|
||||||
|
/// </code>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// <para>This event will be called on the browser process CEF UI thread.</para>
|
/// <para>This event will be called on the browser process CEF UI thread.</para>
|
||||||
@ -2629,17 +2665,17 @@ type
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
property OnClose : TOnClose read FOnClose write FOnClose;
|
property OnClose : TOnClose read FOnClose write FOnClose;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called on the UI thread before browser navigation. Return true (1) to
|
/// <para>Called on the UI thread before browser navigation. Return true (1) to
|
||||||
/// cancel the navigation or false (0) to allow the navigation to proceed. The
|
/// cancel the navigation or false (0) to allow the navigation to proceed. The
|
||||||
/// |request| object cannot be modified in this callback.
|
/// |request| object cannot be modified in this callback.</para>
|
||||||
/// ICefLoadHandler.OnLoadingStateChange will be called twice in all
|
/// <para>ICefLoadHandler.OnLoadingStateChange will be called twice in all
|
||||||
/// cases. If the navigation is allowed ICefLoadHandler.OnLoadStart and
|
/// cases. If the navigation is allowed ICefLoadHandler.OnLoadStart and
|
||||||
/// ICefLoadHandler.OnLoadEnd will be called. If the navigation is
|
/// ICefLoadHandler.OnLoadEnd will be called. If the navigation is
|
||||||
/// canceled ICefLoadHandler.OnLoadError will be called with an
|
/// canceled ICefLoadHandler.OnLoadError will be called with an
|
||||||
/// |errorCode| value of ERR_ABORTED. The |user_gesture| value will be true
|
/// |errorCode| value of ERR_ABORTED. The |user_gesture| value will be true
|
||||||
/// (1) if the browser navigated via explicit user gesture (e.g. clicking a
|
/// (1) if the browser navigated via explicit user gesture (e.g. clicking a
|
||||||
/// link) or false (0) if it navigated automatically (e.g. via the
|
/// link) or false (0) if it navigated automatically (e.g. via the
|
||||||
/// DomContentLoaded event).
|
/// DomContentLoaded event).</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// <para>This event will be called on the browser process CEF UI thread.</para>
|
/// <para>This event will be called on the browser process CEF UI thread.</para>
|
||||||
@ -2809,7 +2845,7 @@ type
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
property OnResourceRedirect : TOnResourceRedirect read FOnResourceRedirect write FOnResourceRedirect;
|
property OnResourceRedirect : TOnResourceRedirect read FOnResourceRedirect write FOnResourceRedirect;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called on the IO thread when a resource response is received. The
|
/// <para>Called on the IO thread when a resource response is received. The
|
||||||
/// |browser| and |frame| values represent the source of the request, and may
|
/// |browser| and |frame| values represent the source of the request, and may
|
||||||
/// be NULL for requests originating from service workers or ICefUrlRequest.
|
/// be NULL for requests originating from service workers or ICefUrlRequest.
|
||||||
/// To allow the resource load to proceed without modification return false
|
/// To allow the resource load to proceed without modification return false
|
||||||
@ -2817,10 +2853,9 @@ type
|
|||||||
/// and return true (1). Modification of the request URL will be treated as a
|
/// and return true (1). Modification of the request URL will be treated as a
|
||||||
/// redirect. Requests handled using the default network loader cannot be
|
/// redirect. Requests handled using the default network loader cannot be
|
||||||
/// redirected in this callback. The |response| object cannot be modified in
|
/// redirected in this callback. The |response| object cannot be modified in
|
||||||
/// this callback.
|
/// this callback.</para>
|
||||||
///
|
/// <para>WARNING: Redirecting using this function is deprecated. Use
|
||||||
/// WARNING: Redirecting using this function is deprecated. Use
|
/// OnBeforeResourceLoad or GetResourceHandler to perform redirects.</para>
|
||||||
/// OnBeforeResourceLoad or GetResourceHandler to perform redirects.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// <para>This event will be called on the browser process CEF IO thread.</para>
|
/// <para>This event will be called on the browser process CEF IO thread.</para>
|
||||||
@ -3038,18 +3073,16 @@ type
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
property OnTouchHandleStateChanged : TOnTouchHandleStateChanged read FOnTouchHandleStateChanged write FOnTouchHandleStateChanged;
|
property OnTouchHandleStateChanged : TOnTouchHandleStateChanged read FOnTouchHandleStateChanged write FOnTouchHandleStateChanged;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called when the user starts dragging content in the web view. Contextual
|
/// <para>Called when the user starts dragging content in the web view. Contextual
|
||||||
/// information about the dragged content is supplied by |drag_data|. (|x|,
|
/// information about the dragged content is supplied by |drag_data|. (|x|,
|
||||||
/// |y|) is the drag start location in screen coordinates. OS APIs that run a
|
/// |y|) is the drag start location in screen coordinates. OS APIs that run a
|
||||||
/// system message loop may be used within the StartDragging call.
|
/// system message loop may be used within the StartDragging call.</para>
|
||||||
///
|
/// <para>Return false (0) to abort the drag operation. Don't call any of
|
||||||
/// Return false (0) to abort the drag operation. Don't call any of
|
/// ICefBrowserHost.DragSource*Ended* functions after returning false (0).</para>
|
||||||
/// ICefBrowserHost.DragSource*Ended* functions after returning false (0).
|
/// <para>Return true (1) to handle the drag operation. Call
|
||||||
///
|
|
||||||
/// Return true (1) to handle the drag operation. Call
|
|
||||||
/// ICefBrowserHost.DragSourceEndedAt and DragSourceSystemDragEnded either
|
/// ICefBrowserHost.DragSourceEndedAt and DragSourceSystemDragEnded either
|
||||||
/// synchronously or asynchronously to inform the web view that the drag
|
/// synchronously or asynchronously to inform the web view that the drag
|
||||||
/// operation has ended.
|
/// operation has ended.</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// <para>This event will be called on the browser process CEF UI thread.</para>
|
/// <para>This event will be called on the browser process CEF UI thread.</para>
|
||||||
@ -3270,15 +3303,14 @@ type
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
property OnAudioStreamError : TOnAudioStreamErrorEvent read FOnAudioStreamError write FOnAudioStreamError;
|
property OnAudioStreamError : TOnAudioStreamErrorEvent read FOnAudioStreamError write FOnAudioStreamError;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Method that will be called on receipt of a DevTools protocol message.
|
/// <para>Method that will be called on receipt of a DevTools protocol message.
|
||||||
/// |browser| is the originating browser instance. |message| is a UTF8-encoded
|
/// |browser| is the originating browser instance. |message| is a UTF8-encoded
|
||||||
/// JSON dictionary representing either a function result or an event.
|
/// JSON dictionary representing either a function result or an event.</para>
|
||||||
/// |message| is only valid for the scope of this callback and should be
|
/// <para>|message| is only valid for the scope of this callback and should be
|
||||||
/// copied if necessary. Return true (1) if the message was handled or false
|
/// copied if necessary. Return true (1) if the message was handled or false
|
||||||
/// (0) if the message should be further processed and passed to the
|
/// (0) if the message should be further processed and passed to the
|
||||||
/// OnDevToolsMethodResult or OnDevToolsEvent functions as appropriate.
|
/// OnDevToolsMethodResult or OnDevToolsEvent functions as appropriate.</para>
|
||||||
///
|
/// <para>Method result dictionaries include an "id" (int) value that identifies the
|
||||||
/// Method result dictionaries include an "id" (int) value that identifies the
|
|
||||||
/// orginating function call sent from
|
/// orginating function call sent from
|
||||||
/// ICefBrowserHost.SendDevToolsMessage, and optionally either a "result"
|
/// ICefBrowserHost.SendDevToolsMessage, and optionally either a "result"
|
||||||
/// (dictionary) or "error" (dictionary) value. The "error" dictionary will
|
/// (dictionary) or "error" (dictionary) value. The "error" dictionary will
|
||||||
@ -3289,7 +3321,7 @@ type
|
|||||||
/// supported function calls and the expected "result" or "params" dictionary
|
/// supported function calls and the expected "result" or "params" dictionary
|
||||||
/// contents. JSON dictionaries can be parsed using the CefParseJSON function
|
/// contents. JSON dictionaries can be parsed using the CefParseJSON function
|
||||||
/// if desired, however be aware of performance considerations when parsing
|
/// if desired, however be aware of performance considerations when parsing
|
||||||
/// large messages (some of which may exceed 1MB in size).
|
/// large messages (some of which may exceed 1MB in size).</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// <para>This event will be called on the browser process CEF UI thread.</para>
|
/// <para>This event will be called on the browser process CEF UI thread.</para>
|
||||||
@ -3297,15 +3329,14 @@ type
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
property OnDevToolsMessage : TOnDevToolsMessageEvent read FOnDevToolsMessage write FOnDevToolsMessage;
|
property OnDevToolsMessage : TOnDevToolsMessageEvent read FOnDevToolsMessage write FOnDevToolsMessage;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Method that will be called on receipt of a DevTools protocol message.
|
/// <para>Method that will be called on receipt of a DevTools protocol message.
|
||||||
/// |browser| is the originating browser instance. |message| is a UTF8-encoded
|
/// |browser| is the originating browser instance. |message| is a UTF8-encoded
|
||||||
/// JSON dictionary representing either a function result or an event.
|
/// JSON dictionary representing either a function result or an event.</para>
|
||||||
/// |message| is only valid for the scope of this callback and should be
|
/// <para>|message| is only valid for the scope of this callback and should be
|
||||||
/// copied if necessary. Return true (1) if the message was handled or false
|
/// copied if necessary. Return true (1) if the message was handled or false
|
||||||
/// (0) if the message should be further processed and passed to the
|
/// (0) if the message should be further processed and passed to the
|
||||||
/// OnDevToolsMethodResult or OnDevToolsEvent functions as appropriate.
|
/// OnDevToolsMethodResult or OnDevToolsEvent functions as appropriate.</para>
|
||||||
///
|
/// <para>Method result dictionaries include an "id" (int) value that identifies the
|
||||||
/// Method result dictionaries include an "id" (int) value that identifies the
|
|
||||||
/// orginating function call sent from
|
/// orginating function call sent from
|
||||||
/// ICefBrowserHost.SendDevToolsMessage, and optionally either a "result"
|
/// ICefBrowserHost.SendDevToolsMessage, and optionally either a "result"
|
||||||
/// (dictionary) or "error" (dictionary) value. The "error" dictionary will
|
/// (dictionary) or "error" (dictionary) value. The "error" dictionary will
|
||||||
@ -3316,7 +3347,7 @@ type
|
|||||||
/// supported function calls and the expected "result" or "params" dictionary
|
/// supported function calls and the expected "result" or "params" dictionary
|
||||||
/// contents. JSON dictionaries can be parsed using the CefParseJSON function
|
/// contents. JSON dictionaries can be parsed using the CefParseJSON function
|
||||||
/// if desired, however be aware of performance considerations when parsing
|
/// if desired, however be aware of performance considerations when parsing
|
||||||
/// large messages (some of which may exceed 1MB in size).
|
/// large messages (some of which may exceed 1MB in size).</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// <para>This event will be called on the browser process CEF UI thread.</para>
|
/// <para>This event will be called on the browser process CEF UI thread.</para>
|
||||||
@ -3324,16 +3355,16 @@ type
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
property OnDevToolsRawMessage : TOnDevToolsRawMessageEvent read FOnDevToolsRawMessage write FOnDevToolsRawMessage;
|
property OnDevToolsRawMessage : TOnDevToolsRawMessageEvent read FOnDevToolsRawMessage write FOnDevToolsRawMessage;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Method that will be called after attempted execution of a DevTools
|
/// <para>Method that will be called after attempted execution of a DevTools
|
||||||
/// protocol function. |browser| is the originating browser instance.
|
/// protocol function. |browser| is the originating browser instance.</para>
|
||||||
/// |message_id| is the "id" value that identifies the originating function
|
/// <para>|message_id| is the "id" value that identifies the originating function
|
||||||
/// call message. If the function succeeded |success| will be true (1) and
|
/// call message. If the function succeeded |success| will be true (1) and
|
||||||
/// |result| will be the UTF8-encoded JSON "result" dictionary value (which
|
/// |result| will be the UTF8-encoded JSON "result" dictionary value (which
|
||||||
/// may be NULL). If the function failed |success| will be false (0) and
|
/// may be NULL). If the function failed |success| will be false (0) and
|
||||||
/// |result| will be the UTF8-encoded JSON "error" dictionary value. |result|
|
/// |result| will be the UTF8-encoded JSON "error" dictionary value. |result|
|
||||||
/// is only valid for the scope of this callback and should be copied if
|
/// is only valid for the scope of this callback and should be copied if
|
||||||
/// necessary. See the OnDevToolsMessage documentation for additional details
|
/// necessary. See the OnDevToolsMessage documentation for additional details
|
||||||
/// on |result| contents.
|
/// on |result| contents.</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// <para>This event will be called on the browser process CEF UI thread.</para>
|
/// <para>This event will be called on the browser process CEF UI thread.</para>
|
||||||
@ -3341,16 +3372,16 @@ type
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
property OnDevToolsMethodResult : TOnDevToolsMethodResultEvent read FOnDevToolsMethodResult write FOnDevToolsMethodResult;
|
property OnDevToolsMethodResult : TOnDevToolsMethodResultEvent read FOnDevToolsMethodResult write FOnDevToolsMethodResult;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Method that will be called after attempted execution of a DevTools
|
/// <para>Method that will be called after attempted execution of a DevTools
|
||||||
/// protocol function. |browser| is the originating browser instance.
|
/// protocol function. |browser| is the originating browser instance.</para>
|
||||||
/// |message_id| is the "id" value that identifies the originating function
|
/// <para>|message_id| is the "id" value that identifies the originating function
|
||||||
/// call message. If the function succeeded |success| will be true (1) and
|
/// call message. If the function succeeded |success| will be true (1) and
|
||||||
/// |result| will be the UTF8-encoded JSON "result" dictionary value (which
|
/// |result| will be the UTF8-encoded JSON "result" dictionary value (which
|
||||||
/// may be NULL). If the function failed |success| will be false (0) and
|
/// may be NULL). If the function failed |success| will be false (0) and
|
||||||
/// |result| will be the UTF8-encoded JSON "error" dictionary value. |result|
|
/// |result| will be the UTF8-encoded JSON "error" dictionary value. |result|
|
||||||
/// is only valid for the scope of this callback and should be copied if
|
/// is only valid for the scope of this callback and should be copied if
|
||||||
/// necessary. See the OnDevToolsMessage documentation for additional details
|
/// necessary. See the OnDevToolsMessage documentation for additional details
|
||||||
/// on |result| contents.
|
/// on |result| contents.</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// <para>This event will be called on the browser process CEF UI thread.</para>
|
/// <para>This event will be called on the browser process CEF UI thread.</para>
|
||||||
@ -3404,7 +3435,6 @@ type
|
|||||||
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/capi/cef_devtools_message_observer_capi.h">CEF source file: /include/capi/cef_devtools_message_observer_capi.h (cef_dev_tools_message_observer_t)</see></para>
|
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/capi/cef_devtools_message_observer_capi.h">CEF source file: /include/capi/cef_devtools_message_observer_capi.h (cef_dev_tools_message_observer_t)</see></para>
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
property OnDevToolsAgentDetached : TOnDevToolsAgentDetachedEvent read FOnDevToolsAgentDetached write FOnDevToolsAgentDetached;
|
property OnDevToolsAgentDetached : TOnDevToolsAgentDetachedEvent read FOnDevToolsAgentDetached write FOnDevToolsAgentDetached;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called if the ICefRequestContext.LoadExtension request fails. |result|
|
/// Called if the ICefRequestContext.LoadExtension request fails. |result|
|
||||||
/// will be the error code.
|
/// will be the error code.
|
||||||
@ -3687,17 +3717,17 @@ type
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
property OnIsChromeToolbarButtonVisible : TOnIsChromeToolbarButtonVisibleEvent read FOnIsChromeToolbarButtonVisible write FOnIsChromeToolbarButtonVisible;
|
property OnIsChromeToolbarButtonVisible : TOnIsChromeToolbarButtonVisibleEvent read FOnIsChromeToolbarButtonVisible write FOnIsChromeToolbarButtonVisible;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called when a page requests permission to access media.
|
/// <para>Called when a page requests permission to access media.
|
||||||
/// |requesting_origin| is the URL origin requesting permission.
|
/// |requesting_origin| is the URL origin requesting permission.</para>
|
||||||
/// |requested_permissions| is a combination of values from
|
/// <para>|requested_permissions| is a combination of values from
|
||||||
/// TCefMediaAccessPermissionTypes that represent the requested
|
/// TCefMediaAccessPermissionTypes that represent the requested
|
||||||
/// permissions. Return true (1) and call ICefMediaAccessCallback
|
/// permissions. Return true (1) and call ICefMediaAccessCallback
|
||||||
/// functions either in this function or at a later time to continue or cancel
|
/// functions either in this function or at a later time to continue or cancel
|
||||||
/// the request. Return false (0) to proceed with default handling. With the
|
/// the request. Return false (0) to proceed with default handling. With the
|
||||||
/// Chrome runtime, default handling will display the permission request UI.
|
/// Chrome runtime, default handling will display the permission request UI.</para>
|
||||||
/// With the Alloy runtime, default handling will deny the request. This
|
/// <para>With the Alloy runtime, default handling will deny the request. This
|
||||||
/// function will not be called if the "--enable-media-stream" command-line
|
/// function will not be called if the "--enable-media-stream" command-line
|
||||||
/// switch is used to grant all permissions.
|
/// switch is used to grant all permissions.</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// <para>This event will be called on the browser process CEF UI thread.</para>
|
/// <para>This event will be called on the browser process CEF UI thread.</para>
|
||||||
@ -3705,15 +3735,15 @@ type
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
property OnRequestMediaAccessPermission : TOnRequestMediaAccessPermissionEvent read FOnRequestMediaAccessPermission write FOnRequestMediaAccessPermission;
|
property OnRequestMediaAccessPermission : TOnRequestMediaAccessPermissionEvent read FOnRequestMediaAccessPermission write FOnRequestMediaAccessPermission;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called when a page should show a permission prompt. |prompt_id| uniquely
|
/// <para>Called when a page should show a permission prompt. |prompt_id| uniquely
|
||||||
/// identifies the prompt. |requesting_origin| is the URL origin requesting
|
/// identifies the prompt. |requesting_origin| is the URL origin requesting
|
||||||
/// permission. |requested_permissions| is a combination of values from
|
/// permission. |requested_permissions| is a combination of values from
|
||||||
/// TCefPermissionRequestTypes that represent the requested permissions.
|
/// TCefPermissionRequestTypes that represent the requested permissions.</para>
|
||||||
/// Return true (1) and call ICefPermissionPromptCallback.Continue either
|
/// <para>Return true (1) and call ICefPermissionPromptCallback.Continue either
|
||||||
/// in this function or at a later time to continue or cancel the request.
|
/// in this function or at a later time to continue or cancel the request.</para>
|
||||||
/// Return false (0) to proceed with default handling. With the Chrome
|
/// <para>Return false (0) to proceed with default handling. With the Chrome
|
||||||
/// runtime, default handling will display the permission prompt UI. With the
|
/// runtime, default handling will display the permission prompt UI. With the
|
||||||
/// Alloy runtime, default handling is CEF_PERMISSION_RESULT_IGNORE.
|
/// Alloy runtime, default handling is CEF_PERMISSION_RESULT_IGNORE.</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// <para>This event will be called on the browser process CEF UI thread.</para>
|
/// <para>This event will be called on the browser process CEF UI thread.</para>
|
||||||
|
@ -20,6 +20,9 @@ uses
|
|||||||
uCEFTypes;
|
uCEFTypes;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
/// <summary>
|
||||||
|
/// The TChromiumFontOptions properties are used to fill the TCefBrowserSettings record which is used during the browser creation.
|
||||||
|
/// </summary>
|
||||||
TChromiumFontOptions = class(TPersistent)
|
TChromiumFontOptions = class(TPersistent)
|
||||||
protected
|
protected
|
||||||
FStandardFontFamily : ustring;
|
FStandardFontFamily : ustring;
|
||||||
@ -35,19 +38,56 @@ type
|
|||||||
FMinimumFontSize : Integer;
|
FMinimumFontSize : Integer;
|
||||||
|
|
||||||
public
|
public
|
||||||
|
/// <summary>
|
||||||
|
/// Constructor of TChromiumFontOptions
|
||||||
|
/// </summary>
|
||||||
constructor Create; virtual;
|
constructor Create; virtual;
|
||||||
|
|
||||||
published
|
published
|
||||||
|
/// <summary>
|
||||||
|
/// Standard font family name.
|
||||||
|
/// </summary>
|
||||||
property StandardFontFamily : ustring read FStandardFontFamily write FStandardFontFamily;
|
property StandardFontFamily : ustring read FStandardFontFamily write FStandardFontFamily;
|
||||||
|
/// <summary>
|
||||||
|
/// Fixed font family name.
|
||||||
|
/// </summary>
|
||||||
property FixedFontFamily : ustring read FFixedFontFamily write FFixedFontFamily;
|
property FixedFontFamily : ustring read FFixedFontFamily write FFixedFontFamily;
|
||||||
|
/// <summary>
|
||||||
|
/// Serif font family name.
|
||||||
|
/// </summary>
|
||||||
property SerifFontFamily : ustring read FSerifFontFamily write FSerifFontFamily;
|
property SerifFontFamily : ustring read FSerifFontFamily write FSerifFontFamily;
|
||||||
|
/// <summary>
|
||||||
|
/// SansSerif font family name.
|
||||||
|
/// </summary>
|
||||||
property SansSerifFontFamily : ustring read FSansSerifFontFamily write FSansSerifFontFamily;
|
property SansSerifFontFamily : ustring read FSansSerifFontFamily write FSansSerifFontFamily;
|
||||||
|
/// <summary>
|
||||||
|
/// Cursive font family name.
|
||||||
|
/// </summary>
|
||||||
property CursiveFontFamily : ustring read FCursiveFontFamily write FCursiveFontFamily;
|
property CursiveFontFamily : ustring read FCursiveFontFamily write FCursiveFontFamily;
|
||||||
|
/// <summary>
|
||||||
|
/// Fantasy font family name.
|
||||||
|
/// </summary>
|
||||||
property FantasyFontFamily : ustring read FFantasyFontFamily write FFantasyFontFamily;
|
property FantasyFontFamily : ustring read FFantasyFontFamily write FFantasyFontFamily;
|
||||||
|
/// <summary>
|
||||||
|
/// Default font size.
|
||||||
|
/// </summary>
|
||||||
property DefaultFontSize : Integer read FDefaultFontSize write FDefaultFontSize default 0;
|
property DefaultFontSize : Integer read FDefaultFontSize write FDefaultFontSize default 0;
|
||||||
|
/// <summary>
|
||||||
|
/// Default fixed font size.
|
||||||
|
/// </summary>
|
||||||
property DefaultFixedFontSize : Integer read FDefaultFixedFontSize write FDefaultFixedFontSize default 0;
|
property DefaultFixedFontSize : Integer read FDefaultFixedFontSize write FDefaultFixedFontSize default 0;
|
||||||
|
/// <summary>
|
||||||
|
/// Minimum font size.
|
||||||
|
/// </summary>
|
||||||
property MinimumFontSize : Integer read FMinimumFontSize write FMinimumFontSize default 0;
|
property MinimumFontSize : Integer read FMinimumFontSize write FMinimumFontSize default 0;
|
||||||
|
/// <summary>
|
||||||
|
/// Minimum logical font size.
|
||||||
|
/// </summary>
|
||||||
property MinimumLogicalFontSize : Integer read FMinimumLogicalFontSize write FMinimumLogicalFontSize default 0;
|
property MinimumLogicalFontSize : Integer read FMinimumLogicalFontSize write FMinimumLogicalFontSize default 0;
|
||||||
|
/// <summary>
|
||||||
|
/// Controls the loading of fonts from remote sources. Also configurable using
|
||||||
|
/// the "disable-remote-fonts" command-line switch.
|
||||||
|
/// </summary>
|
||||||
property RemoteFonts : TCefState read FRemoteFontsDisabled write FRemoteFontsDisabled default STATE_DEFAULT;
|
property RemoteFonts : TCefState read FRemoteFontsDisabled write FRemoteFontsDisabled default STATE_DEFAULT;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -20,6 +20,9 @@ uses
|
|||||||
uCEFTypes, uCEFConstants;
|
uCEFTypes, uCEFConstants;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
/// <summary>
|
||||||
|
/// The TChromiumOptions properties used to fill the TCefBrowserSettings record which is used during the browser creation.
|
||||||
|
/// </summary>
|
||||||
TChromiumOptions = class(TPersistent)
|
TChromiumOptions = class(TPersistent)
|
||||||
protected
|
protected
|
||||||
FWindowlessFrameRate : Integer;
|
FWindowlessFrameRate : Integer;
|
||||||
@ -39,23 +42,110 @@ type
|
|||||||
FChromeStatusBubble : TCefState;
|
FChromeStatusBubble : TCefState;
|
||||||
|
|
||||||
public
|
public
|
||||||
|
/// <summary>
|
||||||
|
/// Constructor of TChromiumOptions
|
||||||
|
/// </summary>
|
||||||
constructor Create; virtual;
|
constructor Create; virtual;
|
||||||
|
|
||||||
published
|
published
|
||||||
|
/// <summary>
|
||||||
|
/// Controls whether JavaScript can be executed. Also configurable using the
|
||||||
|
/// "disable-javascript" command-line switch.
|
||||||
|
/// </summary>
|
||||||
property Javascript : TCefState read FJavascript write FJavascript default STATE_DEFAULT;
|
property Javascript : TCefState read FJavascript write FJavascript default STATE_DEFAULT;
|
||||||
|
/// <summary>
|
||||||
|
/// Controls whether JavaScript can be used to close windows that were not
|
||||||
|
/// opened via JavaScript. JavaScript can still be used to close windows that
|
||||||
|
/// were opened via JavaScript or that have no back/forward history. Also
|
||||||
|
/// configurable using the "disable-javascript-close-windows" command-line
|
||||||
|
/// switch.
|
||||||
|
/// </summary>
|
||||||
property JavascriptCloseWindows : TCefState read FJavascriptCloseWindows write FJavascriptCloseWindows default STATE_DEFAULT;
|
property JavascriptCloseWindows : TCefState read FJavascriptCloseWindows write FJavascriptCloseWindows default STATE_DEFAULT;
|
||||||
|
/// <summary>
|
||||||
|
/// Controls whether JavaScript can access the clipboard. Also configurable
|
||||||
|
/// using the "disable-javascript-access-clipboard" command-line switch.
|
||||||
|
/// </summary>
|
||||||
property JavascriptAccessClipboard : TCefState read FJavascriptAccessClipboard write FJavascriptAccessClipboard default STATE_DEFAULT;
|
property JavascriptAccessClipboard : TCefState read FJavascriptAccessClipboard write FJavascriptAccessClipboard default STATE_DEFAULT;
|
||||||
|
/// <summary>
|
||||||
|
/// Controls whether DOM pasting is supported in the editor via
|
||||||
|
/// execCommand("paste"). The |javascript_access_clipboard| setting must also
|
||||||
|
/// be enabled. Also configurable using the "disable-javascript-dom-paste"
|
||||||
|
/// command-line switch.
|
||||||
|
/// </summary>
|
||||||
property JavascriptDomPaste : TCefState read FJavascriptDomPaste write FJavascriptDomPaste default STATE_DEFAULT;
|
property JavascriptDomPaste : TCefState read FJavascriptDomPaste write FJavascriptDomPaste default STATE_DEFAULT;
|
||||||
|
/// <summary>
|
||||||
|
/// Controls whether image URLs will be loaded from the network. A cached
|
||||||
|
/// image will still be rendered if requested. Also configurable using the
|
||||||
|
/// "disable-image-loading" command-line switch.
|
||||||
|
/// </summary>
|
||||||
property ImageLoading : TCefState read FImageLoading write FImageLoading default STATE_DEFAULT;
|
property ImageLoading : TCefState read FImageLoading write FImageLoading default STATE_DEFAULT;
|
||||||
|
/// <summary>
|
||||||
|
/// Controls whether standalone images will be shrunk to fit the page. Also
|
||||||
|
/// configurable using the "image-shrink-standalone-to-fit" command-line
|
||||||
|
/// switch.
|
||||||
|
/// </summary>
|
||||||
property ImageShrinkStandaloneToFit : TCefState read FImageShrinkStandaloneToFit write FImageShrinkStandaloneToFit default STATE_DEFAULT;
|
property ImageShrinkStandaloneToFit : TCefState read FImageShrinkStandaloneToFit write FImageShrinkStandaloneToFit default STATE_DEFAULT;
|
||||||
|
/// <summary>
|
||||||
|
/// Controls whether text areas can be resized. Also configurable using the
|
||||||
|
/// "disable-text-area-resize" command-line switch.
|
||||||
|
/// </summary>
|
||||||
property TextAreaResize : TCefState read FTextAreaResize write FTextAreaResize default STATE_DEFAULT;
|
property TextAreaResize : TCefState read FTextAreaResize write FTextAreaResize default STATE_DEFAULT;
|
||||||
|
/// <summary>
|
||||||
|
/// Controls whether the tab key can advance focus to links. Also configurable
|
||||||
|
/// using the "disable-tab-to-links" command-line switch.
|
||||||
|
/// </summary>
|
||||||
property TabToLinks : TCefState read FTabToLinks write FTabToLinks default STATE_DEFAULT;
|
property TabToLinks : TCefState read FTabToLinks write FTabToLinks default STATE_DEFAULT;
|
||||||
|
/// <summary>
|
||||||
|
/// Controls whether local storage can be used. Also configurable using the
|
||||||
|
/// "disable-local-storage" command-line switch.
|
||||||
|
/// </summary>
|
||||||
property LocalStorage : TCefState read FLocalStorage write FLocalStorage default STATE_DEFAULT;
|
property LocalStorage : TCefState read FLocalStorage write FLocalStorage default STATE_DEFAULT;
|
||||||
|
/// <summary>
|
||||||
|
/// Controls whether databases can be used. Also configurable using the
|
||||||
|
/// "disable-databases" command-line switch.
|
||||||
|
/// </summary>
|
||||||
property Databases : TCefState read FDatabases write FDatabases default STATE_DEFAULT;
|
property Databases : TCefState read FDatabases write FDatabases default STATE_DEFAULT;
|
||||||
|
/// <summary>
|
||||||
|
/// Controls whether WebGL can be used. Note that WebGL requires hardware
|
||||||
|
/// support and may not work on all systems even when enabled. Also
|
||||||
|
/// configurable using the "disable-webgl" command-line switch.
|
||||||
|
/// </summary>
|
||||||
property Webgl : TCefState read FWebgl write FWebgl default STATE_DEFAULT;
|
property Webgl : TCefState read FWebgl write FWebgl default STATE_DEFAULT;
|
||||||
|
/// <summary>
|
||||||
|
/// Background color used for the browser before a document is loaded and when
|
||||||
|
/// no document color is specified. The alpha component must be either fully
|
||||||
|
/// opaque (0xFF) or fully transparent (0x00). If the alpha component is fully
|
||||||
|
/// opaque then the RGB components will be used as the background color. If
|
||||||
|
/// the alpha component is fully transparent for a windowed browser then the
|
||||||
|
/// TCefSettings.background_color value will be used. If the alpha component is
|
||||||
|
/// fully transparent for a windowless (off-screen) browser then transparent
|
||||||
|
/// painting will be enabled.
|
||||||
|
/// </summary>
|
||||||
property BackgroundColor : TCefColor read FBackgroundColor write FBackgroundColor default 0;
|
property BackgroundColor : TCefColor read FBackgroundColor write FBackgroundColor default 0;
|
||||||
|
/// <summary>
|
||||||
|
/// Comma delimited ordered list of language codes without any whitespace that
|
||||||
|
/// will be used in the "Accept-Language" HTTP header. May be set globally
|
||||||
|
/// using the TCefSettings.accept_language_list value. If both values are
|
||||||
|
/// empty then "en-US,en" will be used.
|
||||||
|
/// </summary>
|
||||||
property AcceptLanguageList : ustring read FAcceptLanguageList write FAcceptLanguageList;
|
property AcceptLanguageList : ustring read FAcceptLanguageList write FAcceptLanguageList;
|
||||||
|
/// <summary>
|
||||||
|
/// The maximum rate in frames per second (fps) that ICefRenderHandler.OnPaint
|
||||||
|
/// will be called for a windowless browser. The actual fps may be lower if
|
||||||
|
/// the browser cannot generate frames at the requested rate. The minimum
|
||||||
|
/// value is 1 and the maximum value is 60 (default 30). This value can also
|
||||||
|
/// be changed dynamically via ICefBrowserHost.SetWindowlessFrameRate.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// <para>Use CEF_OSR_SHARED_TEXTURES_FRAMERATE_DEFAULT as default value if the shared textures are enabled.</para>
|
||||||
|
/// <para>Use CEF_OSR_FRAMERATE_DEFAULT as default value if the shared textures are disabled.</para>
|
||||||
|
/// </remarks>
|
||||||
property WindowlessFrameRate : Integer read FWindowlessFrameRate write FWindowlessFrameRate default CEF_OSR_FRAMERATE_DEFAULT;
|
property WindowlessFrameRate : Integer read FWindowlessFrameRate write FWindowlessFrameRate default CEF_OSR_FRAMERATE_DEFAULT;
|
||||||
|
/// <summary>
|
||||||
|
/// Controls whether the Chrome status bubble will be used. Only supported
|
||||||
|
/// with the Chrome runtime. For details about the status bubble see
|
||||||
|
/// https://www.chromium.org/user-experience/status-bubble/
|
||||||
|
/// </summary>
|
||||||
property ChromeStatusBubble : TCefState read FChromeStatusBubble write FChromeStatusBubble default STATE_DEFAULT;
|
property ChromeStatusBubble : TCefState read FChromeStatusBubble write FChromeStatusBubble default STATE_DEFAULT;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -63,7 +153,7 @@ implementation
|
|||||||
|
|
||||||
constructor TChromiumOptions.Create;
|
constructor TChromiumOptions.Create;
|
||||||
begin
|
begin
|
||||||
FWindowlessFrameRate := CEF_OSR_FRAMERATE_DEFAULT; // Use CEF_OSR_SHARED_TEXTURES_FRAMERATE_DEFAULT if the shared textures are enabled.
|
FWindowlessFrameRate := CEF_OSR_FRAMERATE_DEFAULT;
|
||||||
FJavascript := STATE_DEFAULT;
|
FJavascript := STATE_DEFAULT;
|
||||||
FJavascriptCloseWindows := STATE_DEFAULT;
|
FJavascriptCloseWindows := STATE_DEFAULT;
|
||||||
FJavascriptAccessClipboard := STATE_DEFAULT;
|
FJavascriptAccessClipboard := STATE_DEFAULT;
|
||||||
|
@ -27,19 +27,21 @@ uses
|
|||||||
|
|
||||||
type
|
type
|
||||||
{$IFNDEF FPC}{$IFDEF DELPHI16_UP}[ComponentPlatformsAttribute(pfidWindows)]{$ENDIF}{$ENDIF}
|
{$IFNDEF FPC}{$IFDEF DELPHI16_UP}[ComponentPlatformsAttribute(pfidWindows)]{$ENDIF}{$ENDIF}
|
||||||
|
/// <summary>
|
||||||
{ TChromiumWindow }
|
/// <para>This component puts together a TChromium and a TCEFWindowParent to embbed a
|
||||||
|
/// web browser with only one component.</para>
|
||||||
|
/// <para>This component should only be used in extremely simple applications with simple browsers.
|
||||||
|
/// In other cases it's recomended using a TChromium with a TCEFWindowParent as shown in the
|
||||||
|
/// SimpleBrowser2 demo.</para>
|
||||||
|
/// </summary>
|
||||||
TChromiumWindow = class(TCEFLinkedWinControlBase)
|
TChromiumWindow = class(TCEFLinkedWinControlBase)
|
||||||
protected
|
protected
|
||||||
FChromium : TChromium;
|
FChromium : TChromium;
|
||||||
FOnClose : TNotifyEvent;
|
FOnClose : TNotifyEvent;
|
||||||
FOnBeforeClose : TNotifyEvent;
|
FOnBeforeClose : TNotifyEvent;
|
||||||
FOnAfterCreated : TNotifyEvent;
|
FOnAfterCreated : TNotifyEvent;
|
||||||
FUseSetFocus : boolean;
|
|
||||||
|
|
||||||
function GetChromium: TChromium; override;
|
function GetChromium: TChromium; override;
|
||||||
function GetUseSetFocus: Boolean; override;
|
|
||||||
function GetBrowserInitialized : boolean;
|
function GetBrowserInitialized : boolean;
|
||||||
{$IFDEF MSWINDOWS}
|
{$IFDEF MSWINDOWS}
|
||||||
procedure OnCloseMsg(var aMessage : TMessage); message CEF_DOONCLOSE;
|
procedure OnCloseMsg(var aMessage : TMessage); message CEF_DOONCLOSE;
|
||||||
@ -60,18 +62,166 @@ type
|
|||||||
public
|
public
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
procedure AfterConstruction; override;
|
procedure AfterConstruction; override;
|
||||||
|
/// <summary>
|
||||||
|
/// <para>Used to create the browser after the global request context has been
|
||||||
|
/// initialized. You need to set all properties and events before calling
|
||||||
|
/// this function because it will only create the internal handlers needed
|
||||||
|
/// for those events and the property values will be used in the browser
|
||||||
|
/// initialization.</para>
|
||||||
|
/// <para>The browser will be fully initialized when the TChromiumWindow.OnAfterCreated
|
||||||
|
/// event is triggered.</para>
|
||||||
|
/// </summary>
|
||||||
function CreateBrowser : boolean;
|
function CreateBrowser : boolean;
|
||||||
|
/// <summary>
|
||||||
|
/// Request that the browser close. The JavaScript 'onbeforeunload' event will
|
||||||
|
/// be fired. If |aForceClose| is false (0) the event handler, if any, will be
|
||||||
|
/// allowed to prompt the user and the user can optionally cancel the close.
|
||||||
|
/// If |aForceClose| is true (1) the prompt will not be displayed and the
|
||||||
|
/// close will proceed. Results in a call to
|
||||||
|
/// ICefLifeSpanHandler.DoClose() if the event handler allows the close
|
||||||
|
/// or if |aForceClose| is true (1). See ICefLifeSpanHandler.DoClose()
|
||||||
|
/// documentation for additional usage information.
|
||||||
|
/// </summary>
|
||||||
procedure CloseBrowser(aForceClose : boolean);
|
procedure CloseBrowser(aForceClose : boolean);
|
||||||
|
/// <summary>
|
||||||
|
/// Used to navigate to a URL.
|
||||||
|
/// </summary>
|
||||||
procedure LoadURL(const aURL : ustring);
|
procedure LoadURL(const aURL : ustring);
|
||||||
|
/// <summary>
|
||||||
|
/// Notify the browser that the window hosting it is about to be moved or
|
||||||
|
/// resized. This function is only used on Windows and Linux.
|
||||||
|
/// </summary>
|
||||||
procedure NotifyMoveOrResizeStarted;
|
procedure NotifyMoveOrResizeStarted;
|
||||||
|
/// <summary>
|
||||||
|
/// TChromium instance used by this component.
|
||||||
|
/// </summary>
|
||||||
property ChromiumBrowser : TChromium read GetChromium;
|
property ChromiumBrowser : TChromium read GetChromium;
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true when the browser is fully initialized and it's not being closed.
|
||||||
|
/// </summary>
|
||||||
property Initialized : boolean read GetBrowserInitialized;
|
property Initialized : boolean read GetBrowserInitialized;
|
||||||
|
|
||||||
published
|
published
|
||||||
property UseSetFocus : boolean read FUseSetFocus write FUseSetFocus default True;
|
/// <summary>
|
||||||
|
/// <para>Called when a browser has recieved a request to close. This may result
|
||||||
|
/// directly from a call to ICefBrowserHost.*CloseBrowser or indirectly
|
||||||
|
/// if the browser is parented to a top-level window created by CEF and the
|
||||||
|
/// user attempts to close that window (by clicking the 'X', for example). The
|
||||||
|
/// OnClose function will be called after the JavaScript 'onunload' event
|
||||||
|
/// has been fired.</para>
|
||||||
|
///
|
||||||
|
/// <para>An application should handle top-level owner window close notifications by
|
||||||
|
/// calling ICefBrowserHost.TryCloseBrowser or
|
||||||
|
/// ICefBrowserHost.CloseBrowser(false) instead of allowing the window
|
||||||
|
/// to close immediately (see the examples below). This gives CEF an
|
||||||
|
/// opportunity to process the 'onbeforeunload' event and optionally cancel
|
||||||
|
/// the close before OnClose is called.</para>
|
||||||
|
///
|
||||||
|
/// <para>When windowed rendering is enabled CEF will internally create a window or
|
||||||
|
/// view to host the browser. In that case returning false (0) from OnClose()
|
||||||
|
/// will send the standard close notification to the browser's top-level owner
|
||||||
|
/// window (e.g. WM_CLOSE on Windows, performClose: on OS X, "delete_event" on
|
||||||
|
/// Linux or ICefWindowDelegate.CanClose callback from Views). If the
|
||||||
|
/// browser's host window/view has already been destroyed (via view hierarchy
|
||||||
|
/// tear-down, for example) then OnClose() will not be called for that
|
||||||
|
/// browser since is no longer possible to cancel the close.</para>
|
||||||
|
///
|
||||||
|
/// <para>When windowed rendering is disabled returning false (0) from OnClose()
|
||||||
|
/// will cause the browser object to be destroyed immediately.</para>
|
||||||
|
///
|
||||||
|
/// <para>If the browser's top-level owner window requires a non-standard close
|
||||||
|
/// notification then send that notification from OnClose() and return true.</para>
|
||||||
|
///
|
||||||
|
/// <para>The ICefLifeSpanHandler.OnBeforeClose function will be called
|
||||||
|
/// after OnClose() (if OnClose() is called) and immediately before the
|
||||||
|
/// browser object is destroyed. The application should only exit after
|
||||||
|
/// OnBeforeClose() has been called for all existing browsers.</para>
|
||||||
|
///
|
||||||
|
/// <para>The below examples describe what should happen during window close when
|
||||||
|
/// the browser is parented to an application-provided top-level window.</para>
|
||||||
|
///
|
||||||
|
/// <para>Example 1: Using ICefBrowserHost.TryCloseBrowser(). This is
|
||||||
|
/// recommended for clients using standard close handling and windows created
|
||||||
|
/// on the browser process UI thread.</para>
|
||||||
|
/// <code>
|
||||||
|
/// 1. User clicks the window close button which sends a close notification
|
||||||
|
/// to the application's top-level window.
|
||||||
|
/// 2. Application's top-level window receives the close notification and
|
||||||
|
/// calls TryCloseBrowser() (which internally calls CloseBrowser(false)).
|
||||||
|
/// TryCloseBrowser() returns false so the client cancels the window
|
||||||
|
/// close.
|
||||||
|
/// 3. JavaScript 'onbeforeunload' handler executes and shows the close
|
||||||
|
/// confirmation dialog (which can be overridden via
|
||||||
|
/// ICefJSDialogHandler.OnBeforeUnloadDialog()).
|
||||||
|
/// 4. User approves the close.
|
||||||
|
/// 5. JavaScript 'onunload' handler executes.
|
||||||
|
/// 6. CEF sends a close notification to the application's top-level window
|
||||||
|
/// (because OnClose() returned false by default).
|
||||||
|
/// 7. Application's top-level window receives the close notification and
|
||||||
|
/// calls TryCloseBrowser(). TryCloseBrowser() returns true so the client
|
||||||
|
/// allows the window close.
|
||||||
|
/// 8. Application's top-level window is destroyed.
|
||||||
|
/// 9. Application's OnBeforeClose() handler is called and the browser object is destroyed.
|
||||||
|
/// 10. Application exits by calling cef_quit_message_loop() if no other browsers exist.
|
||||||
|
/// </code>
|
||||||
|
/// <para>Example 2: Using ICefBrowserHost::CloseBrowser(false) and
|
||||||
|
/// implementing the OnClose() callback. This is recommended for clients
|
||||||
|
/// using non-standard close handling or windows that were not created on the
|
||||||
|
/// browser process UI thread.</para>
|
||||||
|
/// <code>
|
||||||
|
/// 1. User clicks the window close button which sends a close notification
|
||||||
|
/// to the application's top-level window.
|
||||||
|
/// 2. Application's top-level window receives the close notification and:
|
||||||
|
/// A. Calls ICefBrowserHost.CloseBrowser(false).
|
||||||
|
/// B. Cancels the window close.
|
||||||
|
/// 3. JavaScript 'onbeforeunload' handler executes and shows the close
|
||||||
|
/// confirmation dialog (which can be overridden via
|
||||||
|
/// ICefJSDialogHandler.OnBeforeUnloadDialog()).
|
||||||
|
/// 4. User approves the close.
|
||||||
|
/// 5. JavaScript 'onunload' handler executes.
|
||||||
|
/// 6. Application's OnClose() handler is called. Application will:
|
||||||
|
/// A. Set a flag to indicate that the next close attempt will be allowed.
|
||||||
|
/// B. Return false.
|
||||||
|
/// 7. CEF sends an close notification to the application's top-level window.
|
||||||
|
/// 8. Application's top-level window receives the close notification and
|
||||||
|
/// allows the window to close based on the flag from #6B.
|
||||||
|
/// 9. Application's top-level window is destroyed.
|
||||||
|
/// 10. Application's OnBeforeClose() handler is called and the browser object is destroyed.
|
||||||
|
/// 11. Application exits by calling cef_quit_message_loop() if no other browsers exist.
|
||||||
|
/// </code>
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// <para>This event will be called on the main application thread.</para>
|
||||||
|
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/capi/cef_life_span_handler_capi.h">CEF source file: /include/capi/cef_life_span_handler_capi.h (cef_life_span_handler_t)</see></para>
|
||||||
|
/// </remarks>
|
||||||
property OnClose : TNotifyEvent read FOnClose write FOnClose;
|
property OnClose : TNotifyEvent read FOnClose write FOnClose;
|
||||||
|
/// <summary>
|
||||||
|
/// Called just before a browser is destroyed. Release all references to the
|
||||||
|
/// browser object and do not attempt to execute any functions on the browser
|
||||||
|
/// object (other than IsValid, GetIdentifier or IsSame) after this callback
|
||||||
|
/// returns. ICefFrameHandler callbacks related to final main frame
|
||||||
|
/// destruction will arrive after this callback and ICefBrowser.IsValid
|
||||||
|
/// will return false (0) at that time. Any in-progress network requests
|
||||||
|
/// associated with |browser| will be aborted when the browser is destroyed,
|
||||||
|
/// and ICefResourceRequestHandler callbacks related to those requests may
|
||||||
|
/// still arrive on the IO thread after this callback. See ICefFrameHandler
|
||||||
|
/// and OnClose() documentation for additional usage information.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// <para>This event will be called on the browser process CEF UI thread.</para>
|
||||||
|
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/capi/cef_life_span_handler_capi.h">CEF source file: /include/capi/cef_life_span_handler_capi.h (cef_life_span_handler_t)</see></para>
|
||||||
|
/// </remarks>
|
||||||
property OnBeforeClose : TNotifyEvent read FOnBeforeClose write FOnBeforeClose;
|
property OnBeforeClose : TNotifyEvent read FOnBeforeClose write FOnBeforeClose;
|
||||||
|
/// <summary>
|
||||||
|
/// Called after a new browser is created. It is now safe to begin performing
|
||||||
|
/// actions with |browser|. ICefFrameHandler callbacks related to initial
|
||||||
|
/// main frame creation will arrive before this callback. See
|
||||||
|
/// ICefFrameHandler documentation for additional usage information.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// <para>This event will be called on the main application thread.</para>
|
||||||
|
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/capi/cef_life_span_handler_capi.h">CEF source file: /include/capi/cef_life_span_handler_capi.h (cef_life_span_handler_t)</see></para>
|
||||||
|
/// </remarks>
|
||||||
property OnAfterCreated : TNotifyEvent read FOnAfterCreated write FOnAfterCreated;
|
property OnAfterCreated : TNotifyEvent read FOnAfterCreated write FOnAfterCreated;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -106,9 +256,6 @@ procedure Register;
|
|||||||
// *********************************************************
|
// *********************************************************
|
||||||
// *********************************************************
|
// *********************************************************
|
||||||
|
|
||||||
// This component should *ONLY* be used in emtremely simple applications with simple browsers.
|
|
||||||
// In other cases it's recomended using a TChromium with a TCEFWindowParent as shown in the
|
|
||||||
// SimpleBrowser2 demo.
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
@ -127,7 +274,6 @@ begin
|
|||||||
FOnClose := nil;
|
FOnClose := nil;
|
||||||
FOnBeforeClose := nil;
|
FOnBeforeClose := nil;
|
||||||
FOnAfterCreated := nil;
|
FOnAfterCreated := nil;
|
||||||
FUseSetFocus := True;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TChromiumWindow.AfterConstruction;
|
procedure TChromiumWindow.AfterConstruction;
|
||||||
@ -249,11 +395,6 @@ begin
|
|||||||
result := FChromium;
|
result := FChromium;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TChromiumWindow.GetUseSetFocus: Boolean;
|
|
||||||
begin
|
|
||||||
Result := FUseSetFocus;
|
|
||||||
end;
|
|
||||||
|
|
||||||
// This is a workaround for the CEF issue #2026
|
// This is a workaround for the CEF issue #2026
|
||||||
// https://bitbucket.org/chromiumembedded/cef/issues/2026/multiple-major-keyboard-focus-issues-on
|
// https://bitbucket.org/chromiumembedded/cef/issues/2026/multiple-major-keyboard-focus-issues-on
|
||||||
// We use ChromiumWindow1.OnEnter, ChromiumWindow1.OnExit and
|
// We use ChromiumWindow1.OnEnter, ChromiumWindow1.OnExit and
|
||||||
|
@ -2064,11 +2064,9 @@ const
|
|||||||
CEF_PERMISSION_TYPE_NOTIFICATIONS = 1 shl 14;
|
CEF_PERMISSION_TYPE_NOTIFICATIONS = 1 shl 14;
|
||||||
CEF_PERMISSION_TYPE_PROTECTED_MEDIA_IDENTIFIER = 1 shl 15;
|
CEF_PERMISSION_TYPE_PROTECTED_MEDIA_IDENTIFIER = 1 shl 15;
|
||||||
CEF_PERMISSION_TYPE_REGISTER_PROTOCOL_HANDLER = 1 shl 16;
|
CEF_PERMISSION_TYPE_REGISTER_PROTOCOL_HANDLER = 1 shl 16;
|
||||||
CEF_PERMISSION_TYPE_SECURITY_ATTESTATION = 1 shl 17;
|
CEF_PERMISSION_TYPE_STORAGE_ACCESS = 1 shl 17;
|
||||||
CEF_PERMISSION_TYPE_STORAGE_ACCESS = 1 shl 18;
|
CEF_PERMISSION_TYPE_VR_SESSION = 1 shl 18;
|
||||||
CEF_PERMISSION_TYPE_U2F_API_REQUEST = 1 shl 19;
|
CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT = 1 shl 19;
|
||||||
CEF_PERMISSION_TYPE_VR_SESSION = 1 shl 20;
|
|
||||||
CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT = 1 shl 21;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Platform API hash.
|
/// Platform API hash.
|
||||||
@ -2350,6 +2348,59 @@ const
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
CEF_DOWNLOAD_INTERRUPT_REASON_CRASH = 50;
|
CEF_DOWNLOAD_INTERRUPT_REASON_CRASH = 50;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Prepend the default list of items.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// <para>TCefLogItems value.</para>
|
||||||
|
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_types.h">CEF source file: /include/internal/cef_types.h (cef_log_items_t)</see></para>
|
||||||
|
/// </remarks>
|
||||||
|
LOG_ITEMS_DEFAULT = 0;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Prepend no items.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// <para>TCefLogItems value.</para>
|
||||||
|
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_types.h">CEF source file: /include/internal/cef_types.h (cef_log_items_t)</see></para>
|
||||||
|
/// </remarks>
|
||||||
|
LOG_ITEMS_NONE = 1 shl 0;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Prepend the process ID.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// <para>TCefLogItems value.</para>
|
||||||
|
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_types.h">CEF source file: /include/internal/cef_types.h (cef_log_items_t)</see></para>
|
||||||
|
/// </remarks>
|
||||||
|
LOG_ITEMS_FLAG_PROCESS_ID = 1 shl 1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Prepend the thread ID.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// <para>TCefLogItems value.</para>
|
||||||
|
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_types.h">CEF source file: /include/internal/cef_types.h (cef_log_items_t)</see></para>
|
||||||
|
/// </remarks>
|
||||||
|
LOG_ITEMS_FLAG_THREAD_ID = 1 shl 2;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Prepend the timestamp.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// <para>TCefLogItems value.</para>
|
||||||
|
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_types.h">CEF source file: /include/internal/cef_types.h (cef_log_items_t)</see></para>
|
||||||
|
/// </remarks>
|
||||||
|
LOG_ITEMS_FLAG_TIME_STAMP = 1 shl 3;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Prepend the tickcount.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// <para>TCefLogItems value.</para>
|
||||||
|
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_types.h">CEF source file: /include/internal/cef_types.h (cef_log_items_t)</see></para>
|
||||||
|
/// </remarks>
|
||||||
|
LOG_ITEMS_FLAG_TICK_COUNT = 1 shl 4;
|
||||||
|
|
||||||
|
|
||||||
{*
|
{*
|
||||||
|
@ -29,9 +29,21 @@ type
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
public
|
public
|
||||||
{$IFDEF MSWINDOWS}
|
{$IFDEF MSWINDOWS}
|
||||||
|
/// <summary>
|
||||||
|
/// Set a new parent for this control.
|
||||||
|
/// </summary>
|
||||||
procedure Reparent(const aNewParentHandle : {$IFDEF DELPHI18_UP}TWindowHandle{$ELSE}TFmxHandle{$ENDIF});
|
procedure Reparent(const aNewParentHandle : {$IFDEF DELPHI18_UP}TWindowHandle{$ELSE}TFmxHandle{$ENDIF});
|
||||||
|
/// <summary>
|
||||||
|
/// Updates the size of the child windows created by the browser.
|
||||||
|
/// </summary>
|
||||||
procedure UpdateSize;
|
procedure UpdateSize;
|
||||||
|
/// <summary>
|
||||||
|
/// Handle of the first child window created by the browser.
|
||||||
|
/// </summary>
|
||||||
property ChildWindowHandle : HWND read GetChildWindowHandle;
|
property ChildWindowHandle : HWND read GetChildWindowHandle;
|
||||||
|
/// <summary>
|
||||||
|
/// TChromium instance used by this component.
|
||||||
|
/// </summary>
|
||||||
property Chromium : TFMXChromium read FChromium write FChromium;
|
property Chromium : TFMXChromium read FChromium write FChromium;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{$IFNDEF DELPHI17_UP}
|
{$IFNDEF DELPHI17_UP}
|
||||||
|
@ -14,6 +14,10 @@ uses
|
|||||||
|
|
||||||
type
|
type
|
||||||
{$IFNDEF FPC}{$IFDEF DELPHI16_UP}[ComponentPlatformsAttribute(pfidWindows or pfidOSX or pfidLinux)]{$ENDIF}{$ENDIF}
|
{$IFNDEF FPC}{$IFDEF DELPHI16_UP}[ComponentPlatformsAttribute(pfidWindows or pfidOSX or pfidLinux)]{$ENDIF}{$ENDIF}
|
||||||
|
/// <summary>
|
||||||
|
/// <para>Implementation of an external message pump for FMX.</para>
|
||||||
|
/// <para>Read the GlobalCEFApp.OnScheduleMessagePumpWork documentation for all the details.</para>
|
||||||
|
/// </summary>
|
||||||
TFMXWorkScheduler = class(TComponent)
|
TFMXWorkScheduler = class(TComponent)
|
||||||
protected
|
protected
|
||||||
FThread : TCEFWorkSchedulerThread;
|
FThread : TCEFWorkSchedulerThread;
|
||||||
@ -50,24 +54,65 @@ type
|
|||||||
procedure Thread_OnPulse(Sender : TObject);
|
procedure Thread_OnPulse(Sender : TObject);
|
||||||
|
|
||||||
public
|
public
|
||||||
|
/// <summary>
|
||||||
|
/// Full constructor of TFMXWorkScheduler. This constructor also creates the internal threads.
|
||||||
|
/// </summary>
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
|
/// <summary>
|
||||||
|
/// Partial constructor of TFMXWorkScheduler. This constructor doesn't create any threads.
|
||||||
|
/// Call TFMXWorkScheduler.CreateThread when necessary.
|
||||||
|
/// </summary>
|
||||||
constructor CreateDelayed;
|
constructor CreateDelayed;
|
||||||
|
/// <summary>
|
||||||
|
/// TFMXWorkScheduler destructor.
|
||||||
|
/// </summary>
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
|
/// <summary>
|
||||||
|
/// Called from GlobalCEFApp.OnScheduleMessagePumpWork to schedule
|
||||||
|
/// a GlobalCEFApp.DoMessageLoopWork call asynchronously to perform a single
|
||||||
|
/// iteration of CEF message loop processing.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="delay_ms">Requested delay in milliseconds.</param>
|
||||||
procedure ScheduleMessagePumpWork(const delay_ms : int64);
|
procedure ScheduleMessagePumpWork(const delay_ms : int64);
|
||||||
|
/// <summary>
|
||||||
|
/// Stop the scheduler. This function must be called after the destruction of all the forms in the application.
|
||||||
|
/// </summary>
|
||||||
procedure StopScheduler;
|
procedure StopScheduler;
|
||||||
|
/// <summary>
|
||||||
|
/// Schedule a GlobalCEFApp.DoMessageLoopWork call synchronously to perform a single
|
||||||
|
/// iteration of CEF message loop processing.
|
||||||
|
/// </summary>
|
||||||
procedure ScheduleWork(const delay_ms : int64);
|
procedure ScheduleWork(const delay_ms : int64);
|
||||||
|
/// <summary>
|
||||||
|
/// Creates all the internal threads used by TCEFWorkScheduler.
|
||||||
|
/// </summary>
|
||||||
procedure CreateThread;
|
procedure CreateThread;
|
||||||
|
|
||||||
|
|
||||||
published
|
published
|
||||||
{$IFDEF MSWINDOWS}
|
{$IFDEF MSWINDOWS}
|
||||||
{$WARN SYMBOL_PLATFORM OFF}
|
{$WARN SYMBOL_PLATFORM OFF}
|
||||||
|
/// <summary>
|
||||||
|
/// Priority of TCEFWorkSchedulerThread in Windows.
|
||||||
|
/// </summary>
|
||||||
property Priority : TThreadPriority read FPriority write SetPriority default tpNormal;
|
property Priority : TThreadPriority read FPriority write SetPriority default tpNormal;
|
||||||
{$WARN SYMBOL_PLATFORM ON}
|
{$WARN SYMBOL_PLATFORM ON}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
/// <summary>
|
||||||
|
/// Default interval in milliseconds to do the next GlobalCEFApp.DoMessageLoopWork call.
|
||||||
|
/// </summary>
|
||||||
property DefaultInterval : integer read FDefaultInterval write SetDefaultInterval default CEF_TIMER_MAXDELAY;
|
property DefaultInterval : integer read FDefaultInterval write SetDefaultInterval default CEF_TIMER_MAXDELAY;
|
||||||
|
/// <summary>
|
||||||
|
/// Number of cycles used to deplete the remaining messages in the work loop.
|
||||||
|
/// </summary>
|
||||||
property DepleteWorkCycles : cardinal read FDepleteWorkCycles write FDepleteWorkCycles default CEF_TIMER_DEPLETEWORK_CYCLES;
|
property DepleteWorkCycles : cardinal read FDepleteWorkCycles write FDepleteWorkCycles default CEF_TIMER_DEPLETEWORK_CYCLES;
|
||||||
|
/// <summary>
|
||||||
|
/// Delay in milliseconds between the cycles used to deplete the remaining messages in the work loop.
|
||||||
|
/// </summary>
|
||||||
property DepleteWorkDelay : cardinal read FDepleteWorkDelay write FDepleteWorkDelay default CEF_TIMER_DEPLETEWORK_DELAY;
|
property DepleteWorkDelay : cardinal read FDepleteWorkDelay write FDepleteWorkDelay default CEF_TIMER_DEPLETEWORK_DELAY;
|
||||||
|
/// <summary>
|
||||||
|
/// Use a custom queue thread instead of Windows messages or any other way to schedule the next pump work.
|
||||||
|
/// </summary>
|
||||||
property UseQueueThread : boolean read FUseQueueThread write FUseQueueThread default False;
|
property UseQueueThread : boolean read FUseQueueThread write FUseQueueThread default False;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -609,6 +609,7 @@ type
|
|||||||
procedure doOnGetDelegateForPopupBrowserView(const browser_view: ICefBrowserView; const settings: TCefBrowserSettings; const client: ICefClient; is_devtools: boolean; var aResult : ICefBrowserViewDelegate);
|
procedure doOnGetDelegateForPopupBrowserView(const browser_view: ICefBrowserView; const settings: TCefBrowserSettings; const client: ICefClient; is_devtools: boolean; var aResult : ICefBrowserViewDelegate);
|
||||||
procedure doOnPopupBrowserViewCreated(const browser_view, popup_browser_view: ICefBrowserView; is_devtools: boolean; var aResult : boolean);
|
procedure doOnPopupBrowserViewCreated(const browser_view, popup_browser_view: ICefBrowserView; is_devtools: boolean; var aResult : boolean);
|
||||||
procedure doOnGetChromeToolbarType(var aChromeToolbarType: TCefChromeToolbarType);
|
procedure doOnGetChromeToolbarType(var aChromeToolbarType: TCefChromeToolbarType);
|
||||||
|
procedure doOnUseFramelessWindowForPictureInPicture(const browser_view: ICefBrowserView; var aResult: boolean);
|
||||||
procedure doOnGestureCommand(const browser_view: ICefBrowserView; gesture_command: TCefGestureCommand; var aResult : boolean);
|
procedure doOnGestureCommand(const browser_view: ICefBrowserView; gesture_command: TCefGestureCommand; var aResult : boolean);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -10301,7 +10302,7 @@ type
|
|||||||
function GetBrowser : ICefBrowser;
|
function GetBrowser : ICefBrowser;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the Chrome toolbar associated with this BrowserView. Only
|
/// Returns the Chrome toolbar associated with this BrowserView. Only
|
||||||
/// supported when using the Chrome runtime. The ICefBrowserViewDelegate.get_chrome_toolbar_type()
|
/// supported when using the Chrome runtime. The ICefBrowserViewDelegate.GetChromeToolbarType
|
||||||
/// function must return a value other than
|
/// function must return a value other than
|
||||||
/// CEF_CTT_NONE and the toolbar will not be available until after this
|
/// CEF_CTT_NONE and the toolbar will not be available until after this
|
||||||
/// BrowserView is added to a ICefWindow and
|
/// BrowserView is added to a ICefWindow and
|
||||||
@ -10368,7 +10369,13 @@ type
|
|||||||
/// ICefBrowserView.GetChromeToolbar(). See that function for related
|
/// ICefBrowserView.GetChromeToolbar(). See that function for related
|
||||||
/// documentation.
|
/// documentation.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
function GetChromeToolbarType: TCefChromeToolbarType;
|
procedure OnGetChromeToolbarType(var aResult : TCefChromeToolbarType);
|
||||||
|
/// <summary>
|
||||||
|
/// Return true (1) to create frameless windows for Document picture-in-
|
||||||
|
/// picture popups. Content in frameless windows should specify draggable
|
||||||
|
/// regions using "-webkit-app-region: drag" CSS.
|
||||||
|
/// </summary>
|
||||||
|
procedure OnUseFramelessWindowForPictureInPicture(const browser_view: ICefBrowserView; var aResult: boolean);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called when |browser_view| receives a gesture command. Return true (1) to
|
/// Called when |browser_view| receives a gesture command. Return true (1) to
|
||||||
/// handle (or disable) a |gesture_command| or false (0) to propagate the
|
/// handle (or disable) a |gesture_command| or false (0) to propagate the
|
||||||
@ -10376,12 +10383,6 @@ type
|
|||||||
/// commands can also be handled via cef_command_handler_t::OnChromeCommand.
|
/// commands can also be handled via cef_command_handler_t::OnChromeCommand.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
procedure OnGestureCommand(const browser_view: ICefBrowserView; gesture_command: TCefGestureCommand; var aResult : boolean);
|
procedure OnGestureCommand(const browser_view: ICefBrowserView; gesture_command: TCefGestureCommand; var aResult : boolean);
|
||||||
/// <summary>
|
|
||||||
/// Returns the Chrome toolbar type that will be available via
|
|
||||||
/// ICefBrowserView.GetChromeToolbar(). See that function for related
|
|
||||||
/// documentation.
|
|
||||||
/// </summary>
|
|
||||||
property ChromeToolbarType: TCefChromeToolbarType read GetChromeToolbarType;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -24,14 +24,21 @@ uses
|
|||||||
uCEFTypes, uCEFInterfaces, uCEFWinControl, uCEFChromium;
|
uCEFTypes, uCEFInterfaces, uCEFWinControl, uCEFChromium;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
/// <summary>
|
||||||
{ TCEFLinkedWinControlBase }
|
/// TCEFLinkedWinControlBase is a custom TWinControl to host the child controls created by the web browser
|
||||||
|
/// to show the web contents and it's linked to the TChromium instance that handles that web browser.
|
||||||
|
/// TCEFLinkedWinControlBase is the parent class of TChromiumWindow, TBrowserWindow and TCEFLinkedWindowParent.
|
||||||
|
/// </summary>
|
||||||
TCEFLinkedWinControlBase = class(TCEFWinControl)
|
TCEFLinkedWinControlBase = class(TCEFWinControl)
|
||||||
protected
|
protected
|
||||||
|
{$IFDEF MSWINDOWS}
|
||||||
|
FUseSetFocus : boolean;
|
||||||
|
{$ENDIF}
|
||||||
function GetChromium: TChromium; virtual; abstract;
|
function GetChromium: TChromium; virtual; abstract;
|
||||||
function GetUseSetFocus: Boolean; virtual;
|
function GetUseSetFocus: Boolean; virtual;
|
||||||
|
|
||||||
|
procedure SetUseSetFocus(aValue : boolean); virtual;
|
||||||
|
|
||||||
{$IFDEF FPC}
|
{$IFDEF FPC}
|
||||||
procedure SetVisible(Value: Boolean); override;
|
procedure SetVisible(Value: Boolean); override;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
@ -39,19 +46,42 @@ type
|
|||||||
{$IFDEF MSWINDOWS}
|
{$IFDEF MSWINDOWS}
|
||||||
procedure WndProc(var aMessage: TMessage); override;
|
procedure WndProc(var aMessage: TMessage); override;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
/// <summary>
|
||||||
|
/// TChromium instance used by this component.
|
||||||
|
/// </summary>
|
||||||
property Chromium : TChromium read GetChromium;
|
property Chromium : TChromium read GetChromium;
|
||||||
public
|
public
|
||||||
|
constructor Create(AOwner: TComponent); override;
|
||||||
procedure UpdateSize; override;
|
procedure UpdateSize; override;
|
||||||
|
published
|
||||||
|
{$IFDEF MSWINDOWS}
|
||||||
|
/// <summary>
|
||||||
|
/// Use TChromium.SetFocus when the component receives a WM_SETFOCUS message in Windows.
|
||||||
|
/// </summary>
|
||||||
|
property UseSetFocus : boolean read GetUseSetFocus write SetUseSetFocus default True;
|
||||||
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
{ TCEFLinkedWinControlBase }
|
{ TCEFLinkedWinControlBase }
|
||||||
|
|
||||||
|
constructor TCEFLinkedWinControlBase.Create(AOwner: TComponent);
|
||||||
|
begin
|
||||||
|
inherited Create(AOwner);
|
||||||
|
{$IFDEF MSWINDOWS}
|
||||||
|
FUseSetFocus := True;
|
||||||
|
{$ENDIF}
|
||||||
|
end;
|
||||||
|
|
||||||
function TCEFLinkedWinControlBase.GetUseSetFocus: Boolean;
|
function TCEFLinkedWinControlBase.GetUseSetFocus: Boolean;
|
||||||
begin
|
begin
|
||||||
Result := True;
|
Result := FUseSetFocus;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TCEFLinkedWinControlBase.SetUseSetFocus(aValue : boolean);
|
||||||
|
begin
|
||||||
|
FUseSetFocus := aValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$IFDEF FPC}
|
{$IFDEF FPC}
|
||||||
@ -94,7 +124,7 @@ begin
|
|||||||
case aMessage.Msg of
|
case aMessage.Msg of
|
||||||
WM_SETFOCUS:
|
WM_SETFOCUS:
|
||||||
begin
|
begin
|
||||||
if GetUseSetFocus and (Chromium <> nil) then
|
if UseSetFocus and (Chromium <> nil) then
|
||||||
Chromium.SetFocus(True)
|
Chromium.SetFocus(True)
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
|
@ -51,6 +51,9 @@ type
|
|||||||
constructor Create(AOwner : TComponent); override;
|
constructor Create(AOwner : TComponent); override;
|
||||||
|
|
||||||
published
|
published
|
||||||
|
/// <summary>
|
||||||
|
/// TChromium instance used by this component.
|
||||||
|
/// </summary>
|
||||||
property Chromium : TChromium read FChromium write SetChromium;
|
property Chromium : TChromium read FChromium write SetChromium;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -20,6 +20,9 @@ uses
|
|||||||
uCEFTypes;
|
uCEFTypes;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
/// <summary>
|
||||||
|
/// The TPDFPrintOptions properties are used to fill the TCefPdfPrintSettings record which is used in the TChromiumCore.PrintToPDF call.
|
||||||
|
/// </summary>
|
||||||
TPDFPrintOptions = class
|
TPDFPrintOptions = class
|
||||||
protected
|
protected
|
||||||
FLandscape : boolean;
|
FLandscape : boolean;
|
||||||
@ -37,6 +40,7 @@ type
|
|||||||
FDisplayHeaderFooter : boolean;
|
FDisplayHeaderFooter : boolean;
|
||||||
FHeaderTemplate : ustring;
|
FHeaderTemplate : ustring;
|
||||||
FFooterTemplate : ustring;
|
FFooterTemplate : ustring;
|
||||||
|
FGenerateTaggedPDF : boolean;
|
||||||
|
|
||||||
function GetScalePct: double;
|
function GetScalePct: double;
|
||||||
function GetPaperWidthMM: double;
|
function GetPaperWidthMM: double;
|
||||||
@ -58,33 +62,136 @@ type
|
|||||||
function MMToInches(const aMM: double): double;
|
function MMToInches(const aMM: double): double;
|
||||||
|
|
||||||
public
|
public
|
||||||
|
/// <summary>
|
||||||
|
/// Constructor of TPDFPrintOptions
|
||||||
|
/// </summary>
|
||||||
constructor Create; virtual;
|
constructor Create; virtual;
|
||||||
|
/// <summary>
|
||||||
|
/// Copy the fields of this class to the TCefPdfPrintSettings parameter.
|
||||||
|
/// </summary>
|
||||||
procedure CopyToSettings(var aSettings : TCefPdfPrintSettings);
|
procedure CopyToSettings(var aSettings : TCefPdfPrintSettings);
|
||||||
|
/// <summary>
|
||||||
|
/// Set to true for landscape mode or false for portrait mode.
|
||||||
|
/// </summary>
|
||||||
property Landscape : boolean read FLandscape write FLandscape;
|
property Landscape : boolean read FLandscape write FLandscape;
|
||||||
|
/// <summary>
|
||||||
|
/// Set to true to print background graphics.
|
||||||
|
/// </summary>
|
||||||
property PrintBackground : boolean read FPrintBackground write FPrintBackground;
|
property PrintBackground : boolean read FPrintBackground write FPrintBackground;
|
||||||
|
/// <summary>
|
||||||
|
/// Set to true to prefer page size as defined by css. Defaults to false,
|
||||||
|
/// in which case the content will be scaled to fit the paper size.
|
||||||
|
/// </summary>
|
||||||
property PreferCSSPageSize : boolean read FPreferCSSPageSize write FPreferCSSPageSize;
|
property PreferCSSPageSize : boolean read FPreferCSSPageSize write FPreferCSSPageSize;
|
||||||
|
/// <summary>
|
||||||
|
/// <para>Paper ranges to print, one based, e.g., '1-5, 8, 11-13'. Pages are printed
|
||||||
|
/// in the document order, not in the order specified, and no more than once.
|
||||||
|
/// Defaults to empty string, which implies the entire document is printed.</para>
|
||||||
|
/// <para>The page numbers are quietly capped to actual page count of the document,
|
||||||
|
/// and ranges beyond the end of the document are ignored. If this results in
|
||||||
|
/// no pages to print, an error is reported. It is an error to specify a range
|
||||||
|
/// with start greater than end.</para>
|
||||||
|
/// </summary>
|
||||||
property PageRanges : ustring read FPageRanges write FPageRanges;
|
property PageRanges : ustring read FPageRanges write FPageRanges;
|
||||||
|
/// <summary>
|
||||||
|
/// Set to true to display the header and/or footer. Modify
|
||||||
|
/// HeaderTemplate and/or FooterTemplate to customize the display.
|
||||||
|
/// </summary>
|
||||||
property DisplayHeaderFooter : boolean read FDisplayHeaderFooter write FDisplayHeaderFooter;
|
property DisplayHeaderFooter : boolean read FDisplayHeaderFooter write FDisplayHeaderFooter;
|
||||||
|
/// <summary>
|
||||||
|
/// <para>HTML template for the print header. Only displayed if
|
||||||
|
/// DisplayHeaderFooter is true. Should be valid HTML markup with
|
||||||
|
/// the following classes used to inject printing values into them:</para>
|
||||||
|
/// <code>
|
||||||
|
/// - date: formatted print date
|
||||||
|
/// - title: document title
|
||||||
|
/// - url: document location
|
||||||
|
/// - pageNumber: current page number
|
||||||
|
/// - totalPages: total pages in the document
|
||||||
|
/// </code>
|
||||||
|
/// <para>For example, "<span class=title></span>" would generate a span containing
|
||||||
|
/// the title.</para>
|
||||||
|
/// </summary>
|
||||||
property HeaderTemplate : ustring read FHeaderTemplate write FHeaderTemplate;
|
property HeaderTemplate : ustring read FHeaderTemplate write FHeaderTemplate;
|
||||||
|
/// <summary>
|
||||||
|
/// HTML template for the print footer. Only displayed if
|
||||||
|
/// DisplayHeaderFooter is true. Uses the same format as
|
||||||
|
/// HeaderTemplate.
|
||||||
|
/// </summary>
|
||||||
property FooterTemplate : ustring read FFooterTemplate write FFooterTemplate;
|
property FooterTemplate : ustring read FFooterTemplate write FFooterTemplate;
|
||||||
|
/// <summary>
|
||||||
|
/// Set to true to generate tagged (accessible) PDF.
|
||||||
|
/// </summary>
|
||||||
|
property GenerateTaggedPDF : boolean read FGenerateTaggedPDF write FGenerateTaggedPDF;
|
||||||
|
/// <summary>
|
||||||
|
/// The percentage to scale the PDF by before printing (e.g. .5 is 50%).
|
||||||
|
/// If this value is less than or equal to zero the default value of 1.0
|
||||||
|
/// will be used.
|
||||||
|
/// </summary>
|
||||||
property Scale : double read FScale write FScale;
|
property Scale : double read FScale write FScale;
|
||||||
|
/// <summary>
|
||||||
|
/// The percentage value to scale the PDF by before printing (e.g. 50 is 50%).
|
||||||
|
/// </summary>
|
||||||
property ScalePct : double read GetScalePct write SetScalePct;
|
property ScalePct : double read GetScalePct write SetScalePct;
|
||||||
|
/// <summary>
|
||||||
|
/// Output paper width in inches. If either of these values is less than or
|
||||||
|
/// equal to zero then the default paper size (letter, 8.5 x 11 inches) will
|
||||||
|
/// be used.
|
||||||
|
/// </summary>
|
||||||
property PaperWidthInch : double read FPaperWidth write FPaperWidth;
|
property PaperWidthInch : double read FPaperWidth write FPaperWidth;
|
||||||
|
/// <summary>
|
||||||
|
/// Output paper height in inches. If either of these values is less than or
|
||||||
|
/// equal to zero then the default paper size (letter, 8.5 x 11 inches) will
|
||||||
|
/// be used.
|
||||||
|
/// </summary>
|
||||||
property PaperHeightInch : double read FPaperHeight write FPaperHeight;
|
property PaperHeightInch : double read FPaperHeight write FPaperHeight;
|
||||||
|
/// <summary>
|
||||||
|
/// Output paper width in mm.
|
||||||
|
/// </summary>
|
||||||
property PaperWidthMM : double read GetPaperWidthMM write SetPaperWidthMM;
|
property PaperWidthMM : double read GetPaperWidthMM write SetPaperWidthMM;
|
||||||
|
/// <summary>
|
||||||
|
/// Output paper height in mm.
|
||||||
|
/// </summary>
|
||||||
property PaperHeightMM : double read GetPaperHeightMM write SetPaperHeightMM;
|
property PaperHeightMM : double read GetPaperHeightMM write SetPaperHeightMM;
|
||||||
|
/// <summary>
|
||||||
|
/// Margin type.
|
||||||
|
/// </summary>
|
||||||
property MarginType : TCefPdfPrintMarginType read FMarginType write FMarginType;
|
property MarginType : TCefPdfPrintMarginType read FMarginType write FMarginType;
|
||||||
|
/// <summary>
|
||||||
|
/// Top margin in inches. Only used if MarginType is set to
|
||||||
|
/// PDF_PRINT_MARGIN_CUSTOM.
|
||||||
|
/// </summary>
|
||||||
property MarginTopInch : double read FMarginTop write FMarginTop;
|
property MarginTopInch : double read FMarginTop write FMarginTop;
|
||||||
|
/// <summary>
|
||||||
|
/// Right margin in inches. Only used if MarginType is set to
|
||||||
|
/// PDF_PRINT_MARGIN_CUSTOM.
|
||||||
|
/// </summary>
|
||||||
property MarginRightInch : double read FMarginRight write FMarginRight;
|
property MarginRightInch : double read FMarginRight write FMarginRight;
|
||||||
|
/// <summary>
|
||||||
|
/// Bottom margin in inches. Only used if MarginType is set to
|
||||||
|
/// PDF_PRINT_MARGIN_CUSTOM.
|
||||||
|
/// </summary>
|
||||||
property MarginBottomInch : double read FMarginBottom write FMarginBottom;
|
property MarginBottomInch : double read FMarginBottom write FMarginBottom;
|
||||||
|
/// <summary>
|
||||||
|
/// Left margin in inches. Only used if MarginType is set to
|
||||||
|
/// PDF_PRINT_MARGIN_CUSTOM.
|
||||||
|
/// </summary>
|
||||||
property MarginLeftInch : double read FMarginLeft write FMarginLeft;
|
property MarginLeftInch : double read FMarginLeft write FMarginLeft;
|
||||||
|
/// <summary>
|
||||||
|
/// Top margin in mm.
|
||||||
|
/// </summary>
|
||||||
property MarginTopMM : double read GetMarginTopMM write SetMarginTopMM;
|
property MarginTopMM : double read GetMarginTopMM write SetMarginTopMM;
|
||||||
|
/// <summary>
|
||||||
|
/// Right margin in mm.
|
||||||
|
/// </summary>
|
||||||
property MarginRightMM : double read GetMarginRightMM write SetMarginRightMM;
|
property MarginRightMM : double read GetMarginRightMM write SetMarginRightMM;
|
||||||
|
/// <summary>
|
||||||
|
/// Bottom margin in mm.
|
||||||
|
/// </summary>
|
||||||
property MarginBottomMM : double read GetMarginBottomMM write SetMarginBottomMM;
|
property MarginBottomMM : double read GetMarginBottomMM write SetMarginBottomMM;
|
||||||
|
/// <summary>
|
||||||
|
/// Left margin in mm.
|
||||||
|
/// </summary>
|
||||||
property MarginLeftMM : double read GetMarginLeftMM write SetMarginLeftMM;
|
property MarginLeftMM : double read GetMarginLeftMM write SetMarginLeftMM;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -113,6 +220,7 @@ begin
|
|||||||
FDisplayHeaderFooter := False;
|
FDisplayHeaderFooter := False;
|
||||||
FHeaderTemplate := '';
|
FHeaderTemplate := '';
|
||||||
FFooterTemplate := '';
|
FFooterTemplate := '';
|
||||||
|
FGenerateTaggedPDF := False;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TPDFPrintOptions.InchesToMM(const aInches: double): double;
|
function TPDFPrintOptions.InchesToMM(const aInches: double): double;
|
||||||
@ -236,6 +344,7 @@ begin
|
|||||||
aSettings.display_header_footer := Ord(FDisplayHeaderFooter);
|
aSettings.display_header_footer := Ord(FDisplayHeaderFooter);
|
||||||
aSettings.header_template := CefString(FHeaderTemplate);
|
aSettings.header_template := CefString(FHeaderTemplate);
|
||||||
aSettings.footer_template := CefString(FFooterTemplate);
|
aSettings.footer_template := CefString(FFooterTemplate);
|
||||||
|
aSettings.generate_tagged_pdf := Ord(FGenerateTaggedPDF);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -91,6 +91,8 @@ end;
|
|||||||
|
|
||||||
procedure TCustomPanelDelegate.OnGetPreferredSize(const view: ICefView; var aResult : TCefSize);
|
procedure TCustomPanelDelegate.OnGetPreferredSize(const view: ICefView; var aResult : TCefSize);
|
||||||
begin
|
begin
|
||||||
|
inherited OnGetPreferredSize(view, aResult);
|
||||||
|
|
||||||
try
|
try
|
||||||
if (FEvents <> nil) then
|
if (FEvents <> nil) then
|
||||||
ICefPanelDelegateEvents(FEvents).doOnGetPreferredSize(view, aResult);
|
ICefPanelDelegateEvents(FEvents).doOnGetPreferredSize(view, aResult);
|
||||||
@ -102,6 +104,8 @@ end;
|
|||||||
|
|
||||||
procedure TCustomPanelDelegate.OnGetMinimumSize(const view: ICefView; var aResult : TCefSize);
|
procedure TCustomPanelDelegate.OnGetMinimumSize(const view: ICefView; var aResult : TCefSize);
|
||||||
begin
|
begin
|
||||||
|
inherited OnGetMinimumSize(view, aResult);
|
||||||
|
|
||||||
try
|
try
|
||||||
if (FEvents <> nil) then
|
if (FEvents <> nil) then
|
||||||
ICefPanelDelegateEvents(FEvents).doOnGetMinimumSize(view, aResult);
|
ICefPanelDelegateEvents(FEvents).doOnGetMinimumSize(view, aResult);
|
||||||
@ -113,6 +117,8 @@ end;
|
|||||||
|
|
||||||
procedure TCustomPanelDelegate.OnGetMaximumSize(const view: ICefView; var aResult : TCefSize);
|
procedure TCustomPanelDelegate.OnGetMaximumSize(const view: ICefView; var aResult : TCefSize);
|
||||||
begin
|
begin
|
||||||
|
inherited OnGetMaximumSize(view, aResult);
|
||||||
|
|
||||||
try
|
try
|
||||||
if (FEvents <> nil) then
|
if (FEvents <> nil) then
|
||||||
ICefPanelDelegateEvents(FEvents).doOnGetMaximumSize(view, aResult);
|
ICefPanelDelegateEvents(FEvents).doOnGetMaximumSize(view, aResult);
|
||||||
@ -124,6 +130,8 @@ end;
|
|||||||
|
|
||||||
procedure TCustomPanelDelegate.OnGetHeightForWidth(const view: ICefView; width: Integer; var aResult: Integer);
|
procedure TCustomPanelDelegate.OnGetHeightForWidth(const view: ICefView; width: Integer; var aResult: Integer);
|
||||||
begin
|
begin
|
||||||
|
inherited OnGetHeightForWidth(view, width, aResult);
|
||||||
|
|
||||||
try
|
try
|
||||||
if (FEvents <> nil) then
|
if (FEvents <> nil) then
|
||||||
ICefPanelDelegateEvents(FEvents).doOnGetHeightForWidth(view, width, aResult);
|
ICefPanelDelegateEvents(FEvents).doOnGetHeightForWidth(view, width, aResult);
|
||||||
|
@ -206,7 +206,7 @@ type
|
|||||||
/// Returns the extension matching |extension_id| or NULL if no matching
|
/// Returns the extension matching |extension_id| or NULL if no matching
|
||||||
/// extension is accessible in this context (see HasExtension). This function
|
/// extension is accessible in this context (see HasExtension). This function
|
||||||
/// must be called on the browser process UI thread.
|
/// must be called on the browser process UI thread.
|
||||||
///
|
/// </summary>
|
||||||
function GetExtension(const extension_id: ustring): ICefExtension;
|
function GetExtension(const extension_id: ustring): ICefExtension;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -76,18 +76,43 @@ type
|
|||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
procedure AfterConstruction; override;
|
procedure AfterConstruction; override;
|
||||||
|
/// <summary>
|
||||||
|
/// Start checking all the CEF subprocesses.
|
||||||
|
/// </summary>
|
||||||
procedure Start; virtual;
|
procedure Start; virtual;
|
||||||
|
/// <summary>
|
||||||
|
/// Status of this component.
|
||||||
|
/// </summary>
|
||||||
property Status : TSentinelStatus read GetStatus;
|
property Status : TSentinelStatus read GetStatus;
|
||||||
|
/// <summary>
|
||||||
|
/// Number of CEF subprocesses.
|
||||||
|
/// </summary>
|
||||||
property ChildProcCount : integer read GetChildProcCount;
|
property ChildProcCount : integer read GetChildProcCount;
|
||||||
|
|
||||||
published
|
published
|
||||||
|
/// <summary>
|
||||||
|
/// Delay per subprocess in milliseconds. This delay is used to calculate how much time to wait until this component checks the CEF subprocesses again.
|
||||||
|
/// </summary>
|
||||||
property DelayPerProcMs : cardinal read FDelayPerProcMs write FDelayPerProcMs default CEFSENTINEL_DEFAULT_DELAYPERPROCMS;
|
property DelayPerProcMs : cardinal read FDelayPerProcMs write FDelayPerProcMs default CEFSENTINEL_DEFAULT_DELAYPERPROCMS;
|
||||||
|
/// <summary>
|
||||||
|
/// Minimum initial delay in milliseconds. This is the minimum time to wait until this component checks the CEF subprocesses again.
|
||||||
|
/// </summary>
|
||||||
property MinInitDelayMs : cardinal read FMinInitDelayMs write FMinInitDelayMs default CEFSENTINEL_DEFAULT_MININITDELAYMS;
|
property MinInitDelayMs : cardinal read FMinInitDelayMs write FMinInitDelayMs default CEFSENTINEL_DEFAULT_MININITDELAYMS;
|
||||||
|
/// <summary>
|
||||||
|
/// Final delay in milliseconds. This is an extra delay to wait after enough CEF subprocesses are closed.
|
||||||
|
/// </summary>
|
||||||
property FinalDelayMs : cardinal read FFinalDelayMs write FFinalDelayMs default CEFSENTINEL_DEFAULT_FINALDELAYMS;
|
property FinalDelayMs : cardinal read FFinalDelayMs write FFinalDelayMs default CEFSENTINEL_DEFAULT_FINALDELAYMS;
|
||||||
|
/// <summary>
|
||||||
|
/// Minimum number of CEF subprocesses. When ChildProcCount reaches this value it's considered safe to trigger OnClose.
|
||||||
|
/// </summary>
|
||||||
property MinChildProcs : integer read FMinChildProcs write FMinChildProcs default CEFSENTINEL_DEFAULT_MINCHILDPROCS;
|
property MinChildProcs : integer read FMinChildProcs write FMinChildProcs default CEFSENTINEL_DEFAULT_MINCHILDPROCS;
|
||||||
|
/// <summary>
|
||||||
|
/// Maximum number of times this component will check the CEF subprocesses.
|
||||||
|
/// </summary>
|
||||||
property MaxCheckCount : integer read FMaxCheckCount write FMaxCheckCount default CEFSENTINEL_DEFAULT_MAXCHECKCOUNTS;
|
property MaxCheckCount : integer read FMaxCheckCount write FMaxCheckCount default CEFSENTINEL_DEFAULT_MAXCHECKCOUNTS;
|
||||||
|
/// <summary>
|
||||||
|
/// Event triggered when enought CEF subprocesses are closed.
|
||||||
|
/// </summary>
|
||||||
property OnClose : TNotifyEvent read FOnClose write FOnClose;
|
property OnClose : TNotifyEvent read FOnClose write FOnClose;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -175,7 +200,7 @@ procedure TCEFSentinel.doStartMsg({$IFDEF MSWINDOWS}var aMessage : TMessage{$ELS
|
|||||||
begin
|
begin
|
||||||
if (FTimer <> nil) then
|
if (FTimer <> nil) then
|
||||||
begin
|
begin
|
||||||
FTimer.Interval := max(ChildProcCount * CEFSENTINEL_DEFAULT_DELAYPERPROCMS, FMinInitDelayMs);
|
FTimer.Interval := max(cardinal(ChildProcCount) * FDelayPerProcMs, FMinInitDelayMs);
|
||||||
FTimer.Enabled := True;
|
FTimer.Enabled := True;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -168,6 +168,8 @@ end;
|
|||||||
|
|
||||||
procedure TCustomTextfieldDelegate.OnGetPreferredSize(const view: ICefView; var aResult : TCefSize);
|
procedure TCustomTextfieldDelegate.OnGetPreferredSize(const view: ICefView; var aResult : TCefSize);
|
||||||
begin
|
begin
|
||||||
|
inherited OnGetPreferredSize(view, aResult);
|
||||||
|
|
||||||
try
|
try
|
||||||
if (FEvents <> nil) then
|
if (FEvents <> nil) then
|
||||||
ICefTextfieldDelegateEvents(FEvents).doOnGetPreferredSize(view, aResult);
|
ICefTextfieldDelegateEvents(FEvents).doOnGetPreferredSize(view, aResult);
|
||||||
@ -179,6 +181,8 @@ end;
|
|||||||
|
|
||||||
procedure TCustomTextfieldDelegate.OnGetMinimumSize(const view: ICefView; var aResult : TCefSize);
|
procedure TCustomTextfieldDelegate.OnGetMinimumSize(const view: ICefView; var aResult : TCefSize);
|
||||||
begin
|
begin
|
||||||
|
inherited OnGetMinimumSize(view, aResult);
|
||||||
|
|
||||||
try
|
try
|
||||||
if (FEvents <> nil) then
|
if (FEvents <> nil) then
|
||||||
ICefTextfieldDelegateEvents(FEvents).doOnGetMinimumSize(view, aResult);
|
ICefTextfieldDelegateEvents(FEvents).doOnGetMinimumSize(view, aResult);
|
||||||
@ -190,6 +194,8 @@ end;
|
|||||||
|
|
||||||
procedure TCustomTextfieldDelegate.OnGetMaximumSize(const view: ICefView; var aResult : TCefSize);
|
procedure TCustomTextfieldDelegate.OnGetMaximumSize(const view: ICefView; var aResult : TCefSize);
|
||||||
begin
|
begin
|
||||||
|
inherited OnGetMaximumSize(view, aResult);
|
||||||
|
|
||||||
try
|
try
|
||||||
if (FEvents <> nil) then
|
if (FEvents <> nil) then
|
||||||
ICefTextfieldDelegateEvents(FEvents).doOnGetMaximumSize(view, aResult);
|
ICefTextfieldDelegateEvents(FEvents).doOnGetMaximumSize(view, aResult);
|
||||||
@ -201,6 +207,8 @@ end;
|
|||||||
|
|
||||||
procedure TCustomTextfieldDelegate.OnGetHeightForWidth(const view: ICefView; width: Integer; var aResult: Integer);
|
procedure TCustomTextfieldDelegate.OnGetHeightForWidth(const view: ICefView; width: Integer; var aResult: Integer);
|
||||||
begin
|
begin
|
||||||
|
inherited OnGetHeightForWidth(view, width, aResult);
|
||||||
|
|
||||||
try
|
try
|
||||||
if (FEvents <> nil) then
|
if (FEvents <> nil) then
|
||||||
ICefTextfieldDelegateEvents(FEvents).doOnGetHeightForWidth(view, width, aResult);
|
ICefTextfieldDelegateEvents(FEvents).doOnGetHeightForWidth(view, width, aResult);
|
||||||
|
@ -371,6 +371,7 @@ type
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Supported error code values.
|
/// Supported error code values.
|
||||||
|
/// <code>
|
||||||
/// Ranges:
|
/// Ranges:
|
||||||
/// 0- 99 System related errors
|
/// 0- 99 System related errors
|
||||||
/// 100-199 Connection related errors
|
/// 100-199 Connection related errors
|
||||||
@ -381,6 +382,7 @@ type
|
|||||||
/// 600-699 FTP errors
|
/// 600-699 FTP errors
|
||||||
/// 700-799 Certificate manager errors
|
/// 700-799 Certificate manager errors
|
||||||
/// 800-899 DNS resolver errors
|
/// 800-899 DNS resolver errors
|
||||||
|
/// </code>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// <para>See the uCEFConstants unit for all possible values.</para>
|
/// <para>See the uCEFConstants unit for all possible values.</para>
|
||||||
@ -701,6 +703,15 @@ type
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
TCefMenuId = type Integer;
|
TCefMenuId = type Integer;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Log items prepended to each log line.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// <para>See the uCEFConstants unit for all possible values.</para>
|
||||||
|
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_types.h">CEF source file: /include/internal/cef_types.h (cef_log_items_t)</see></para>
|
||||||
|
/// </remarks>
|
||||||
|
TCefLogItems = type Cardinal;
|
||||||
|
|
||||||
{$IFDEF FPC}
|
{$IFDEF FPC}
|
||||||
NativeInt = PtrInt;
|
NativeInt = PtrInt;
|
||||||
NativeUInt = PtrUInt;
|
NativeUInt = PtrUInt;
|
||||||
@ -3049,6 +3060,13 @@ type
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
log_severity : TCefLogSeverity;
|
log_severity : TCefLogSeverity;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
/// The log items prepended to each log line. If not set the default log items
|
||||||
|
/// will be used. Also configurable using the "log-items" command-line switch
|
||||||
|
/// with a value of "none" for no log items, or a comma-delimited list of
|
||||||
|
/// values "pid", "tid", "timestamp" or "tickcount" for custom log items.
|
||||||
|
/// </summary>
|
||||||
|
log_items : TCefLogItems;
|
||||||
|
/// <summary>
|
||||||
/// Custom flags that will be used when initializing the V8 JavaScript engine.
|
/// Custom flags that will be used when initializing the V8 JavaScript engine.
|
||||||
/// The consequences of using custom flags may not be well tested. Also
|
/// The consequences of using custom flags may not be well tested. Also
|
||||||
/// configurable using the "js-flags" command-line switch.
|
/// configurable using the "js-flags" command-line switch.
|
||||||
@ -3770,6 +3788,10 @@ type
|
|||||||
/// |header_template|.
|
/// |header_template|.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
footer_template : TCefString;
|
footer_template : TCefString;
|
||||||
|
/// <summary>
|
||||||
|
/// Set to true (1) to generate tagged (accessible) PDF.
|
||||||
|
/// </summary>
|
||||||
|
generate_tagged_pdf : integer;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -4253,7 +4275,14 @@ type
|
|||||||
/// Used to indicate whether HTTPS-First Mode is enabled on the hostname.
|
/// Used to indicate whether HTTPS-First Mode is enabled on the hostname.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
CEF_CONTENT_SETTING_TYPE_HTTPS_ENFORCED,
|
CEF_CONTENT_SETTING_TYPE_HTTPS_ENFORCED,
|
||||||
|
/// <summary>
|
||||||
|
/// Stores per origin metadata for cookie controls.
|
||||||
|
/// </summary>
|
||||||
|
CEF_CONTENT_SETTING_TYPE_COOKIE_CONTROLS_METADATA,
|
||||||
|
/// <summary>
|
||||||
|
/// Setting for supporting 3PCD.
|
||||||
|
/// </summary>
|
||||||
|
CEF_CONTENT_SETTING_TYPE_TPCD_SUPPORT,
|
||||||
CEF_CONTENT_SETTING_TYPE_NUM_TYPES
|
CEF_CONTENT_SETTING_TYPE_NUM_TYPES
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -7365,13 +7394,14 @@ type
|
|||||||
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/capi/views/cef_browser_view_delegate_capi.h">CEF source file: /include/capi/views/cef_browser_view_delegate_capi.h (cef_browser_view_delegate_t)</see></para>
|
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/capi/views/cef_browser_view_delegate_capi.h">CEF source file: /include/capi/views/cef_browser_view_delegate_capi.h (cef_browser_view_delegate_t)</see></para>
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
TCefBrowserViewDelegate = record
|
TCefBrowserViewDelegate = record
|
||||||
base : TCefViewDelegate;
|
base : TCefViewDelegate;
|
||||||
on_browser_created : procedure(self: PCefBrowserViewDelegate; browser_view: PCefBrowserView; browser: PCefBrowser); stdcall;
|
on_browser_created : procedure(self: PCefBrowserViewDelegate; browser_view: PCefBrowserView; browser: PCefBrowser); stdcall;
|
||||||
on_browser_destroyed : procedure(self: PCefBrowserViewDelegate; browser_view: PCefBrowserView; browser: PCefBrowser); stdcall;
|
on_browser_destroyed : procedure(self: PCefBrowserViewDelegate; browser_view: PCefBrowserView; browser: PCefBrowser); stdcall;
|
||||||
get_delegate_for_popup_browser_view : function(self: PCefBrowserViewDelegate; browser_view: PCefBrowserView; const settings: PCefBrowserSettings; client: PCefClient; is_devtools: Integer): PCefBrowserViewDelegate; stdcall;
|
get_delegate_for_popup_browser_view : function(self: PCefBrowserViewDelegate; browser_view: PCefBrowserView; const settings: PCefBrowserSettings; client: PCefClient; is_devtools: Integer): PCefBrowserViewDelegate; stdcall;
|
||||||
on_popup_browser_view_created : function(self: PCefBrowserViewDelegate; browser_view, popup_browser_view: PCefBrowserView; is_devtools: Integer): Integer; stdcall;
|
on_popup_browser_view_created : function(self: PCefBrowserViewDelegate; browser_view, popup_browser_view: PCefBrowserView; is_devtools: Integer): Integer; stdcall;
|
||||||
get_chrome_toolbar_type : function(self: PCefBrowserViewDelegate): TCefChromeToolbarType; stdcall;
|
get_chrome_toolbar_type : function(self: PCefBrowserViewDelegate): TCefChromeToolbarType; stdcall;
|
||||||
on_gesture_command : function(self: PCefBrowserViewDelegate; browser_view: PCefBrowserView; gesture_command: TCefGestureCommand): Integer; stdcall;
|
use_frameless_window_for_picture_in_picture : function(self: PCefBrowserViewDelegate; browser_view: PCefBrowserView): integer; stdcall;
|
||||||
|
on_gesture_command : function(self: PCefBrowserViewDelegate; browser_view: PCefBrowserView; gesture_command: TCefGestureCommand): Integer; stdcall;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
CEF_SUPPORTED_VERSION_MAJOR = 116;
|
CEF_SUPPORTED_VERSION_MAJOR = 117;
|
||||||
CEF_SUPPORTED_VERSION_MINOR = 0;
|
CEF_SUPPORTED_VERSION_MINOR = 1;
|
||||||
CEF_SUPPORTED_VERSION_RELEASE = 27;
|
CEF_SUPPORTED_VERSION_RELEASE = 4;
|
||||||
CEF_SUPPORTED_VERSION_BUILD = 0;
|
CEF_SUPPORTED_VERSION_BUILD = 0;
|
||||||
|
|
||||||
CEF_CHROMEELF_VERSION_MAJOR = CEF_SUPPORTED_VERSION_MAJOR;
|
CEF_CHROMEELF_VERSION_MAJOR = CEF_SUPPORTED_VERSION_MAJOR;
|
||||||
CEF_CHROMEELF_VERSION_MINOR = 0;
|
CEF_CHROMEELF_VERSION_MINOR = 0;
|
||||||
CEF_CHROMEELF_VERSION_RELEASE = 5845;
|
CEF_CHROMEELF_VERSION_RELEASE = 5938;
|
||||||
CEF_CHROMEELF_VERSION_BUILD = 190;
|
CEF_CHROMEELF_VERSION_BUILD = 92;
|
||||||
|
@ -332,22 +332,25 @@ end;
|
|||||||
|
|
||||||
procedure TCefViewDelegateOwn.OnGetPreferredSize(const view: ICefView; var aResult : TCefSize);
|
procedure TCefViewDelegateOwn.OnGetPreferredSize(const view: ICefView; var aResult : TCefSize);
|
||||||
begin
|
begin
|
||||||
//
|
aResult.width := 0;
|
||||||
|
aResult.height := 0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCefViewDelegateOwn.OnGetMinimumSize(const view: ICefView; var aResult : TCefSize);
|
procedure TCefViewDelegateOwn.OnGetMinimumSize(const view: ICefView; var aResult : TCefSize);
|
||||||
begin
|
begin
|
||||||
//
|
aResult.width := 0;
|
||||||
|
aResult.height := 0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCefViewDelegateOwn.OnGetMaximumSize(const view: ICefView; var aResult : TCefSize);
|
procedure TCefViewDelegateOwn.OnGetMaximumSize(const view: ICefView; var aResult : TCefSize);
|
||||||
begin
|
begin
|
||||||
//
|
aResult.width := 0;
|
||||||
|
aResult.height := 0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCefViewDelegateOwn.OnGetHeightForWidth(const view: ICefView; width: Integer; var aResult: Integer);
|
procedure TCefViewDelegateOwn.OnGetHeightForWidth(const view: ICefView; width: Integer; var aResult: Integer);
|
||||||
begin
|
begin
|
||||||
//
|
aResult := 0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCefViewDelegateOwn.OnParentViewChanged(const view: ICefView; added: boolean; const parent: ICefView);
|
procedure TCefViewDelegateOwn.OnParentViewChanged(const view: ICefView; added: boolean; const parent: ICefView);
|
||||||
@ -401,6 +404,8 @@ end;
|
|||||||
|
|
||||||
procedure TCustomViewDelegate.OnGetPreferredSize(const view: ICefView; var aResult : TCefSize);
|
procedure TCustomViewDelegate.OnGetPreferredSize(const view: ICefView; var aResult : TCefSize);
|
||||||
begin
|
begin
|
||||||
|
inherited OnGetPreferredSize(view, aResult);
|
||||||
|
|
||||||
try
|
try
|
||||||
if (FEvents <> nil) then
|
if (FEvents <> nil) then
|
||||||
ICefViewDelegateEvents(FEvents).doOnGetPreferredSize(view, aResult);
|
ICefViewDelegateEvents(FEvents).doOnGetPreferredSize(view, aResult);
|
||||||
@ -412,6 +417,8 @@ end;
|
|||||||
|
|
||||||
procedure TCustomViewDelegate.OnGetMinimumSize(const view: ICefView; var aResult : TCefSize);
|
procedure TCustomViewDelegate.OnGetMinimumSize(const view: ICefView; var aResult : TCefSize);
|
||||||
begin
|
begin
|
||||||
|
inherited OnGetMinimumSize(view, aResult);
|
||||||
|
|
||||||
try
|
try
|
||||||
if (FEvents <> nil) then
|
if (FEvents <> nil) then
|
||||||
ICefViewDelegateEvents(FEvents).doOnGetMinimumSize(view, aResult);
|
ICefViewDelegateEvents(FEvents).doOnGetMinimumSize(view, aResult);
|
||||||
@ -423,6 +430,8 @@ end;
|
|||||||
|
|
||||||
procedure TCustomViewDelegate.OnGetMaximumSize(const view: ICefView; var aResult : TCefSize);
|
procedure TCustomViewDelegate.OnGetMaximumSize(const view: ICefView; var aResult : TCefSize);
|
||||||
begin
|
begin
|
||||||
|
inherited OnGetMaximumSize(view, aResult);
|
||||||
|
|
||||||
try
|
try
|
||||||
if (FEvents <> nil) then
|
if (FEvents <> nil) then
|
||||||
ICefViewDelegateEvents(FEvents).doOnGetMaximumSize(view, aResult);
|
ICefViewDelegateEvents(FEvents).doOnGetMaximumSize(view, aResult);
|
||||||
@ -434,6 +443,8 @@ end;
|
|||||||
|
|
||||||
procedure TCustomViewDelegate.OnGetHeightForWidth(const view: ICefView; width: Integer; var aResult: Integer);
|
procedure TCustomViewDelegate.OnGetHeightForWidth(const view: ICefView; width: Integer; var aResult: Integer);
|
||||||
begin
|
begin
|
||||||
|
inherited OnGetHeightForWidth(view, width, aResult);
|
||||||
|
|
||||||
try
|
try
|
||||||
if (FEvents <> nil) then
|
if (FEvents <> nil) then
|
||||||
ICefViewDelegateEvents(FEvents).doOnGetHeightForWidth(view, width, aResult);
|
ICefViewDelegateEvents(FEvents).doOnGetHeightForWidth(view, width, aResult);
|
||||||
|
@ -39,12 +39,13 @@ type
|
|||||||
// ICefPanelDelegate
|
// ICefPanelDelegate
|
||||||
|
|
||||||
// ICefBrowserViewDelegate
|
// ICefBrowserViewDelegate
|
||||||
TOnBrowserCreatedEvent = procedure(const Sender: TObject; const browser_view: ICefBrowserView; const browser: ICefBrowser) of object;
|
TOnBrowserCreatedEvent = procedure(const Sender: TObject; const browser_view: ICefBrowserView; const browser: ICefBrowser) of object;
|
||||||
TOnBrowserDestroyedEvent = procedure(const Sender: TObject; const browser_view: ICefBrowserView; const browser: ICefBrowser) of object;
|
TOnBrowserDestroyedEvent = procedure(const Sender: TObject; const browser_view: ICefBrowserView; const browser: ICefBrowser) of object;
|
||||||
TOnGetDelegateForPopupBrowserViewEvent = procedure(const Sender: TObject; const browser_view: ICefBrowserView; const settings: TCefBrowserSettings; const client: ICefClient; is_devtools: boolean; var aResult : ICefBrowserViewDelegate) of object;
|
TOnGetDelegateForPopupBrowserViewEvent = procedure(const Sender: TObject; const browser_view: ICefBrowserView; const settings: TCefBrowserSettings; const client: ICefClient; is_devtools: boolean; var aResult : ICefBrowserViewDelegate) of object;
|
||||||
TOnPopupBrowserViewCreatedEvent = procedure(const Sender: TObject; const browser_view, popup_browser_view: ICefBrowserView; is_devtools: boolean; var aResult : boolean) of object;
|
TOnPopupBrowserViewCreatedEvent = procedure(const Sender: TObject; const browser_view, popup_browser_view: ICefBrowserView; is_devtools: boolean; var aResult : boolean) of object;
|
||||||
TOnGetChromeToolbarTypeEvent = procedure(const Sender: TObject; var aChromeToolbarType: TCefChromeToolbarType) of object;
|
TOnGetChromeToolbarTypeEvent = procedure(const Sender: TObject; var aChromeToolbarType: TCefChromeToolbarType) of object;
|
||||||
TOnGestureCommandEvent = procedure(const Sender: TObject; const browser_view: ICefBrowserView; var aResult : boolean) of object;
|
TOnUseFramelessWindowForPictureInPicture = procedure(const Sender: TObject; const browser_view: ICefBrowserView; var aResult : boolean) of object;
|
||||||
|
TOnGestureCommandEvent = procedure(const Sender: TObject; const browser_view: ICefBrowserView; gesture_command: TCefGestureCommand; var aResult : boolean) of object;
|
||||||
|
|
||||||
// ICefButtonDelegate
|
// ICefButtonDelegate
|
||||||
TOnButtonPressedEvent = procedure(const Sender: TObject; const button: ICefButton) of object;
|
TOnButtonPressedEvent = procedure(const Sender: TObject; const button: ICefButton) of object;
|
||||||
|
@ -29,18 +29,38 @@ uses
|
|||||||
uCEFTypes, uCEFInterfaces;
|
uCEFTypes, uCEFInterfaces;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
/// <summary>
|
||||||
|
/// Custom TWinControl used by CEF browsers.
|
||||||
|
/// </summary>
|
||||||
TCEFWinControl = class(TWinControl)
|
TCEFWinControl = class(TWinControl)
|
||||||
protected
|
protected
|
||||||
function GetChildWindowHandle : {$IFNDEF MSWINDOWS}{$IFDEF FPC}LclType.{$ENDIF}{$ENDIF}THandle; virtual;
|
function GetChildWindowHandle : {$IFNDEF MSWINDOWS}{$IFDEF FPC}LclType.{$ENDIF}{$ENDIF}THandle; virtual;
|
||||||
procedure Resize; override;
|
procedure Resize; override;
|
||||||
|
|
||||||
public
|
public
|
||||||
|
/// <summary>
|
||||||
|
/// Take a snapshot of the browser contents into aBitmap. This function only works in Windows without hardware acceleration.
|
||||||
|
/// </summary>
|
||||||
function TakeSnapshot(var aBitmap : TBitmap) : boolean;
|
function TakeSnapshot(var aBitmap : TBitmap) : boolean;
|
||||||
|
/// <summary>
|
||||||
|
/// Destroy the child windows created by the browser.
|
||||||
|
/// </summary>
|
||||||
function DestroyChildWindow : boolean;
|
function DestroyChildWindow : boolean;
|
||||||
|
/// <summary>
|
||||||
|
/// Exposes the CreateHandle procedure to create the Handle at any time.
|
||||||
|
/// </summary>
|
||||||
procedure CreateHandle; override;
|
procedure CreateHandle; override;
|
||||||
|
/// <summary>
|
||||||
|
/// Invalidate the child windows created by the browser.
|
||||||
|
/// </summary>
|
||||||
procedure InvalidateChildren;
|
procedure InvalidateChildren;
|
||||||
|
/// <summary>
|
||||||
|
/// Updates the size of the child windows created by the browser.
|
||||||
|
/// </summary>
|
||||||
procedure UpdateSize; virtual;
|
procedure UpdateSize; virtual;
|
||||||
|
/// <summary>
|
||||||
|
/// Handle of the first child window created by the browser.
|
||||||
|
/// </summary>
|
||||||
property ChildWindowHandle : THandle read GetChildWindowHandle;
|
property ChildWindowHandle : THandle read GetChildWindowHandle;
|
||||||
|
|
||||||
published
|
published
|
||||||
|
@ -27,6 +27,10 @@ uses
|
|||||||
|
|
||||||
type
|
type
|
||||||
{$IFNDEF FPC}{$IFDEF DELPHI16_UP}[ComponentPlatformsAttribute(pfidWindows)]{$ENDIF}{$ENDIF}
|
{$IFNDEF FPC}{$IFDEF DELPHI16_UP}[ComponentPlatformsAttribute(pfidWindows)]{$ENDIF}{$ENDIF}
|
||||||
|
/// <summary>
|
||||||
|
/// <para>Implementation of an external message pump for VCL and LCL.</para>
|
||||||
|
/// <para>Read the GlobalCEFApp.OnScheduleMessagePumpWork documentation for all the details.</para>
|
||||||
|
/// </summary>
|
||||||
TCEFWorkScheduler = class(TComponent)
|
TCEFWorkScheduler = class(TComponent)
|
||||||
protected
|
protected
|
||||||
FThread : TCEFWorkSchedulerThread;
|
FThread : TCEFWorkSchedulerThread;
|
||||||
@ -73,22 +77,59 @@ type
|
|||||||
procedure Thread_OnPulse(Sender : TObject);
|
procedure Thread_OnPulse(Sender : TObject);
|
||||||
|
|
||||||
public
|
public
|
||||||
|
/// <summary>
|
||||||
|
/// Full constructor of TCEFWorkScheduler. This constructor also creates the internal threads.
|
||||||
|
/// </summary>
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
|
/// <summary>
|
||||||
|
/// Partial constructor of TCEFWorkScheduler. This constructor doesn't create any threads.
|
||||||
|
/// Call TCEFWorkScheduler.CreateThread when necessary.
|
||||||
|
/// </summary>
|
||||||
constructor CreateDelayed;
|
constructor CreateDelayed;
|
||||||
|
/// <summary>
|
||||||
|
/// TCEFWorkScheduler destructor.
|
||||||
|
/// </summary>
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
|
/// <summary>
|
||||||
|
/// Called from GlobalCEFApp.OnScheduleMessagePumpWork to schedule
|
||||||
|
/// a GlobalCEFApp.DoMessageLoopWork call asynchronously to perform a single
|
||||||
|
/// iteration of CEF message loop processing.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="delay_ms">Requested delay in milliseconds.</param>
|
||||||
procedure ScheduleMessagePumpWork(const delay_ms : int64);
|
procedure ScheduleMessagePumpWork(const delay_ms : int64);
|
||||||
|
/// <summary>
|
||||||
|
/// Stop the scheduler. This function must be called after the destruction of all the forms in the application.
|
||||||
|
/// </summary>
|
||||||
procedure StopScheduler;
|
procedure StopScheduler;
|
||||||
|
/// <summary>
|
||||||
|
/// Creates all the internal threads used by TCEFWorkScheduler.
|
||||||
|
/// </summary>
|
||||||
procedure CreateThread;
|
procedure CreateThread;
|
||||||
|
|
||||||
published
|
published
|
||||||
{$IFDEF MSWINDOWS}
|
{$IFDEF MSWINDOWS}
|
||||||
{$WARN SYMBOL_PLATFORM OFF}
|
{$WARN SYMBOL_PLATFORM OFF}
|
||||||
|
/// <summary>
|
||||||
|
/// Priority of TCEFWorkSchedulerThread in Windows.
|
||||||
|
/// </summary>
|
||||||
property Priority : TThreadPriority read FPriority write SetPriority default tpNormal;
|
property Priority : TThreadPriority read FPriority write SetPriority default tpNormal;
|
||||||
{$WARN SYMBOL_PLATFORM ON}
|
{$WARN SYMBOL_PLATFORM ON}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
/// <summary>
|
||||||
|
/// Default interval in milliseconds to do the next GlobalCEFApp.DoMessageLoopWork call.
|
||||||
|
/// </summary>
|
||||||
property DefaultInterval : integer read FDefaultInterval write SetDefaultInterval default CEF_TIMER_MAXDELAY;
|
property DefaultInterval : integer read FDefaultInterval write SetDefaultInterval default CEF_TIMER_MAXDELAY;
|
||||||
|
/// <summary>
|
||||||
|
/// Number of cycles used to deplete the remaining messages in the work loop.
|
||||||
|
/// </summary>
|
||||||
property DepleteWorkCycles : cardinal read FDepleteWorkCycles write FDepleteWorkCycles default CEF_TIMER_DEPLETEWORK_CYCLES;
|
property DepleteWorkCycles : cardinal read FDepleteWorkCycles write FDepleteWorkCycles default CEF_TIMER_DEPLETEWORK_CYCLES;
|
||||||
|
/// <summary>
|
||||||
|
/// Delay in milliseconds between the cycles used to deplete the remaining messages in the work loop.
|
||||||
|
/// </summary>
|
||||||
property DepleteWorkDelay : cardinal read FDepleteWorkDelay write FDepleteWorkDelay default CEF_TIMER_DEPLETEWORK_DELAY;
|
property DepleteWorkDelay : cardinal read FDepleteWorkDelay write FDepleteWorkDelay default CEF_TIMER_DEPLETEWORK_DELAY;
|
||||||
|
/// <summary>
|
||||||
|
/// Use a custom queue thread instead of Windows messages or any other way to schedule the next pump work.
|
||||||
|
/// </summary>
|
||||||
property UseQueueThread : boolean read FUseQueueThread write FUseQueueThread default False;
|
property UseQueueThread : boolean read FUseQueueThread write FUseQueueThread default False;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@ begin
|
|||||||
Result := 0;
|
Result := 0;
|
||||||
|
|
||||||
if Lock then
|
if Lock then
|
||||||
begin
|
try
|
||||||
TempLen := length(FValues);
|
TempLen := length(FValues);
|
||||||
|
|
||||||
if (TempLen > 0) then
|
if (TempLen > 0) then
|
||||||
@ -137,7 +137,7 @@ begin
|
|||||||
Finalize(TempNewValues);
|
Finalize(TempNewValues);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
finally
|
||||||
Unlock;
|
Unlock;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -147,13 +147,13 @@ begin
|
|||||||
Result := False;
|
Result := False;
|
||||||
|
|
||||||
if Lock then
|
if Lock then
|
||||||
begin
|
try
|
||||||
if not(Terminated) and not(FStop) then
|
if not(Terminated) and not(FStop) then
|
||||||
begin
|
begin
|
||||||
FWaiting := False;
|
FWaiting := False;
|
||||||
Result := (Length(FValues) > 0);
|
Result := (Length(FValues) > 0);
|
||||||
end;
|
end;
|
||||||
|
finally
|
||||||
Unlock;
|
Unlock;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -161,7 +161,7 @@ end;
|
|||||||
procedure TCEFWorkSchedulerQueueThread.StopThread;
|
procedure TCEFWorkSchedulerQueueThread.StopThread;
|
||||||
begin
|
begin
|
||||||
if Lock then
|
if Lock then
|
||||||
begin
|
try
|
||||||
FStop := True;
|
FStop := True;
|
||||||
|
|
||||||
if FWaiting then
|
if FWaiting then
|
||||||
@ -169,7 +169,7 @@ begin
|
|||||||
FWaiting := False;
|
FWaiting := False;
|
||||||
FEvent.SetEvent;
|
FEvent.SetEvent;
|
||||||
end;
|
end;
|
||||||
|
finally
|
||||||
Unlock;
|
Unlock;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
"UpdateLazPackages" : [
|
"UpdateLazPackages" : [
|
||||||
{
|
{
|
||||||
"ForceNotify" : true,
|
"ForceNotify" : true,
|
||||||
"InternalVersion" : 517,
|
"InternalVersion" : 518,
|
||||||
"Name" : "cef4delphi_lazarus.lpk",
|
"Name" : "cef4delphi_lazarus.lpk",
|
||||||
"Version" : "116.0.27"
|
"Version" : "117.1.4"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"UpdatePackageData" : {
|
"UpdatePackageData" : {
|
||||||
|
Loading…
Reference in New Issue
Block a user