Inheritance: Xilium.CefGlue.CefClient
        private Task<IWebBrowserWindowProvider> InitTask(string fullpath, IWebSessionLogger logger)
        {
            TaskCompletionSource<IWebBrowserWindowProvider> tcs = new TaskCompletionSource<IWebBrowserWindowProvider>();
            Task.Run(async () =>
            {
                var cefWindowInfo = CefWindowInfo.Create();
                cefWindowInfo.SetAsWindowless(IntPtr.Zero, true);

                //// Settings for the browser window itself (e.g. enable JavaScript?).
                var cefBrowserSettings = new CefBrowserSettings();

                // Initialize some the cust interactions with the browser process.
                var cefClient = new TestCefClient();

                // Start up the browser instance.
                CefBrowserHost.CreateBrowser(cefWindowInfo, cefClient, cefBrowserSettings, fullpath);

                _CefBrowser = await cefClient.GetLoadedBrowserAsync();

                _CefFrame = _CefBrowser.GetMainFrame();
                _TestCefGlueHTMLWindowProvider = new TestCefGlueHTMLWindowProvider(_CefFrame, cefClient);
                tcs.SetResult(_TestCefGlueHTMLWindowProvider);
            });

            return tcs.Task;
        }
 public TestCefGlueHTMLWindowProvider(CefFrame iFrame, TestCefClient cefClient)
 {
     _TestCefClient = cefClient;
     HtmlWindow     = new TestCefGlueWindow(iFrame, cefClient);
 }
 public TestCefGlueHTMLWindowProvider(CefFrame iFrame, TestCefClient cefClient)
 {
     _TestCefClient = cefClient;
     HTMLWindow = new TestCefGlueWindow(iFrame, cefClient);
 }
 public TestCefGlueWindow(CefFrame iFrame, TestCefClient client)
 {
     _CefFrame = iFrame;
     _TestCefClient = client;
     _TestCefClient.TestDisplayHandler.ConsoleMessage += OnConsoleMessage;
 }
Exemplo n.º 5
0
 public TestCefGlueWindow(CefFrame iFrame, TestCefClient client)
 {
     _CefFrame      = iFrame;
     _TestCefClient = client;
     _TestCefClient.TestDisplayHandler.ConsoleMessage += OnConsoleMessage;
 }