You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
developer question: How can I pass a new command line switch from electron to libchromiumcontent? #2026
I've patched libchromiumcontent and added a new command line switch to trigger my custom code. I've also added this command line switch to Electron and have tried to pass it along using command_line->AppendSwitchASCII within Electron's native_window.cc AppendExtraCommandLineSwitches function. However, libchromiumcontent isn't seeing this switch when I call base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII().
One issue I just noticed is that I don't seem to have to add my new option to option_switches.h / .cc in Electron if I've already added it to libchromiumcontent.
Actually what I am doing is kind of working. LOL! It looks like when I call base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII() in libchromiumcontent I don't always get the value. I sometimes get it. Process related? I need to dig in and see what other functions base::CommandLine offers for getting command line switches.
Activity
frankhale commentedon Jun 21, 2015
One issue I just noticed is that I don't seem to have to add my new option to option_switches.h / .cc in Electron if I've already added it to libchromiumcontent.
frankhale commentedon Jun 22, 2015
Actually what I am doing is kind of working. LOL! It looks like when I call base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII() in libchromiumcontent I don't always get the value. I sometimes get it. Process related? I need to dig in and see what other functions base::CommandLine offers for getting command line switches.
frankhale commentedon Jun 22, 2015
command_line->AppendSwitchBLAH and base::CommandLine::ForCurrentProcess()->GetSwitchBLAH is how you are supposed to do it.