Is it possible to build standalone CEF control which would work out-of-box just by dropping this on a Form?

102 views
Skip to first unread message

sergey...@gmail.com

unread,
Jan 4, 2018, 8:26:39 PM1/4/18
to CefGlue
I have to put a complex web page inside stupid and rigid monolithic SCADA framework.
This page isn't displayed correctly in MS Browser engine being default for this SCADA.
I can't alter the javascript which causes the error either. It's proprietary and external.

So the only solution at this moment is to embed chromium engine somehow.

Alas, this SCADA accepts only self-contained .NET controls provided as in a single DLL.

It serializes them to its SQL backend in form of blobs and handles them in non-transparent way.
I've figured out how to embed entire CEF inside DLL's resources section and unpack it somewhere inside C:\ProgramData upon first launch.
I can merge entire relevent non-demo Xilium codebase into this single DLL as well.

But it appears that Xilium.CefGlue.WindowsForms.CefWebBrowser isn't autonomous. It requires specialized startup and control over message loop.

Is it possible to make it autonomous and self-contained, so I could just upload a single DLL to external system, drop it on some form,
provide it with path where to unpack CEF stuff and single HTTP address and it'll work?

Dmitry Azaraev

unread,
Jan 10, 2018, 5:31:54 PM1/10/18
to CefGlue
In short - no, you can't. CEF is multiprocess browser. CEF requires and DO lot of additional things which can be incompatible with external host.

But you still can consider about out-of-process browser hosting. E.g. your DLL drop files, starts subprocess and once browser created via IPC it can reparent window and window will appear like in your big application. But actually "big application" only use own plugin and some kind of IPC.

I'm used similar way in desktop outlook integration for example (otherwise it is risky to get failure of whole outlook).

This kind solution is near-ideal (well, far from ideal, but it is far better than any others, and it is stable in sense that "plugin" will not crash host).

Practically... for not experienced user this task can be too hard, so i'm suggest choose more easier solution. For example what about update IE and use it in standard web browser control? :)

--
You received this message because you are subscribed to the Google Groups "CefGlue" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cefglue+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Best regards,
   Dmitry
Reply all
Reply to author
Forward
0 new messages