#ifndef WEBVIEW_CEF_COOKIE_VISITOR_H_ #define WEBVIEW_CEF_COOKIE_VISITOR_H_ #include "include/cef_base.h" #include "include/cef_cookie.h" #include #include #include class WebviewCookieVisitor : public CefCookieVisitor { public: WebviewCookieVisitor(); ~WebviewCookieVisitor(); void setOnVisitComplete(std::function>)> complete); //CefCookieVisitor bool Visit(const CefCookie& cookie, int count, int total, bool& deleteCookie) override; std::map> getVisitedCookies(); // Include the default reference counting implementation. IMPLEMENT_REFCOUNTING(WebviewCookieVisitor); private: std::function>)> onVisitComplete; std::vector m_vecAllCookies; std::mutex m_mutexCookieVector; }; #endif // WEBVIEW_CEF_COOKIE_VISITOR_H_