internal void OnBrowserCreated(CefBrowser browser) { BrowserWindowHandle = browser.GetHost().GetWindowHandle(); Browser = browser; ProcessMessageBridge = new MessageBridgeBrowserSide(Owner); JSBridge = new JavaScriptCommunicationBridge(); ProcessMessageBridge.AddMessageHandler(JSBridge); var handlers = WinFormium.Runtime.Container.GetAllInstances <ProcessMessageBridgeHandler>(); foreach (var handler in handlers) { ProcessMessageBridge.AddMessageHandler(handler); } Owner.OnBrowserCreated(); Browser.GetHost()?.WasResized(); Browser.GetHost()?.SendFocusEvent(true); WebViewIsReady = true; }
public RenderProcessHandler() { MessageBridge = new MessageBridgeRenderSide(); JSBridge = new JavaScriptCommunicationBridge(); MessageBridge.AddMessageHandler(JSBridge); var handlers = WinFormium.Runtime.Container.GetAllInstances <ProcessMessageBridgeHandler>(); foreach (var handler in handlers) { MessageBridge.AddMessageHandler(handler); } }