Add CefURLRequest::ResponseWasCached method (issue #2283)

This commit is contained in:
Marshall Greenblatt
2018-01-03 16:14:29 -05:00
parent 1c7391b70a
commit 50ca6928c3
12 changed files with 117 additions and 15 deletions

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=78d98006142b5694aaf16320761f55ad19104c40$
// $hash=f4e93b00934fd541c9ab0b0a43da21ece8ccddaf$
//
#include "libcef_dll/ctocpp/urlrequest_ctocpp.h"
@@ -118,6 +118,20 @@ CefRefPtr<CefResponse> CefURLRequestCToCpp::GetResponse() {
return CefResponseCToCpp::Wrap(_retval);
}
bool CefURLRequestCToCpp::ResponseWasCached() {
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;
}
void CefURLRequestCToCpp::Cancel() {
cef_urlrequest_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, cancel))

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=8f301ab7ac41ee16f9e8d5206f2c2b3d0f0fa5d2$
// $hash=82b495b11a2564be98ffb520fefe8b2ea941c977$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_URLREQUEST_CTOCPP_H_
@@ -38,6 +38,7 @@ class CefURLRequestCToCpp : public CefCToCppRefCounted<CefURLRequestCToCpp,
Status GetRequestStatus() OVERRIDE;
ErrorCode GetRequestError() OVERRIDE;
CefRefPtr<CefResponse> GetResponse() OVERRIDE;
bool ResponseWasCached() OVERRIDE;
void Cancel() OVERRIDE;
};