/// <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); }
/// <summary> /// The create. /// </summary> /// <param name="windowInfo"> /// The window info. /// </param> public void Create(CefWindowInfo windowInfo) { if (_client == null) { var handlers = CefGlueCustomHandlers.Parse(_container, _config, _commandTaskRunner, this); _client = new CefGlueClient(this, _browserMessageRouter, handlers); } if (_settings == null) { _settings = new CefBrowserSettings(); } _settings.DefaultEncoding = "UTF-8"; _settings.FileAccessFromFileUrls = CefState.Enabled; _settings.UniversalAccessFromFileUrls = CefState.Enabled; _settings.WebSecurity = CefState.Disabled; CefBrowserHost.CreateBrowser(windowInfo, _client, _settings, StartUrl); }