void remoteProcess_OnExit(RenderProcess process)
 {
     if (process == this.remoteProcess)
     {
         this.remoteBrowser = null;
         this.remoteProcess = null;
     }
 }
예제 #2
0
        internal RenderProcessHandler(RenderProcess remoteProcess)
        {
            this.remoteProcess = remoteProcess;

            this.OnContextCreated    += RenderProcessHandler_OnContextCreated;
            this.OnBrowserCreated    += RenderProcessHandler_OnBrowserCreated;
            this.OnWebKitInitialized += RenderProcessHandler_OnWebKitInitialized;
        }
예제 #3
0
 internal static int RenderProcessMain()
 {
     try {
         var rp = new RenderProcess();
         ChromiumStartup.RaiseRemoteProcessCreated(rp.processHandler);
         return(rp.RemoteMain());
     } catch (CfxRemotingException) {
         return(-1);
     }
 }
        public void SetRemoteBrowser(CfrBrowser remoteBrowser, RenderProcess remoteProcess)
        {
            this.remoteBrowser    = remoteBrowser;
            this.remoteProcess    = remoteProcess;
            remoteProcess.OnExit += new Action <RenderProcess>(remoteProcess_OnExit);
            var h = RemoteBrowserCreated;

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

            base.BrowserCreated += ChromiumBrowserEx_BrowserCreated;
        }