- Add cookie get/set support (issue #88).

- Move classes that extend structures to cef_types_wrappers.h and implement using the new CefStructBase template class.
- Change the HandleProtocolExecution |allow_os_execution| argument to pass by reference to maintain consistency with other API functions.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@217 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2011-04-09 01:05:30 +00:00
parent 0419b51036
commit a66c733ab6
24 changed files with 1624 additions and 824 deletions

View File

@@ -6,6 +6,7 @@
#include "include/cef_capi.h"
#include "include/cef_nplugin.h"
#include "include/cef_nplugin_capi.h"
#include "libcef_dll/cpptoc/cookie_visitor_cpptoc.h"
#include "libcef_dll/cpptoc/domevent_listener_cpptoc.h"
#include "libcef_dll/cpptoc/domvisitor_cpptoc.h"
#include "libcef_dll/cpptoc/download_handler_cpptoc.h"
@@ -46,6 +47,7 @@ void CefShutdown()
#ifdef _DEBUG
// Check that all wrapper objects have been destroyed
DCHECK(CefCookieVisitorCppToC::DebugObjCt == 0);
DCHECK(CefDOMEventListenerCppToC::DebugObjCt == 0);
DCHECK(CefDOMVisitorCppToC::DebugObjCt == 0);
DCHECK(CefDownloadHandlerCppToC::DebugObjCt == 0);
@@ -139,3 +141,27 @@ bool CefCreateURL(const CefURLParts& parts,
{
return cef_create_url(&parts, url.GetWritableStruct()) ? true : false;
}
bool CefVisitAllCookies(CefRefPtr<CefCookieVisitor> visitor)
{
return cef_visit_all_cookies(CefCookieVisitorCppToC::Wrap(visitor)) ?
true : false;
}
bool CefVisitUrlCookies(const CefString& url, bool includeHttpOnly,
CefRefPtr<CefCookieVisitor> visitor)
{
return cef_visit_url_cookies(url.GetStruct(), includeHttpOnly,
CefCookieVisitorCppToC::Wrap(visitor)) ? true : false;
}
bool CefSetCookie(const CefString& url, const CefCookie& cookie)
{
return cef_set_cookie(url.GetStruct(), &cookie) ? true : false;
}
bool CefDeleteCookies(const CefString& url, const CefString& cookie_name)
{
return cef_delete_cookies(url.GetStruct(), cookie_name.GetStruct()) ?
true : false;
}