コード例 #1
0
        void app_OnBeforeCommandLineProcessing(object sender, Chromium.Event.CfxOnBeforeCommandLineProcessingEventArgs e)
        {
            // speech api
            e.CommandLine.AppendSwitch("enable-speech-input");

            // fix
            e.CommandLine.AppendSwitch("disable-gpu-compositing");

            // enable pepper flash or system Flash
            if (Directory.Exists(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"cef\PepperFlash")))
            {
                e.CommandLine.AppendSwitchWithValue("ppapi-flash-version", "19.0.0.201");
                e.CommandLine.AppendSwitchWithValue("ppapi-flash-path", Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"cef\PepperFlash\pepflashplayer.dll"));
            }
            else
            {
                e.CommandLine.AppendSwitch("enable-system-flash");
            }

            // MessageBox.Show(e.CommandLine.CommandLineString);
        }
コード例 #2
0
        private static void ChromiumWebBrowser_OnBeforeCommandLineProcessing(Chromium.Event.CfxOnBeforeCommandLineProcessingEventArgs e)
        {
            //
            //					//e.CommandLine.AppendSwitch ("multi-threaded-message-loop");
            //e.CommandLine.AppendSwitch ("off-screen-rendering-enabled");
            //					e.CommandLine.AppendSwitch("renderer-cmd-prefix");


            //e.CommandLine.AppendSwitch("disable-text-input-focus-manager");
            //e.CommandLine.AppendSwitch("no-zygote");
            //e.CommandLine.AppendSwitchWithValue("type", "utility");
            //e.CommandLine.AppendSwitch("use-views");

            //e.CommandLine.AppendSwitch("disable-gpu");
            //e.CommandLine.AppendArgument("disable-gpu");
            //e.CommandLine.AppendArgument("off-screen-rendering-enabled");

            OnBeforeCfxCommandLineProcessing?.Invoke(new OnCSBeforeCfxCommandLineEventArgs(e));

            Console.WriteLine("ChromiumWebBrowser_OnBeforeCommandLineProcessing");
            Console.WriteLine(e.CommandLine.CommandLineString);
        }