All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Web Browser

Currently there are two different web browsers in Cornerstone.

The old Qt/Webkit based browser in MultiWidgets namespace (for example MultiWidgets::BrowserWidget) and new Chromium Embedded Framework (CEF) based browser in WebBrowserCef namespace (for example WebBrowserCef::BrowserWidget). The plugin id for the new browser is WebBrowserCef.BrowserWidget.

New browser has more features and is more customizable, and the old one is no longer in development and will be removed in future versions of Cornerstone. All new code should use the new browser. This document only applies to the new CEF browser.

Installing Flash

The browser supports Adobe Flash Player PPAPI plugin, but it needs to be installed separately on all platforms. Cornerstone will automatically detect the flash plugin when it is installed on the system. On OSX Flash needs to be enabled separately, see instructions below.

Ubuntu

On Ubuntu install package pepperflashplugin-nonfree and use the script in the package to update the plugin when needed.

Install:

sudo apt-get install -y pepperflashplugin-nonfree

Update:

sudo /usr/sbin/update-pepperflashplugin-nonfree --install

You might get the following error when installing:

ERROR: failed to retrieve status information from google : W: There is no public key available for the following key IDs:
1397BC53640DB551

In that case, install the public key and try again:

curl https://dl.google.com/linux/linux_signing_key.pub | sudo tee -a /usr/lib/pepperflashplugin-nonfree/pubkey-google.txt
sudo /usr/sbin/update-pepperflashplugin-nonfree --install

Windows

Download and install 64-bit version of Flash plugin (PPAPI) from http://labs.adobe.com/downloads/flashplayer.html.

OSX

Download and install 64-bit version of Flash plugin (PPAPI) from https://get.adobe.com/flashplayer/otherversions/

Typical Cornerstone application causes a lot of load on the GPU and therefore Chromium software compositing is almost always faster than GPU compositing. That is why browser uses software compositing by default. However, Adobe Flash doesn't work in OSX using the software compositor. If you want to use Flash, you need to explicitly disable software compositing, but remember that it might have performance impact on all browser widgets.

// Enable Flash on OSX by enabling GPU compositing which is disabled by default
#ifdef RADIANT_OSX
auto flags = WebBrowserCef::WebEngine::defaultFlags();
flags.removeAll("--disable-gpu-compositing");
WebBrowserCef::WebEngine::setDefaultFlags(flags);
#endif

CEF and Chromium command line arguments

Any command line arguments given to Cornerstone applications using form --cef-ARG will be forwarded to CEF as --ARG.

Webcam and microphone support (WebRTC)

By default the browser doesn't allow web pages to access local webcam or microphone. This behaviour can be changed using a command line argument --cef-enable-media-stream. This can be given to any cornerstone application.