Beispiel #1
0
 internal void RemoteProcessExited(RenderProcess process)
 {
     if (process == this.remoteProcess)
     {
         this.remoteBrowser = null;
         this.remoteProcess = null;
     }
 }
        public RenderProcessHandler(RenderProcess renderProcess)
        {
            this.renderProcess = renderProcess;

            this.OnContextCreated         += RenderProcessHandler_OnContextCreated;
            this.OnBrowserCreated         += RenderProcessHandler_OnBrowserCreated;
            this.OnWebKitInitialized      += RenderProcessHandler_OnWebKitInitialized;
            this.OnProcessMessageReceived += RenderProcessHandler_OnProcessMessageReceived;
        }
Beispiel #3
0
 internal static int RenderProcessMain()
 {
     try
     {
         var rp = new RenderProcess();
         BrowserCore.OnRemoteProcessCreated(rp.processHandler);
         return(rp.Initialize());
     }
     catch (CfxRemotingException)
     {
         return(-1);
     }
 }
Beispiel #4
0
        internal void SetRemoteBrowser(CfrBrowser remoteBrowser, RenderProcess remoteProcess)
        {
            this.remoteBrowser = remoteBrowser;
            this.remoteProcess = remoteProcess;
            remoteProcess.AddBrowserReference(this);
            var h = RemoteBrowserCreated;

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