Beispiel #1
0
        protected override void OnRenderProcessTerminated(CefBrowser browser, CefTerminationStatus status)
        {
            var e = new RenderProcessTerminatedEventArgs(browser, status);

            _owner.InvokeIfRequired(() => _owner.OnRenderProcessTerminated(e));

            _owner.WebView.ProcessMessageBridge.OnRenderProcessTerminated(browser);

            if (e.ShouldTryResetProcess && status != CefTerminationStatus.Termination)
            {
                //browser.Reload();
                //browser.Reload();
                // System.Windows.Forms.MessageBox.Show(browser.GetMainFrame().Url);
                if (!browser.GetMainFrame().Url.Contains("?fromCustormBrowser=1"))
                {
                    browser.GetMainFrame().LoadUrl(browser.GetMainFrame().Url + "?fromCustormBrowser=1");
                }
                else
                {
                    browser.GetMainFrame().LoadUrl(browser.GetMainFrame().Url);
                }

                _owner.AttachChromeWidgetMessageHandler();
            }
        }
Beispiel #2
0
        protected override void OnRenderProcessTerminated(CefBrowser browser, CefTerminationStatus status)
        {
            var e = new RenderProcessTerminatedEventArgs(browser, status);

            _owner.InvokeIfRequired(() => _owner.OnRenderProcessTerminated(e));

            _owner.WebView.ProcessMessageBridge.OnRenderProcessTerminated(browser);

            if (e.ShouldTryResetProcess && status != CefTerminationStatus.Termination)
            {
                browser.Reload();
            }
        }