class CEFTaskAdapter : public CefTask
{
public:
- CEFTaskAdapter(const std::function<void()>& func)
- : func(func) {}
+ CEFTaskAdapter(const std::function<void()>&& func)
+ : func(std::move(func)) {}
void Execute() override { func(); }
private:
void OnBeforeCommandLineProcessing(const CefString& process_type, CefRefPtr<CefCommandLine> command_line);
- void OnBrowserDestroyed(CefRefPtr<CefBrowser> browser) override;
-
private:
void cef_thread_func();
int cef_thread_refcount = 0; // Under <cef_mutex>.
bool cef_initialized = false; // Under <cef_mutex>.
std::condition_variable cef_initialized_cond;
- std::unordered_set<CefBrowser *> pending_browsers; // Under <cef_mutex>.
- std::condition_variable browser_closed_cond;
IMPLEMENT_REFCOUNTING(NageruCefApp);
};