2020-01-06 10:59:05 +01:00
|
|
|
// Copyright (c) 2020 The Chromium Embedded Framework Authors. All rights
|
2012-06-19 18:29:49 +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-06 10:59:05 +01:00
|
|
|
// $hash=9b39c06745038ba11242357f7ca387fa1078570e$
|
2017-05-17 11:29:28 +02:00
|
|
|
//
|
2012-06-19 18:29:49 +02:00
|
|
|
|
2017-05-19 11:06:00 +02:00
|
|
|
#include "libcef_dll/ctocpp/urlrequest_ctocpp.h"
|
2012-06-19 18:29:49 +02:00
|
|
|
#include "libcef_dll/cpptoc/urlrequest_client_cpptoc.h"
|
2015-03-02 21:25:14 +01:00
|
|
|
#include "libcef_dll/ctocpp/request_context_ctocpp.h"
|
2017-05-17 11:29:28 +02:00
|
|
|
#include "libcef_dll/ctocpp/request_ctocpp.h"
|
2012-06-19 18:29:49 +02:00
|
|
|
#include "libcef_dll/ctocpp/response_ctocpp.h"
|
2019-01-23 16:42:12 +01:00
|
|
|
#include "libcef_dll/shutdown_checker.h"
|
2012-06-19 18:29:49 +02:00
|
|
|
|
|
|
|
// STATIC METHODS - Body may be edited by hand.
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2017-05-17 11:29:28 +02:00
|
|
|
CefRefPtr<CefURLRequest> CefURLRequest::Create(
|
|
|
|
CefRefPtr<CefRequest> request,
|
2015-03-02 21:25:14 +01:00
|
|
|
CefRefPtr<CefURLRequestClient> client,
|
|
|
|
CefRefPtr<CefRequestContext> request_context) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2012-06-19 18:29:49 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: request; type: refptr_same
|
|
|
|
DCHECK(request.get());
|
|
|
|
if (!request.get())
|
|
|
|
return NULL;
|
|
|
|
// Verify param: client; type: refptr_diff
|
|
|
|
DCHECK(client.get());
|
|
|
|
if (!client.get())
|
|
|
|
return NULL;
|
2015-03-02 21:25:14 +01:00
|
|
|
// Unverified params: request_context
|
2012-06-19 18:29:49 +02:00
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
cef_urlrequest_t* _retval =
|
|
|
|
cef_urlrequest_create(CefRequestCToCpp::Unwrap(request),
|
|
|
|
CefURLRequestClientCppToC::Wrap(client),
|
|
|
|
CefRequestContextCToCpp::Unwrap(request_context));
|
2012-06-19 18:29:49 +02:00
|
|
|
|
|
|
|
// Return type: refptr_same
|
|
|
|
return CefURLRequestCToCpp::Wrap(_retval);
|
|
|
|
}
|
|
|
|
|
|
|
|
// VIRTUAL METHODS - Body may be edited by hand.
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2012-06-19 18:29:49 +02:00
|
|
|
CefRefPtr<CefRequest> CefURLRequestCToCpp::GetRequest() {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_urlrequest_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, get_request))
|
2012-06-19 18:29:49 +02:00
|
|
|
return NULL;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_request_t* _retval = _struct->get_request(_struct);
|
2012-06-19 18:29:49 +02:00
|
|
|
|
|
|
|
// Return type: refptr_same
|
|
|
|
return CefRequestCToCpp::Wrap(_retval);
|
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2012-06-19 18:29:49 +02:00
|
|
|
CefRefPtr<CefURLRequestClient> CefURLRequestCToCpp::GetClient() {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_urlrequest_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, get_client))
|
2012-06-19 18:29:49 +02:00
|
|
|
return NULL;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_urlrequest_client_t* _retval = _struct->get_client(_struct);
|
2012-06-19 18:29:49 +02:00
|
|
|
|
|
|
|
// Return type: refptr_diff
|
|
|
|
return CefURLRequestClientCppToC::Unwrap(_retval);
|
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2012-06-19 18:29:49 +02:00
|
|
|
CefURLRequest::Status CefURLRequestCToCpp::GetRequestStatus() {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_urlrequest_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, get_request_status))
|
2012-06-19 18:29:49 +02:00
|
|
|
return UR_UNKNOWN;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_urlrequest_status_t _retval = _struct->get_request_status(_struct);
|
2012-06-19 18:29:49 +02:00
|
|
|
|
|
|
|
// Return type: simple
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2012-06-19 18:29:49 +02:00
|
|
|
CefURLRequest::ErrorCode CefURLRequestCToCpp::GetRequestError() {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_urlrequest_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, get_request_error))
|
2012-06-19 18:29:49 +02:00
|
|
|
return ERR_NONE;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_errorcode_t _retval = _struct->get_request_error(_struct);
|
2012-06-19 18:29:49 +02:00
|
|
|
|
|
|
|
// Return type: simple
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2012-06-19 18:29:49 +02:00
|
|
|
CefRefPtr<CefResponse> CefURLRequestCToCpp::GetResponse() {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_urlrequest_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, get_response))
|
2012-06-19 18:29:49 +02:00
|
|
|
return NULL;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_response_t* _retval = _struct->get_response(_struct);
|
2012-06-19 18:29:49 +02:00
|
|
|
|
|
|
|
// Return type: refptr_same
|
|
|
|
return CefResponseCToCpp::Wrap(_retval);
|
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall") bool CefURLRequestCToCpp::ResponseWasCached() {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2018-01-03 22:14:29 +01:00
|
|
|
cef_urlrequest_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, response_was_cached))
|
|
|
|
return false;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
int _retval = _struct->response_was_cached(_struct);
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval ? true : false;
|
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall") void CefURLRequestCToCpp::Cancel() {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_urlrequest_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, cancel))
|
2012-06-19 18:29:49 +02:00
|
|
|
return;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
_struct->cancel(_struct);
|
2012-06-19 18:29:49 +02:00
|
|
|
}
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
// CONSTRUCTOR - Do not edit by hand.
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
CefURLRequestCToCpp::CefURLRequestCToCpp() {}
|
2015-04-26 20:40:01 +02:00
|
|
|
|
2019-01-23 16:42:12 +01:00
|
|
|
// DESTRUCTOR - Do not edit by hand.
|
|
|
|
|
|
|
|
CefURLRequestCToCpp::~CefURLRequestCToCpp() {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
template <>
|
|
|
|
cef_urlrequest_t*
|
|
|
|
CefCToCppRefCounted<CefURLRequestCToCpp, CefURLRequest, cef_urlrequest_t>::
|
|
|
|
UnwrapDerived(CefWrapperType type, CefURLRequest* c) {
|
2015-04-26 20:40:01 +02:00
|
|
|
NOTREACHED() << "Unexpected class type: " << type;
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
template <>
|
|
|
|
CefWrapperType CefCToCppRefCounted<CefURLRequestCToCpp,
|
|
|
|
CefURLRequest,
|
|
|
|
cef_urlrequest_t>::kWrapperType =
|
|
|
|
WT_URLREQUEST;
|