Exemple #1
0
        internal RenderProcessHandler(RenderProcess remoteProcess)
        {
            this.remoteProcess = remoteProcess;

            this.OnContextCreated += RenderProcessHandler_OnContextCreated;
            this.OnBrowserCreated += RenderProcessHandler_OnBrowserCreated;
        }
 internal void RemoteProcessExited(RenderProcess.RenderProcess process)
 {
     if (process == this.remoteProcess)
     {
         this.remoteBrowser = null;
         this.remoteProcess = null;
     }
 }
 internal static int RenderProcessMain()
 {
     try {
         var rp = new RenderProcess();
         ChromiumWebBrowserBase.RaiseRemoteProcessCreated(rp.processHandler);
         return(rp.RemoteMain());
     } catch (CfxRemotingException) {
         return(-1);
     }
 }
        internal void SetRemoteBrowser(CfrBrowser remoteBrowser, RenderProcess.RenderProcess remoteProcess)
        {
            this.remoteBrowser = remoteBrowser;
            this.remoteProcess = remoteProcess;
            remoteProcess.AddBrowserReference(this);
            var h = RemoteBrowserCreated;

            if (h != null)
            {
                var e = new RemoteBrowserCreatedEventArgs(remoteBrowser);
                if (RemoteCallbacksWillInvoke && InvokeRequired)
                {
                    RenderThreadInvoke(() => { h(this, e); });
                }
                else
                {
                    h(this, e);
                }
            }
        }