2020-01-06 10:59:05 +01:00
|
|
|
// Copyright (c) 2020 The Chromium Embedded Framework Authors. All rights
|
2012-04-03 03:34:16 +02:00
|
|
|
// 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.
|
|
|
|
//
|
2020-01-15 14:53:19 +01:00
|
|
|
// $hash=ce618780672b92c6a5f4468b24bdf6c15abe7a82$
|
2017-05-17 11:29:28 +02:00
|
|
|
//
|
2012-04-03 03:34:16 +02:00
|
|
|
|
2017-05-19 11:06:00 +02:00
|
|
|
#include "libcef_dll/ctocpp/cookie_manager_ctocpp.h"
|
2014-02-05 21:35:45 +01:00
|
|
|
#include "libcef_dll/cpptoc/completion_callback_cpptoc.h"
|
2012-04-03 03:34:16 +02:00
|
|
|
#include "libcef_dll/cpptoc/cookie_visitor_cpptoc.h"
|
2015-03-02 21:25:14 +01:00
|
|
|
#include "libcef_dll/cpptoc/delete_cookies_callback_cpptoc.h"
|
|
|
|
#include "libcef_dll/cpptoc/set_cookie_callback_cpptoc.h"
|
2012-04-04 00:14:28 +02:00
|
|
|
#include "libcef_dll/transfer_util.h"
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// STATIC METHODS - Body may be edited by hand.
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2015-03-02 21:25:14 +01:00
|
|
|
CefRefPtr<CefCookieManager> CefCookieManager::GetGlobalManager(
|
|
|
|
CefRefPtr<CefCompletionCallback> callback) {
|
2012-04-03 03:34:16 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
2015-03-02 21:25:14 +01:00
|
|
|
// Unverified params: callback
|
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
// Execute
|
2015-03-02 21:25:14 +01:00
|
|
|
cef_cookie_manager_t* _retval = cef_cookie_manager_get_global_manager(
|
|
|
|
CefCompletionCallbackCppToC::Wrap(callback));
|
2012-04-03 03:34:16 +02:00
|
|
|
|
2018-03-15 02:40:37 +01:00
|
|
|
// Return type: refptr_same
|
|
|
|
return CefCookieManagerCToCpp::Wrap(_retval);
|
|
|
|
}
|
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
// VIRTUAL METHODS - Body may be edited by hand.
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2012-04-04 00:14:28 +02:00
|
|
|
void CefCookieManagerCToCpp::SetSupportedSchemes(
|
2015-03-02 21:25:14 +01:00
|
|
|
const std::vector<CefString>& schemes,
|
2019-05-03 00:23:57 +02:00
|
|
|
bool include_defaults,
|
2015-03-02 21:25:14 +01:00
|
|
|
CefRefPtr<CefCompletionCallback> callback) {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_cookie_manager_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, set_supported_schemes))
|
2012-04-04 00:14:28 +02:00
|
|
|
return;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
2015-03-02 21:25:14 +01:00
|
|
|
// Unverified params: callback
|
|
|
|
|
2012-04-04 00:14:28 +02:00
|
|
|
// 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
|
2019-05-03 00:23:57 +02:00
|
|
|
_struct->set_supported_schemes(_struct, schemesList, include_defaults,
|
2017-05-17 11:29:28 +02:00
|
|
|
CefCompletionCallbackCppToC::Wrap(callback));
|
2012-04-04 00:14:28 +02:00
|
|
|
|
|
|
|
// Restore param:schemes; type: string_vec_byref_const
|
|
|
|
if (schemesList)
|
|
|
|
cef_string_list_free(schemesList);
|
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2012-04-03 03:34:16 +02:00
|
|
|
bool CefCookieManagerCToCpp::VisitAllCookies(
|
|
|
|
CefRefPtr<CefCookieVisitor> visitor) {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_cookie_manager_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, visit_all_cookies))
|
2012-04-03 03:34:16 +02:00
|
|
|
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
|
2017-05-17 11:29:28 +02:00
|
|
|
int _retval = _struct->visit_all_cookies(
|
|
|
|
_struct, CefCookieVisitorCppToC::Wrap(visitor));
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// Return type: bool
|
2017-05-17 11:29:28 +02:00
|
|
|
return _retval ? true : false;
|
2012-04-03 03:34:16 +02:00
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2017-05-17 11:29:28 +02:00
|
|
|
bool CefCookieManagerCToCpp::VisitUrlCookies(
|
|
|
|
const CefString& url,
|
|
|
|
bool includeHttpOnly,
|
|
|
|
CefRefPtr<CefCookieVisitor> visitor) {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_cookie_manager_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, visit_url_cookies))
|
2012-04-03 03:34:16 +02:00
|
|
|
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
|
2017-05-17 11:29:28 +02:00
|
|
|
int _retval =
|
|
|
|
_struct->visit_url_cookies(_struct, url.GetStruct(), includeHttpOnly,
|
|
|
|
CefCookieVisitorCppToC::Wrap(visitor));
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// Return type: bool
|
2017-05-17 11:29:28 +02:00
|
|
|
return _retval ? true : false;
|
2012-04-03 03:34:16 +02:00
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2017-05-17 11:29:28 +02:00
|
|
|
bool CefCookieManagerCToCpp::SetCookie(
|
|
|
|
const CefString& url,
|
|
|
|
const CefCookie& cookie,
|
|
|
|
CefRefPtr<CefSetCookieCallback> callback) {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_cookie_manager_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, set_cookie))
|
2012-04-03 03:34:16 +02:00
|
|
|
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;
|
2015-03-02 21:25:14 +01:00
|
|
|
// Unverified params: callback
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
int _retval = _struct->set_cookie(_struct, url.GetStruct(), &cookie,
|
|
|
|
CefSetCookieCallbackCppToC::Wrap(callback));
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// Return type: bool
|
2017-05-17 11:29:28 +02:00
|
|
|
return _retval ? true : false;
|
2012-04-03 03:34:16 +02:00
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2017-05-17 11:29:28 +02:00
|
|
|
bool CefCookieManagerCToCpp::DeleteCookies(
|
|
|
|
const CefString& url,
|
2015-03-02 21:25:14 +01:00
|
|
|
const CefString& cookie_name,
|
|
|
|
CefRefPtr<CefDeleteCookiesCallback> callback) {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_cookie_manager_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, delete_cookies))
|
2012-04-03 03:34:16 +02:00
|
|
|
return false;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
2015-03-02 21:25:14 +01:00
|
|
|
// Unverified params: url, cookie_name, callback
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
int _retval =
|
|
|
|
_struct->delete_cookies(_struct, url.GetStruct(), cookie_name.GetStruct(),
|
|
|
|
CefDeleteCookiesCallbackCppToC::Wrap(callback));
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// Return type: bool
|
2017-05-17 11:29:28 +02:00
|
|
|
return _retval ? true : false;
|
2012-04-03 03:34:16 +02:00
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2013-02-13 20:53:41 +01:00
|
|
|
bool CefCookieManagerCToCpp::FlushStore(
|
2014-02-05 21:35:45 +01:00
|
|
|
CefRefPtr<CefCompletionCallback> callback) {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_cookie_manager_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, flush_store))
|
2013-02-13 20:53:41 +01:00
|
|
|
return false;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
2015-03-02 21:25:14 +01:00
|
|
|
// Unverified params: callback
|
2013-02-13 20:53:41 +01:00
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
int _retval = _struct->flush_store(
|
|
|
|
_struct, CefCompletionCallbackCppToC::Wrap(callback));
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// Return type: bool
|
2017-05-17 11:29:28 +02:00
|
|
|
return _retval ? true : false;
|
2012-04-03 03:34:16 +02:00
|
|
|
}
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
// CONSTRUCTOR - Do not edit by hand.
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
CefCookieManagerCToCpp::CefCookieManagerCToCpp() {}
|
2015-04-26 20:40:01 +02:00
|
|
|
|
2019-01-23 16:42:12 +01:00
|
|
|
// DESTRUCTOR - Do not edit by hand.
|
|
|
|
|
|
|
|
CefCookieManagerCToCpp::~CefCookieManagerCToCpp() {}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
template <>
|
|
|
|
cef_cookie_manager_t*
|
|
|
|
CefCToCppRefCounted<CefCookieManagerCToCpp,
|
|
|
|
CefCookieManager,
|
|
|
|
cef_cookie_manager_t>::UnwrapDerived(CefWrapperType type,
|
|
|
|
CefCookieManager* c) {
|
2015-04-26 20:40:01 +02:00
|
|
|
NOTREACHED() << "Unexpected class type: " << type;
|
2020-01-15 14:53:19 +01:00
|
|
|
return nullptr;
|
2015-04-26 20:40:01 +02:00
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
template <>
|
|
|
|
CefWrapperType CefCToCppRefCounted<CefCookieManagerCToCpp,
|
|
|
|
CefCookieManager,
|
|
|
|
cef_cookie_manager_t>::kWrapperType =
|
|
|
|
WT_COOKIE_MANAGER;
|