Hacker News new | ask | show | jobs
by kodablah 2239 days ago
Yup, I built my little browser on Chromium due to ease of embedding though I would have loved to use FF.

I am investigating a way to use FF on system as is though by providing a custom profile, a user.css to remove everything but the browser window itself (i.e. no tabs, toolbar, etc), capturing it as a native window (e.g. via QWindow::fromWinId and QWidget::createWindowContainer), and communicating with it via marionette or other remote approach. So far it seems to be ok, but it's a bit of a hack.

2 comments

Not sure what language you are using but CEF was good for Chrome under C#. Might be available under C++ too I think.

There was an equivalent Gecko one for Firefox but I could never get it working correctly so deferred to CEF under Visual Studio (think there's a nuget package for it, conveniently).

Also wxWidgets under C++ offers ability to host a local WebView instance or Trident with wxWebView.

Have you tried calling it with the same profile multiple times? I've been running into "Firefox is already running" a lot while trying to use it to integrate web apps with the OS ("site specific browser"). Also the WM-Class would never be set according to the command line parameters on the second call, but you probably don't care about that.
For my use case I don't want to call it w/ the same profile multiple times. Once I have the FF process, I'll work with tabs/windows via the remote protocol.
Stock Firefox has "-no-remote" option which allows running multiple instances.
But not using the same profile.