Beispiel #1
0
        public static void Initialize()
        {
            int    offset         = 1;
            var    tempConfigPath = FileHelper.GetPhysicalPath(_configFile);
            string configContent  = "";

            if (File.Exists(tempConfigPath))
            {
                configContent = File.ReadAllText(tempConfigPath);
            }
            if (string.IsNullOrEmpty(configContent))
            {
                UseDefaultArgments();
                return;
            }
            try
            {
                var config = configContent.ToObjectFromXml <CefCommandLineArgments>();
                if (config != null)
                {
                    CommandLineArgments = config;
                }
                else
                {
                    UseDefaultArgments();
                }
            }
            catch (Exception e)
            {
                UseDefaultArgments();
            }
        }
Beispiel #2
0
        private static void UseDefaultArgments()
        {
            CommandLineArgments = new CefCommandLineArgments();
            CommandLineArgments.Add("show-fps-counter", "", UseAge.Debug, Target.Common);
            CommandLineArgments.Add("show-taps", string.Empty, UseAge.Debug, Target.Common);
            CommandLineArgments.Add("process-per-site", string.Empty, UseAge.None, Target.Common);
            CommandLineArgments.Add("ignore-urlfetcher-cert-requests", "1", UseAge.None, Target.Common);
            CommandLineArgments.Add("ignore-certificate-errors", "1", UseAge.None, Target.Common);
            CommandLineArgments.Add("enable-media-stream", "1", UseAge.None, Target.Common);
            CommandLineArgments.Add("enable-webgl", "1", UseAge.None, Target.Common);
            CommandLineArgments.Add("ignore-gpu-blacklist", "1", UseAge.None, Target.Common);
            CommandLineArgments.Add("allow-file-access-from-files", "1", UseAge.None, Target.Common);
            CommandLineArgments.Add("force-device-scale-factor", "1", UseAge.None, Target.Common);

            CommandLineArgments.DebugMode = false;
            SaveConfig();
        }