mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Revert revision 534 changes: Add CefCookieManager interface and CefRequestHandler::GetCookieManager for custom cookie handling (issue #542).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@541 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -1,177 +0,0 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/cookie_manager_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/cookie_visitor_ctocpp.h"
|
||||
|
||||
|
||||
// GLOBAL FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
CEF_EXPORT cef_cookie_manager_t* cef_cookie_manager_get_global_manager() {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefCookieManager> _retval = CefCookieManager::GetGlobalManager();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefCookieManagerCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
CEF_EXPORT cef_cookie_manager_t* cef_cookie_manager_create_manager(
|
||||
const cef_string_t* path) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Unverified params: path
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefCookieManager> _retval = CefCookieManager::CreateManager(
|
||||
CefString(path));
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefCookieManagerCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
int CEF_CALLBACK cookie_manager_visit_all_cookies(
|
||||
struct _cef_cookie_manager_t* self,
|
||||
struct _cef_cookie_visitor_t* visitor) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: visitor; type: refptr_diff
|
||||
DCHECK(visitor);
|
||||
if (!visitor)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefCookieManagerCppToC::Get(self)->VisitAllCookies(
|
||||
CefCookieVisitorCToCpp::Wrap(visitor));
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK cookie_manager_visit_url_cookies(
|
||||
struct _cef_cookie_manager_t* self, const cef_string_t* url,
|
||||
int includeHttpOnly, struct _cef_cookie_visitor_t* visitor) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: url; type: string_byref_const
|
||||
DCHECK(url);
|
||||
if (!url)
|
||||
return 0;
|
||||
// Verify param: visitor; type: refptr_diff
|
||||
DCHECK(visitor);
|
||||
if (!visitor)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefCookieManagerCppToC::Get(self)->VisitUrlCookies(
|
||||
CefString(url),
|
||||
includeHttpOnly?true:false,
|
||||
CefCookieVisitorCToCpp::Wrap(visitor));
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK cookie_manager_set_cookie(struct _cef_cookie_manager_t* self,
|
||||
const cef_string_t* url, const struct _cef_cookie_t* cookie) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: url; type: string_byref_const
|
||||
DCHECK(url);
|
||||
if (!url)
|
||||
return 0;
|
||||
// Verify param: cookie; type: struct_byref_const
|
||||
DCHECK(cookie);
|
||||
if (!cookie)
|
||||
return 0;
|
||||
|
||||
// Translate param: cookie; type: struct_byref_const
|
||||
CefCookie cookieObj;
|
||||
if (cookie)
|
||||
cookieObj.Set(*cookie, false);
|
||||
|
||||
// Execute
|
||||
bool _retval = CefCookieManagerCppToC::Get(self)->SetCookie(
|
||||
CefString(url),
|
||||
cookieObj);
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK cookie_manager_delete_cookies(
|
||||
struct _cef_cookie_manager_t* self, const cef_string_t* url,
|
||||
const cef_string_t* cookie_name) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Unverified params: url, cookie_name
|
||||
|
||||
// Execute
|
||||
bool _retval = CefCookieManagerCppToC::Get(self)->DeleteCookies(
|
||||
CefString(url),
|
||||
CefString(cookie_name));
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK cookie_manager_set_storage_path(
|
||||
struct _cef_cookie_manager_t* self, const cef_string_t* path) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Unverified params: path
|
||||
|
||||
// Execute
|
||||
bool _retval = CefCookieManagerCppToC::Get(self)->SetStoragePath(
|
||||
CefString(path));
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefCookieManagerCppToC::CefCookieManagerCppToC(CefCookieManager* cls)
|
||||
: CefCppToC<CefCookieManagerCppToC, CefCookieManager, cef_cookie_manager_t>(
|
||||
cls) {
|
||||
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;
|
||||
struct_.struct_.delete_cookies = cookie_manager_delete_cookies;
|
||||
struct_.struct_.set_storage_path = cookie_manager_set_storage_path;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCppToC<CefCookieManagerCppToC, CefCookieManager,
|
||||
cef_cookie_manager_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
@@ -1,37 +0,0 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CPPTOC_COOKIE_MANAGER_CPPTOC_H_
|
||||
#define CEF_LIBCEF_DLL_CPPTOC_COOKIE_MANAGER_CPPTOC_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef BUILDING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
|
||||
#else // BUILDING_CEF_SHARED
|
||||
|
||||
#include "include/cef_cookie.h"
|
||||
#include "include/capi/cef_cookie_capi.h"
|
||||
#include "libcef_dll/cpptoc/cpptoc.h"
|
||||
|
||||
// Wrap a C++ class with a C structure.
|
||||
// This class may be instantiated and accessed DLL-side only.
|
||||
class CefCookieManagerCppToC
|
||||
: public CefCppToC<CefCookieManagerCppToC, CefCookieManager,
|
||||
cef_cookie_manager_t> {
|
||||
public:
|
||||
explicit CefCookieManagerCppToC(CefCookieManager* cls);
|
||||
virtual ~CefCookieManagerCppToC() {}
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_COOKIE_MANAGER_CPPTOC_H_
|
||||
|
@@ -14,7 +14,6 @@
|
||||
#include "libcef_dll/cpptoc/download_handler_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/request_handler_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/browser_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/cookie_manager_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/frame_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/request_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/response_ctocpp.h"
|
||||
@@ -348,27 +347,6 @@ int CEF_CALLBACK request_handler_get_auth_credentials(
|
||||
return _retval;
|
||||
}
|
||||
|
||||
cef_cookie_manager_t* CEF_CALLBACK request_handler_get_cookie_manager(
|
||||
struct _cef_request_handler_t* self, cef_browser_t* browser) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser);
|
||||
if (!browser)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefCookieManager> _retval = CefRequestHandlerCppToC::Get(
|
||||
self)->GetCookieManager(
|
||||
CefBrowserCToCpp::Wrap(browser));
|
||||
|
||||
// Return type: refptr_diff
|
||||
return CefCookieManagerCToCpp::Unwrap(_retval);
|
||||
}
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
@@ -383,7 +361,6 @@ CefRequestHandlerCppToC::CefRequestHandlerCppToC(CefRequestHandler* cls)
|
||||
struct_.struct_.on_protocol_execution = request_handler_on_protocol_execution;
|
||||
struct_.struct_.get_download_handler = request_handler_get_download_handler;
|
||||
struct_.struct_.get_auth_credentials = request_handler_get_auth_credentials;
|
||||
struct_.struct_.get_cookie_manager = request_handler_get_cookie_manager;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
|
@@ -1,152 +0,0 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/cookie_visitor_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/cookie_manager_ctocpp.h"
|
||||
|
||||
|
||||
// STATIC METHODS - Body may be edited by hand.
|
||||
|
||||
CefRefPtr<CefCookieManager> CefCookieManager::GetGlobalManager() {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_cookie_manager_t* _retval = cef_cookie_manager_get_global_manager();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefCookieManagerCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefCookieManager> CefCookieManager::CreateManager(
|
||||
const CefString& path) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Unverified params: path
|
||||
|
||||
// Execute
|
||||
cef_cookie_manager_t* _retval = cef_cookie_manager_create_manager(
|
||||
path.GetStruct());
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefCookieManagerCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
bool CefCookieManagerCToCpp::VisitAllCookies(
|
||||
CefRefPtr<CefCookieVisitor> visitor) {
|
||||
if (CEF_MEMBER_MISSING(struct_, visit_all_cookies))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: visitor; type: refptr_diff
|
||||
DCHECK(visitor.get());
|
||||
if (!visitor.get())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->visit_all_cookies(struct_,
|
||||
CefCookieVisitorCppToC::Wrap(visitor));
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefCookieManagerCToCpp::VisitUrlCookies(const CefString& url,
|
||||
bool includeHttpOnly, CefRefPtr<CefCookieVisitor> visitor) {
|
||||
if (CEF_MEMBER_MISSING(struct_, visit_url_cookies))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: url; type: string_byref_const
|
||||
DCHECK(!url.empty());
|
||||
if (url.empty())
|
||||
return false;
|
||||
// Verify param: visitor; type: refptr_diff
|
||||
DCHECK(visitor.get());
|
||||
if (!visitor.get())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->visit_url_cookies(struct_,
|
||||
url.GetStruct(),
|
||||
includeHttpOnly,
|
||||
CefCookieVisitorCppToC::Wrap(visitor));
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefCookieManagerCToCpp::SetCookie(const CefString& url,
|
||||
const CefCookie& cookie) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_cookie))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: url; type: string_byref_const
|
||||
DCHECK(!url.empty());
|
||||
if (url.empty())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->set_cookie(struct_,
|
||||
url.GetStruct(),
|
||||
&cookie);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefCookieManagerCToCpp::DeleteCookies(const CefString& url,
|
||||
const CefString& cookie_name) {
|
||||
if (CEF_MEMBER_MISSING(struct_, delete_cookies))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Unverified params: url, cookie_name
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->delete_cookies(struct_,
|
||||
url.GetStruct(),
|
||||
cookie_name.GetStruct());
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
bool CefCookieManagerCToCpp::SetStoragePath(const CefString& path) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_storage_path))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Unverified params: path
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->set_storage_path(struct_,
|
||||
path.GetStruct());
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefCookieManagerCToCpp, CefCookieManager,
|
||||
cef_cookie_manager_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
@@ -1,49 +0,0 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
// ---------------------------------------------------------------------------
|
||||
//
|
||||
// This file was generated by the CEF translator tool. If making changes by
|
||||
// hand only do so within the body of existing method and function
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_COOKIE_MANAGER_CTOCPP_H_
|
||||
#define CEF_LIBCEF_DLL_CTOCPP_COOKIE_MANAGER_CTOCPP_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef USING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
|
||||
#else // USING_CEF_SHARED
|
||||
|
||||
#include "include/cef_cookie.h"
|
||||
#include "include/capi/cef_cookie_capi.h"
|
||||
#include "libcef_dll/ctocpp/ctocpp.h"
|
||||
|
||||
// Wrap a C structure with a C++ class.
|
||||
// This class may be instantiated and accessed wrapper-side only.
|
||||
class CefCookieManagerCToCpp
|
||||
: public CefCToCpp<CefCookieManagerCToCpp, CefCookieManager,
|
||||
cef_cookie_manager_t> {
|
||||
public:
|
||||
explicit CefCookieManagerCToCpp(cef_cookie_manager_t* str)
|
||||
: CefCToCpp<CefCookieManagerCToCpp, CefCookieManager,
|
||||
cef_cookie_manager_t>(str) {}
|
||||
virtual ~CefCookieManagerCToCpp() {}
|
||||
|
||||
// CefCookieManager methods
|
||||
virtual bool VisitAllCookies(CefRefPtr<CefCookieVisitor> visitor) OVERRIDE;
|
||||
virtual bool VisitUrlCookies(const CefString& url, bool includeHttpOnly,
|
||||
CefRefPtr<CefCookieVisitor> visitor) OVERRIDE;
|
||||
virtual bool SetCookie(const CefString& url,
|
||||
const CefCookie& cookie) OVERRIDE;
|
||||
virtual bool DeleteCookies(const CefString& url,
|
||||
const CefString& cookie_name) OVERRIDE;
|
||||
virtual bool SetStoragePath(const CefString& path) OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CTOCPP_COOKIE_MANAGER_CTOCPP_H_
|
||||
|
@@ -11,7 +11,6 @@
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/browser_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/cookie_manager_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/frame_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/request_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/response_cpptoc.h"
|
||||
@@ -290,26 +289,6 @@ bool CefRequestHandlerCToCpp::GetAuthCredentials(CefRefPtr<CefBrowser> browser,
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
CefRefPtr<CefCookieManager> CefRequestHandlerCToCpp::GetCookieManager(
|
||||
CefRefPtr<CefBrowser> browser) {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_cookie_manager))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser.get());
|
||||
if (!browser.get())
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
cef_cookie_manager_t* _retval = struct_->get_cookie_manager(struct_,
|
||||
CefBrowserCppToC::Wrap(browser));
|
||||
|
||||
// Return type: refptr_diff
|
||||
return CefCookieManagerCppToC::Unwrap(_retval);
|
||||
}
|
||||
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> long CefCToCpp<CefRequestHandlerCToCpp, CefRequestHandler,
|
||||
|
@@ -55,8 +55,6 @@ class CefRequestHandlerCToCpp
|
||||
const CefString& host, int port, const CefString& realm,
|
||||
const CefString& scheme, CefString& username,
|
||||
CefString& password) OVERRIDE;
|
||||
virtual CefRefPtr<CefCookieManager> GetCookieManager(
|
||||
CefRefPtr<CefBrowser> browser) OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
|
@@ -12,6 +12,8 @@
|
||||
|
||||
#include "include/cef_app.h"
|
||||
#include "include/capi/cef_app_capi.h"
|
||||
#include "include/cef_cookie.h"
|
||||
#include "include/capi/cef_cookie_capi.h"
|
||||
#include "include/cef_origin_whitelist.h"
|
||||
#include "include/capi/cef_origin_whitelist_capi.h"
|
||||
#include "include/cef_scheme.h"
|
||||
@@ -25,7 +27,6 @@
|
||||
#include "include/cef_v8.h"
|
||||
#include "include/capi/cef_v8_capi.h"
|
||||
#include "libcef_dll/cpptoc/browser_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/cookie_manager_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/domdocument_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/domevent_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/domnode_cpptoc.h"
|
||||
@@ -113,7 +114,6 @@ CEF_EXPORT void cef_shutdown() {
|
||||
// Check that all wrapper objects have been destroyed
|
||||
DCHECK_EQ(CefBrowserCppToC::DebugObjCt, 0);
|
||||
DCHECK_EQ(CefContentFilterCToCpp::DebugObjCt, 0);
|
||||
DCHECK_EQ(CefCookieManagerCppToC::DebugObjCt, 0);
|
||||
DCHECK_EQ(CefCookieVisitorCToCpp::DebugObjCt, 0);
|
||||
DCHECK_EQ(CefDOMDocumentCppToC::DebugObjCt, 0);
|
||||
DCHECK_EQ(CefDOMEventCppToC::DebugObjCt, 0);
|
||||
@@ -185,6 +185,100 @@ CEF_EXPORT void cef_quit_message_loop() {
|
||||
CefQuitMessageLoop();
|
||||
}
|
||||
|
||||
CEF_EXPORT int cef_visit_all_cookies(struct _cef_cookie_visitor_t* visitor) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: visitor; type: refptr_diff
|
||||
DCHECK(visitor);
|
||||
if (!visitor)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefVisitAllCookies(
|
||||
CefCookieVisitorCToCpp::Wrap(visitor));
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
CEF_EXPORT int cef_visit_url_cookies(const cef_string_t* url,
|
||||
int includeHttpOnly, struct _cef_cookie_visitor_t* visitor) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: url; type: string_byref_const
|
||||
DCHECK(url);
|
||||
if (!url)
|
||||
return 0;
|
||||
// Verify param: visitor; type: refptr_diff
|
||||
DCHECK(visitor);
|
||||
if (!visitor)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefVisitUrlCookies(
|
||||
CefString(url),
|
||||
includeHttpOnly?true:false,
|
||||
CefCookieVisitorCToCpp::Wrap(visitor));
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
CEF_EXPORT int cef_set_cookie(const cef_string_t* url,
|
||||
const struct _cef_cookie_t* cookie) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: url; type: string_byref_const
|
||||
DCHECK(url);
|
||||
if (!url)
|
||||
return 0;
|
||||
// Verify param: cookie; type: struct_byref_const
|
||||
DCHECK(cookie);
|
||||
if (!cookie)
|
||||
return 0;
|
||||
|
||||
// Translate param: cookie; type: struct_byref_const
|
||||
CefCookie cookieObj;
|
||||
if (cookie)
|
||||
cookieObj.Set(*cookie, false);
|
||||
|
||||
// Execute
|
||||
bool _retval = CefSetCookie(
|
||||
CefString(url),
|
||||
cookieObj);
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
CEF_EXPORT int cef_delete_cookies(const cef_string_t* url,
|
||||
const cef_string_t* cookie_name) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Unverified params: url, cookie_name
|
||||
|
||||
// Execute
|
||||
bool _retval = CefDeleteCookies(
|
||||
CefString(url),
|
||||
CefString(cookie_name));
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
CEF_EXPORT int cef_set_cookie_path(const cef_string_t* path) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Unverified params: path
|
||||
|
||||
// Execute
|
||||
bool _retval = CefSetCookiePath(
|
||||
CefString(path));
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
CEF_EXPORT int cef_add_cross_origin_whitelist_entry(
|
||||
const cef_string_t* source_origin, const cef_string_t* target_protocol,
|
||||
const cef_string_t* target_domain, int allow_target_subdomains) {
|
||||
|
@@ -12,6 +12,8 @@
|
||||
|
||||
#include "include/cef_app.h"
|
||||
#include "include/capi/cef_app_capi.h"
|
||||
#include "include/cef_cookie.h"
|
||||
#include "include/capi/cef_cookie_capi.h"
|
||||
#include "include/cef_origin_whitelist.h"
|
||||
#include "include/capi/cef_origin_whitelist_capi.h"
|
||||
#include "include/cef_scheme.h"
|
||||
@@ -57,7 +59,6 @@
|
||||
#include "libcef_dll/cpptoc/web_urlrequest_client_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/write_handler_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/browser_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/cookie_manager_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/domdocument_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/domevent_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/domnode_ctocpp.h"
|
||||
@@ -115,7 +116,6 @@ CEF_GLOBAL void CefShutdown() {
|
||||
// Check that all wrapper objects have been destroyed
|
||||
DCHECK_EQ(CefBrowserCToCpp::DebugObjCt, 0);
|
||||
DCHECK_EQ(CefContentFilterCppToC::DebugObjCt, 0);
|
||||
DCHECK_EQ(CefCookieManagerCToCpp::DebugObjCt, 0);
|
||||
DCHECK_EQ(CefCookieVisitorCppToC::DebugObjCt, 0);
|
||||
DCHECK_EQ(CefDOMDocumentCToCpp::DebugObjCt, 0);
|
||||
DCHECK_EQ(CefDOMEventCToCpp::DebugObjCt, 0);
|
||||
@@ -187,6 +187,90 @@ CEF_GLOBAL void CefQuitMessageLoop() {
|
||||
cef_quit_message_loop();
|
||||
}
|
||||
|
||||
CEF_GLOBAL bool CefVisitAllCookies(CefRefPtr<CefCookieVisitor> visitor) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: visitor; type: refptr_diff
|
||||
DCHECK(visitor.get());
|
||||
if (!visitor.get())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = cef_visit_all_cookies(
|
||||
CefCookieVisitorCppToC::Wrap(visitor));
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
CEF_GLOBAL bool CefVisitUrlCookies(const CefString& url, bool includeHttpOnly,
|
||||
CefRefPtr<CefCookieVisitor> visitor) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: url; type: string_byref_const
|
||||
DCHECK(!url.empty());
|
||||
if (url.empty())
|
||||
return false;
|
||||
// Verify param: visitor; type: refptr_diff
|
||||
DCHECK(visitor.get());
|
||||
if (!visitor.get())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = cef_visit_url_cookies(
|
||||
url.GetStruct(),
|
||||
includeHttpOnly,
|
||||
CefCookieVisitorCppToC::Wrap(visitor));
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
CEF_GLOBAL bool CefSetCookie(const CefString& url, const CefCookie& cookie) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: url; type: string_byref_const
|
||||
DCHECK(!url.empty());
|
||||
if (url.empty())
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = cef_set_cookie(
|
||||
url.GetStruct(),
|
||||
&cookie);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
CEF_GLOBAL bool CefDeleteCookies(const CefString& url,
|
||||
const CefString& cookie_name) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Unverified params: url, cookie_name
|
||||
|
||||
// Execute
|
||||
int _retval = cef_delete_cookies(
|
||||
url.GetStruct(),
|
||||
cookie_name.GetStruct());
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
CEF_GLOBAL bool CefSetCookiePath(const CefString& path) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Unverified params: path
|
||||
|
||||
// Execute
|
||||
int _retval = cef_set_cookie_path(
|
||||
path.GetStruct());
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
CEF_GLOBAL bool CefAddCrossOriginWhitelistEntry(const CefString& source_origin,
|
||||
const CefString& target_protocol, const CefString& target_domain,
|
||||
bool allow_target_subdomains) {
|
||||
|
Reference in New Issue
Block a user