Closed GoogleCodeExporter closed 9 years ago
Original comment by magreenb...@gmail.com
on 11 Jun 2012 at 8:05
I'm add preview patch here. Sorry, can't upload on forum.
Added:
CefApp.UnwrapCommandLine
CefApp.WrapCommandLine
CefCommandLine.PrependWrapper
You can check how it can be used with mono at
https://bitbucket.org/xilium/xilium.cefglue (look at xicg#1 branch). Just run
application with:
"C:\Program Files\Mono-2.10.8\bin\monow.exe" Xilium.CefGlue.Client.exe
To concrete CefApp handler implementation see
https://bitbucket.org/xilium/xilium.cefglue/changeset/e6b9dd5e4a90#chg-CefGlue.C
lient/DemoApp.cs
Continuing discussing here:
http://www.magpcss.org/ceforum/viewtopic.php?f=10&t=885
PS: Sorry, patch little unclean, 'cause UnwrapCommandLine method now looks as
not very usable, but i'm not sure just now.
Original comment by fdd...@gmail.com
on 25 Jun 2012 at 6:33
Attachments:
Patch updated. It is very simple.
After patch applied - tools/translator must be applied.
Patch adds:
CefApp.AppendExtraCommandLineSwitches
CommandLine.PrependWrapper
It is looks like enough to run childs correctly via mono.
Original comment by fdd...@gmail.com
on 20 Sep 2012 at 12:20
Attachments:
For Xilium.CefGlue project now landed new CefGlue.Demo application which
demonstrates using of this technique. It now works for GtkSharp using Mono on
Windows and Linux.
More details here
https://bitbucket.org/xilium/xilium.cefglue/src/8e656226d755/CefGlue.Demo/Common
/DemoCefApp.cs .
Note, CefCommandLine.PrependWrapper method breaks argument by spaces, and can
prepend many arguments. If you need prepend argument with spaces, then it is
can be easily work around:
commandLine.PrependWrapper("-"); // must not be a empty line, and must not have
spaces
commandLine.SetProgram(@"c:\Program Files\..."); // it can contain spaces
inside.
This works fine with both (windows and posix) platforms.
PS: I think, that it can be useful to pass CefBrowser (if it possible) in
AppendExtraCommandLineSwitches. Or may be have some way to identity newly
creating browser with creation process. It can be used to spawn different
renderer's processes based for example on start url.
Also, now is possible spawn different child processes, for different process
types. For example for gpu-process or util processes have no sense spawn
managed renderer, and native child process more desirable.
Original comment by fdd...@gmail.com
on 24 Sep 2012 at 8:19
Oh, also note, that AppendExtraCommandLineSwitches can be called many times.
For example for gpu-process it called twice.
Original comment by fdd...@gmail.com
on 24 Sep 2012 at 8:21
@comment#5: It's not possible to associate all sub-process launches with a
particular CefBrowser. For example, a single GPU process will be shared by
multiple browsers. Instead of adding a CefApp::AppendExtraCommandLineSwitches
callback I think we should add
CefBrowserProcessHandler::OnBeforeSubProcessLaunch (works the same way, but
different name and location). We could potentially add a CefBrowser argument
that would be null for all sub-processes except render processes, but I'm not
sure how useful that would be in practice.
Original comment by magreenb...@gmail.com
on 26 Sep 2012 at 10:38
@comment#7: About locating CefApp::AppendExtraCommandLineSwitches - i'm add it
on CefApp 'cause CefApp already have command line processing function.
But CefBrowserProcessHandler::OnBeforeSubProcessLaunch looks good to me.
About optional CefBrowser argument - forget about this, it is useless and it is
my mistake. When renderer's limit reached - they will be reused and potentially
in inconsistent way. Choosing subprocesses by subprocess type is enough and all
information that we have in command line also enough.
Thanks! :)
Original comment by fdd...@gmail.com
on 26 Sep 2012 at 11:05
Added in CEF3 trunk revision 810 and CEF3 1180 branch revision 811.
Original comment by magreenb...@gmail.com
on 27 Sep 2012 at 5:09
Original issue reported on code.google.com by
fdd...@gmail.com
on 5 Jun 2012 at 5:54