I'm using CEF3 2171 and I want to be able to:
- 1. Create a browser
2. Load the browser with an URL.
3. Kill that browser.
4. Clear cookies.
5. Create a new browser.
6. Load the new browser with an URL.
I.e. I visit a webshop, add an item to my cart, the browser is then removed and a new one is created, loaded with the same URL, than the shopping cart should be empty. I have managed to do the above except to delete cookies, i.e. the item is still in the cart.
I create the browser:
- Code: Select all
CefWindowInfo windowInfo;
CefBrowserSettings browserSettings;
CefRefPtr<CefRequestContext> requestContext = CefRequestContext::CreateContext(new CEFRequestContextHandler);
return CreateBrowser(windowInfo, mHandler.get(), url, browserSettings, requestContext);
- Code: Select all
CefRefPtr<CefCookieManager> CEFRequestContextHandler::GetCookieManager()
{
return CefCookieManager::GetGlobalManager();
}
and I try to delete the cookies:
- Code: Select all
CefCookieManager::GetGlobalManager()->DeleteCookies("", "");
If |url| is empty all cookies for all hosts and domains will be deleted.
What am I doing wrong?