2017-01-11 00:00:30 +01:00
|
|
|
// Copyright (c) 2017 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.
|
|
|
|
//
|
|
|
|
|
|
|
|
#include "libcef_dll/cpptoc/urlrequest_client_cpptoc.h"
|
|
|
|
#include "libcef_dll/ctocpp/request_ctocpp.h"
|
2015-03-02 21:25:14 +01:00
|
|
|
#include "libcef_dll/ctocpp/request_context_ctocpp.h"
|
2012-06-19 18:29:49 +02:00
|
|
|
#include "libcef_dll/ctocpp/response_ctocpp.h"
|
|
|
|
#include "libcef_dll/ctocpp/urlrequest_ctocpp.h"
|
|
|
|
|
|
|
|
|
|
|
|
// STATIC METHODS - Body may be edited by hand.
|
|
|
|
|
|
|
|
CefRefPtr<CefURLRequest> CefURLRequest::Create(CefRefPtr<CefRequest> request,
|
2015-03-02 21:25:14 +01:00
|
|
|
CefRefPtr<CefURLRequestClient> client,
|
|
|
|
CefRefPtr<CefRequestContext> request_context) {
|
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
|
|
|
|
cef_urlrequest_t* _retval = cef_urlrequest_create(
|
|
|
|
CefRequestCToCpp::Unwrap(request),
|
2015-03-02 21:25:14 +01:00
|
|
|
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.
|
|
|
|
|
|
|
|
CefRefPtr<CefRequest> CefURLRequestCToCpp::GetRequest() {
|
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);
|
|
|
|
}
|
|
|
|
|
|
|
|
CefRefPtr<CefURLRequestClient> CefURLRequestCToCpp::GetClient() {
|
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);
|
|
|
|
}
|
|
|
|
|
|
|
|
CefURLRequest::Status CefURLRequestCToCpp::GetRequestStatus() {
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
CefURLRequest::ErrorCode CefURLRequestCToCpp::GetRequestError() {
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
CefRefPtr<CefResponse> CefURLRequestCToCpp::GetResponse() {
|
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);
|
|
|
|
}
|
|
|
|
|
|
|
|
void CefURLRequestCToCpp::Cancel() {
|
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.
|
|
|
|
|
|
|
|
CefURLRequestCToCpp::CefURLRequestCToCpp() {
|
|
|
|
}
|
|
|
|
|
2017-02-09 23:07:43 +01: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;
|
|
|
|
}
|
|
|
|
|
2016-09-01 13:24:30 +02:00
|
|
|
#if DCHECK_IS_ON()
|
2017-02-09 23:07:43 +01:00
|
|
|
template<> base::AtomicRefCount CefCToCppRefCounted<CefURLRequestCToCpp,
|
|
|
|
CefURLRequest, cef_urlrequest_t>::DebugObjCt = 0;
|
2012-06-19 18:29:49 +02:00
|
|
|
#endif
|
|
|
|
|
2017-02-09 23:07:43 +01:00
|
|
|
template<> CefWrapperType CefCToCppRefCounted<CefURLRequestCToCpp,
|
|
|
|
CefURLRequest, cef_urlrequest_t>::kWrapperType = WT_URLREQUEST;
|