You've already forked CEF4Delphi
mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-11-23 21:34:53 +02:00
Update to CEF 3.3282.1731.gfc9a4fa
- Chromium 64.0.3282.119 which should include partial MP3 support. - Fixed stability issues when you closed the browser due to circular interface references. - Fixed TCefRTTIExtension thanks to Pier. - Added the JSRTTIExtension demo to test TCefRTTIExtension. - Added the TCustomResponseFilter class to filter the resource contents. - Added the ResponseFilterBrowser demo to test the new TCustomResponseFilter class.
This commit is contained in:
@@ -54,24 +54,33 @@ type
|
||||
protected
|
||||
procedure OnFindResult(const browser: ICefBrowser; identifier, count: Integer; const selectionRect: PCefRect; activeMatchOrdinal: Integer; finalUpdate: Boolean); virtual; abstract;
|
||||
|
||||
procedure RemoveReferences; virtual;
|
||||
|
||||
public
|
||||
constructor Create; virtual;
|
||||
end;
|
||||
|
||||
TCustomFindHandler = class(TCefFindHandlerOwn)
|
||||
protected
|
||||
FEvent: IChromiumEvents;
|
||||
FEvents : Pointer;
|
||||
|
||||
procedure OnFindResult(const browser: ICefBrowser; identifier, count: Integer; const selectionRect: PCefRect; activeMatchOrdinal: Integer; finalUpdate: Boolean); override;
|
||||
|
||||
procedure RemoveReferences; override;
|
||||
|
||||
public
|
||||
constructor Create(const events: IChromiumEvents); reintroduce; virtual;
|
||||
constructor Create(const events: Pointer); reintroduce; virtual;
|
||||
destructor Destroy; override;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
{$IFDEF DELPHI16_UP}
|
||||
System.SysUtils,
|
||||
{$ELSE}
|
||||
SysUtils,
|
||||
{$ENDIF}
|
||||
uCEFMiscFunctions, uCEFLibFunctions, uCEFBrowser;
|
||||
|
||||
procedure cef_find_handler_on_find_result(self: PCefFindHandler; browser: PCefBrowser; identifier, count: Integer; const selection_rect: PCefRect; active_match_ordinal, final_update: Integer); stdcall;
|
||||
@@ -87,26 +96,40 @@ begin
|
||||
with PCefFindHandler(FData)^ do on_find_result := cef_find_handler_on_find_result;
|
||||
end;
|
||||
|
||||
procedure TCefFindHandlerOwn.RemoveReferences;
|
||||
begin
|
||||
//
|
||||
end;
|
||||
|
||||
// TCustomFindHandler
|
||||
|
||||
constructor TCustomFindHandler.Create(const events: IChromiumEvents);
|
||||
constructor TCustomFindHandler.Create(const events: Pointer);
|
||||
begin
|
||||
inherited Create;
|
||||
|
||||
FEvent := events;
|
||||
FEvents := events;
|
||||
end;
|
||||
|
||||
destructor TCustomFindHandler.Destroy;
|
||||
begin
|
||||
FEvent := nil;
|
||||
RemoveReferences;
|
||||
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
procedure TCustomFindHandler.OnFindResult(const browser: ICefBrowser; identifier, count: Integer; const selectionRect: PCefRect; activeMatchOrdinal: Integer; finalUpdate: Boolean);
|
||||
procedure TCustomFindHandler.RemoveReferences;
|
||||
begin
|
||||
if (FEvent <> nil) then
|
||||
FEvent.doOnFindResult(browser, identifier, count, selectionRect, activeMatchOrdinal, finalUpdate);
|
||||
FEvents := nil;
|
||||
end;
|
||||
|
||||
procedure TCustomFindHandler.OnFindResult(const browser : ICefBrowser;
|
||||
identifier : Integer;
|
||||
count : Integer;
|
||||
const selectionRect : PCefRect;
|
||||
activeMatchOrdinal : Integer;
|
||||
finalUpdate : Boolean);
|
||||
begin
|
||||
if (FEvents <> nil) then IChromiumEvents(FEvents).doOnFindResult(browser, identifier, count, selectionRect, activeMatchOrdinal, finalUpdate);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
Reference in New Issue
Block a user