Beispiel #1
0
        protected virtual CefGlueClient CreateWebClient()
        {
            IoC.RegisterInstance(typeof(CefGlueBrowser), typeof(CefGlueBrowser).FullName, this);
            CefGlueClient client = new CefGlueClient(CefGlueClientParams.Create(this));

            return(client);
        }
Beispiel #2
0
        /// <summary>
        /// The create web client.
        /// </summary>
        /// <returns>
        /// The <see cref="CefGlueClient"/>.
        /// </returns>
        private CefGlueClient CreateWebClient()
        {
            IoC.RegisterInstance(typeof(CefGlueBrowser), typeof(CefGlueBrowser).FullName, this);
            var client = new CefGlueClient(CefGlueClientParams.Create(this));

            return(client);
        }
Beispiel #3
0
        /// <summary>
        /// The create.
        /// </summary>
        /// <param name="windowInfo">
        /// The window info.
        /// </param>
        public void Create(CefWindowInfo windowInfo)
        {
            if (mClient == null)
            {
                IoC.RegisterInstance(typeof(CefGlueBrowser), typeof(CefGlueBrowser).FullName, this);
                mClient = new CefGlueClient(CefGlueClientParams.Create(this));
            }

            mSettings = this.mSettings ?? new CefBrowserSettings();

            mSettings.DefaultEncoding             = "UTF-8";
            mSettings.FileAccessFromFileUrls      = CefState.Enabled;
            mSettings.UniversalAccessFromFileUrls = CefState.Enabled;
            mSettings.WebSecurity = CefState.Enabled;

            CefBrowserHost.CreateBrowser(windowInfo, mClient, mSettings, StartUrl);
        }