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

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

View File

@@ -12,6 +12,7 @@
#include "libcef_dll/cpptoc/cookie_visitor_cpptoc.h"
#include "libcef_dll/ctocpp/cookie_manager_ctocpp.h"
#include "libcef_dll/transfer_util.h"
// STATIC METHODS - Body may be edited by hand.
@@ -43,6 +44,28 @@ CefRefPtr<CefCookieManager> CefCookieManager::CreateManager(
// VIRTUAL METHODS - Body may be edited by hand.
void CefCookieManagerCToCpp::SetSupportedSchemes(
const std::vector<CefString>& schemes) {
if (CEF_MEMBER_MISSING(struct_, set_supported_schemes))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Translate param: schemes; type: string_vec_byref_const
cef_string_list_t schemesList = cef_string_list_alloc();
DCHECK(schemesList);
if (schemesList)
transfer_string_list_contents(schemes, schemesList);
// Execute
struct_->set_supported_schemes(struct_,
schemesList);
// Restore param:schemes; type: string_vec_byref_const
if (schemesList)
cef_string_list_free(schemesList);
}
bool CefCookieManagerCToCpp::VisitAllCookies(
CefRefPtr<CefCookieVisitor> visitor) {
if (CEF_MEMBER_MISSING(struct_, visit_all_cookies))

View File

@@ -18,6 +18,7 @@
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#include <vector>
#include "include/cef_cookie.h"
#include "include/capi/cef_cookie_capi.h"
#include "libcef_dll/ctocpp/ctocpp.h"
@@ -34,6 +35,8 @@ class CefCookieManagerCToCpp
virtual ~CefCookieManagerCToCpp() {}
// CefCookieManager methods
virtual void SetSupportedSchemes(
const std::vector<CefString>& schemes) OVERRIDE;
virtual bool VisitAllCookies(CefRefPtr<CefCookieVisitor> visitor) OVERRIDE;
virtual bool VisitUrlCookies(const CefString& url, bool includeHttpOnly,
CefRefPtr<CefCookieVisitor> visitor) OVERRIDE;