Esempio n. 1
0
        internal void StartBrowser(int width, int height)
        {
            var cefWindowInfo = new CefSharp.WindowInfo();

            cefWindowInfo.SetAsWindowless(IntPtr.Zero);
            cefWindowInfo.Width  = width;
            cefWindowInfo.Height = height;

            var cefBrowserSettings = new CefSharp.BrowserSettings();

            cefBrowserSettings.WindowlessFrameRate         = 60;
            cefBrowserSettings.FileAccessFromFileUrls      = CefState.Enabled;
            cefBrowserSettings.UniversalAccessFromFileUrls = CefState.Enabled;
            cefBrowserSettings.WebSecurity  = CefState.Enabled;
            cefBrowserSettings.Javascript   = CefState.Enabled;
            cefBrowserSettings.LocalStorage = CefState.Enabled;
            cefBrowserSettings.Plugins      = CefState.Disabled;

            CefBrowser.CreateBrowser(cefWindowInfo, cefBrowserSettings);
        }