1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-11-23 21:34:53 +02:00

Update to CEF 80.1.2

- Added TCEFMediaObserverComponent
- Removed TBufferPanel.OnWrongSize
- Removed TFMXBufferPanel.OnWrongSize
This commit is contained in:
Salvador Díaz Fau
2020-03-29 17:31:42 +02:00
parent beb287e22c
commit 1984ab16ba
61 changed files with 1742 additions and 272 deletions

View File

@@ -69,7 +69,7 @@ type
TCustomServerHandler = class(TCEFServerHandlerOwn)
protected
FEvents : IServerEvents;
FEvents : Pointer;
procedure OnServerCreated(const server: ICefServer); override;
procedure OnServerDestroyed(const server: ICefServer); override;
@@ -278,7 +278,7 @@ constructor TCustomServerHandler.Create(const events: IServerEvents);
begin
inherited Create;
FEvents := events;
FEvents := Pointer(events);
end;
destructor TCustomServerHandler.Destroy;
@@ -291,7 +291,8 @@ end;
procedure TCustomServerHandler.OnServerCreated(const server: ICefServer);
begin
try
if (FEvents <> nil) then FEvents.doOnServerCreated(server);
if (FEvents <> nil) then
IServerEvents(FEvents).doOnServerCreated(server);
except
on e : exception do
if CustomExceptionHandler('TCustomServerHandler.OnServerCreated', e) then raise;
@@ -301,7 +302,8 @@ end;
procedure TCustomServerHandler.OnServerDestroyed(const server: ICefServer);
begin
try
if (FEvents <> nil) then FEvents.doOnServerDestroyed(server);
if (FEvents <> nil) then
IServerEvents(FEvents).doOnServerDestroyed(server);
except
on e : exception do
if CustomExceptionHandler('TCustomServerHandler.OnServerDestroyed', e) then raise;
@@ -311,7 +313,8 @@ end;
procedure TCustomServerHandler.OnClientConnected(const server: ICefServer; connection_id: Integer);
begin
try
if (FEvents <> nil) then FEvents.doOnClientConnected(server, connection_id);
if (FEvents <> nil) then
IServerEvents(FEvents).doOnClientConnected(server, connection_id);
except
on e : exception do
if CustomExceptionHandler('TCustomServerHandler.OnClientConnected', e) then raise;
@@ -321,7 +324,8 @@ end;
procedure TCustomServerHandler.OnClientDisconnected(const server: ICefServer; connection_id: Integer);
begin
try
if (FEvents <> nil) then FEvents.doOnClientDisconnected(server, connection_id);
if (FEvents <> nil) then
IServerEvents(FEvents).doOnClientDisconnected(server, connection_id);
except
on e : exception do
if CustomExceptionHandler('TCustomServerHandler.OnClientDisconnected', e) then raise;
@@ -331,7 +335,8 @@ end;
procedure TCustomServerHandler.OnHttpRequest(const server: ICefServer; connection_id: Integer; const client_address: ustring; const request: ICefRequest);
begin
try
if (FEvents <> nil) then FEvents.doOnHttpRequest(server, connection_id, client_address, request);
if (FEvents <> nil) then
IServerEvents(FEvents).doOnHttpRequest(server, connection_id, client_address, request);
except
on e : exception do
if CustomExceptionHandler('TCustomServerHandler.OnHttpRequest', e) then raise;
@@ -341,7 +346,8 @@ end;
procedure TCustomServerHandler.OnWebSocketRequest(const server: ICefServer; connection_id: Integer; const client_address: ustring; const request: ICefRequest; const callback: ICefCallback);
begin
try
if (FEvents <> nil) then FEvents.doOnWebSocketRequest(server, connection_id, client_address, request, callback);
if (FEvents <> nil) then
IServerEvents(FEvents).doOnWebSocketRequest(server, connection_id, client_address, request, callback);
except
on e : exception do
if CustomExceptionHandler('TCustomServerHandler.OnWebSocketRequest', e) then raise;
@@ -351,7 +357,8 @@ end;
procedure TCustomServerHandler.OnWebSocketConnected(const server: ICefServer; connection_id: Integer);
begin
try
if (FEvents <> nil) then FEvents.doOnWebSocketConnected(server, connection_id);
if (FEvents <> nil) then
IServerEvents(FEvents).doOnWebSocketConnected(server, connection_id);
except
on e : exception do
if CustomExceptionHandler('TCustomServerHandler.OnWebSocketConnected', e) then raise;
@@ -361,7 +368,8 @@ end;
procedure TCustomServerHandler.OnWebSocketMessage(const server: ICefServer; connection_id: Integer; const data: Pointer; data_size: NativeUInt);
begin
try
if (FEvents <> nil) then FEvents.doOnWebSocketMessage(server, connection_id, data, data_size);
if (FEvents <> nil) then
IServerEvents(FEvents).doOnWebSocketMessage(server, connection_id, data, data_size);
except
on e : exception do
if CustomExceptionHandler('TCustomServerHandler.OnWebSocketMessage', e) then raise;