CEF3: Add CefCookieManager::SetSupportedSchemes method which supports cookie storage for non-http(s) schemes (issue #567).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@577 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2012-04-03 22:14:28 +00:00
parent 825080f86d
commit 0b3ef6e2cd
8 changed files with 158 additions and 24 deletions

View File

@ -12,6 +12,7 @@
#include "libcef_dll/cpptoc/cookie_manager_cpptoc.h"
#include "libcef_dll/ctocpp/cookie_visitor_ctocpp.h"
#include "libcef_dll/transfer_util.h"
// GLOBAL FUNCTIONS - Body may be edited by hand.
@ -43,6 +44,27 @@ CEF_EXPORT cef_cookie_manager_t* cef_cookie_manager_create_manager(
// MEMBER FUNCTIONS - Body may be edited by hand.
void CEF_CALLBACK cookie_manager_set_supported_schemes(
struct _cef_cookie_manager_t* self, cef_string_list_t schemes) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: schemes; type: string_vec_byref_const
DCHECK(schemes);
if (!schemes)
return;
// Translate param: schemes; type: string_vec_byref_const
std::vector<CefString> schemesList;
transfer_string_list_contents(schemes, schemesList);
// Execute
CefCookieManagerCppToC::Get(self)->SetSupportedSchemes(
schemesList);
}
int CEF_CALLBACK cookie_manager_visit_all_cookies(
struct _cef_cookie_manager_t* self,
struct _cef_cookie_visitor_t* visitor) {
@ -163,6 +185,7 @@ int CEF_CALLBACK cookie_manager_set_storage_path(
CefCookieManagerCppToC::CefCookieManagerCppToC(CefCookieManager* cls)
: CefCppToC<CefCookieManagerCppToC, CefCookieManager, cef_cookie_manager_t>(
cls) {
struct_.struct_.set_supported_schemes = cookie_manager_set_supported_schemes;
struct_.struct_.visit_all_cookies = cookie_manager_visit_all_cookies;
struct_.struct_.visit_url_cookies = cookie_manager_visit_url_cookies;
struct_.struct_.set_cookie = cookie_manager_set_cookie;