Helper class to simplify creating custom CefClient subclasses.
Please note that the application including this header must set up the compiler options to include the CEF directory as one of the include paths, as this header – unlike wx/webview_chromium.h – includes CEF headers.
Here is a simple example of using this class to customize processing the messages received from the other CEF processes:
{
using wxDelegatingCefClient::wxDelegatingCefClient;
static CefClient* Create(CefClient* client, void* WXUNUSED(data)
{
return new CustomClient(client);
}
bool OnProcessMessageReceived(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefProcessId source_process,
CefRefPtr<CefProcessMessage> message) override
{
return true;
}
};
void MyFunction()
{
auto configChrome =
configChrome->m_clientCreate = &CustomClient::Create;
auto webview = new wxWebViewChromium(config);
if ( !webview->Create(
this,
wxID_ANY, url) )
{
}
}
Helper class to simplify creating custom CefClient subclasses.
Definition webview_chromium_impl.h:63
virtual void * GetNativeConfiguration() const
Returns the pointer to the native configuration used during creation of a wxWebView.
static wxWebViewConfiguration NewConfiguration(const wxString &backend=wxWebViewBackendDefault)
Create a new wxWebViewConfiguration object.
@ wxID_ANY
Any id: means that we don't care about the id, whether when installing an event handler or when creat...
Definition defs.h:591
- Since
- 3.3.0