+ std::atomic<int> max_fps{60};
+
+ // Needs to be recursive because the lambda in OnPaint could cause
+ // OnPaint itself to be called.
+ std::recursive_mutex browser_mutex;
+ CefRefPtr<CefBrowser> browser; // Under <browser_mutex>.
+
+ // Tasks waiting for <browser> to get ready. Under <browser_mutex>.
+ std::vector<std::function<void()>> deferred_tasks;
+
+ // Whether the last set_url() (includes the implicit one in the constructor)
+ // has loaded yet. Accessed from the CEF thread only.
+ bool loaded = false;
+
+ // JavaScript waiting for the first page (well, any page) to have loaded.
+ // Accessed from the CEF thread only.
+ std::vector<std::string> deferred_javascript;