Exemplo n.º 1
0
        public bool DoClose(IWebBrowser chromiumWebBrowser, IBrowser browser)
        {
            var args = new PluginEventArgs(new { chromiumWebBrowser, browser });

            args.Execute();
            return(args.GetResult(false));
        }
Exemplo n.º 2
0
        public bool OnBeforeBrowse(IWebBrowser chromiumWebBrowser, IBrowser browser, IFrame frame, IRequest request, bool userGesture, bool isRedirect)
        {
            var args = new PluginEventArgs(new { chromiumWebBrowser, browser, frame, request, userGesture, isRedirect });

            args.Execute();
            return(args.GetResult(false));
        }
Exemplo n.º 3
0
        public bool OnBeforePopup(IWebBrowser chromiumWebBrowser, IBrowser browser, IFrame frame,
                                  string targetUrl, string targetFrameName, WindowOpenDisposition targetDisposition, bool userGesture,
                                  IPopupFeatures popupFeatures, IWindowInfo windowInfo, IBrowserSettings browserSettings,
                                  ref bool noJavascriptAccess, out IWebBrowser newBrowser)
        {
            var args = new PluginEventArgs(new
            {
                chromiumWebBrowser,
                browser,
                frame,
                targetUrl,
                targetFrameName,
                targetDisposition,
                userGesture,
                popupFeatures,
                windowInfo,
                browserSettings,
                noJavascriptAccess
            });

            if (args.Execute())
            {
                noJavascriptAccess = args.Get <bool>("noJavascriptAccess");
                newBrowser         = args.Get <IWebBrowser>("newBrowser");
                return(args.GetResult(false));
            }
            else
            {
                newBrowser = null;
                return(false);
            }
        }