I have static class for management GlobalCef operations.
Like;
Code: Select all
TWebCanvasGlobalCEFManager = class
private
class var
FContextCreatedEvenList: TList<TOnContextCreatedEvent>;
class var
FLock: TCriticalSection;
private
class procedure Lock; inline;
class procedure UnLock; inline;
class function MethodPointersEqual(const MethodPointer1, MethodPointer2): Boolean;
public
class procedure RegisterContextCreatedEvent(const Event: TOnContextCreatedEvent);
class procedure UnRegisterContextCreatedEvent(const Event: TOnContextCreatedEvent);
class procedure CreateGlobalCEFApp;
class constructor Create;
class destructor Destroy;
end;
Code: Select all
GlobalCEFApp.OnContextCreated :=
procedure(const browser: ICefBrowser; const frame: ICefFrame; const context: ICefv8Context)
begin
end;
I am calling RegisterContextCreatedEvent method in before my chroimum is created. I know it works different processes. How can i do ?
You can see debug.log file below;
Thanks.[0712/025012.330:ERROR:CEF4Delphi(1)] Created Chroimum
[0712/025012.384:ERROR:CEF4Delphi(1)] list count 1 (count in chromium)
[0712/025012.682:ERROR:CEF4Delphi(1)] OnContextCreated
[0712/025012.682:ERROR:CEF4Delphi(1)] list count 0
[0712/025012.770:ERROR:CEF4Delphi(1)] OnContextCreated
[0712/025012.770:ERROR:CEF4Delphi(1)] list count 0
[0712/025012.790:ERROR:CEF4Delphi(1)] OnContextCreated
[0712/025012.790:ERROR:CEF4Delphi(1)] list count 0