mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
- Add CefPostData::HasExcludedElements which returns true if the underlying
POST data includes elements that are not represented (issue #1761). - Add CefRequest::SetReferrer and CefRequest::GetReferrer[URL|Policy]. The Referer value will no longer be stored in the header map. - Move request-related conversion logic to CefRequestImpl and standardize the implementation.
This commit is contained in:
@ -46,6 +46,21 @@ int CEF_CALLBACK post_data_is_read_only(struct _cef_post_data_t* self) {
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK post_data_has_excluded_elements(
|
||||
struct _cef_post_data_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefPostDataCppToC::Get(self)->HasExcludedElements();
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
size_t CEF_CALLBACK post_data_get_element_count(struct _cef_post_data_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
@ -153,6 +168,7 @@ void CEF_CALLBACK post_data_remove_elements(struct _cef_post_data_t* self) {
|
||||
|
||||
CefPostDataCppToC::CefPostDataCppToC() {
|
||||
GetStruct()->is_read_only = post_data_is_read_only;
|
||||
GetStruct()->has_excluded_elements = post_data_has_excluded_elements;
|
||||
GetStruct()->get_element_count = post_data_get_element_count;
|
||||
GetStruct()->get_elements = post_data_get_elements;
|
||||
GetStruct()->remove_element = post_data_remove_element;
|
||||
|
@ -110,6 +110,55 @@ void CEF_CALLBACK request_set_method(struct _cef_request_t* self,
|
||||
CefString(method));
|
||||
}
|
||||
|
||||
void CEF_CALLBACK request_set_referrer(struct _cef_request_t* self,
|
||||
const cef_string_t* referrer_url, cef_referrer_policy_t policy) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: referrer_url; type: string_byref_const
|
||||
DCHECK(referrer_url);
|
||||
if (!referrer_url)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefRequestCppToC::Get(self)->SetReferrer(
|
||||
CefString(referrer_url),
|
||||
policy);
|
||||
}
|
||||
|
||||
cef_string_userfree_t CEF_CALLBACK request_get_referrer_url(
|
||||
struct _cef_request_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefString _retval = CefRequestCppToC::Get(self)->GetReferrerURL();
|
||||
|
||||
// Return type: string
|
||||
return _retval.DetachToUserFree();
|
||||
}
|
||||
|
||||
cef_referrer_policy_t CEF_CALLBACK request_get_referrer_policy(
|
||||
struct _cef_request_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return REFERRER_POLICY_DEFAULT;
|
||||
|
||||
// Execute
|
||||
cef_referrer_policy_t _retval = CefRequestCppToC::Get(
|
||||
self)->GetReferrerPolicy();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
struct _cef_post_data_t* CEF_CALLBACK request_get_post_data(
|
||||
struct _cef_request_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
@ -336,6 +385,9 @@ CefRequestCppToC::CefRequestCppToC() {
|
||||
GetStruct()->set_url = request_set_url;
|
||||
GetStruct()->get_method = request_get_method;
|
||||
GetStruct()->set_method = request_set_method;
|
||||
GetStruct()->set_referrer = request_set_referrer;
|
||||
GetStruct()->get_referrer_url = request_get_referrer_url;
|
||||
GetStruct()->get_referrer_policy = request_get_referrer_policy;
|
||||
GetStruct()->get_post_data = request_get_post_data;
|
||||
GetStruct()->set_post_data = request_set_post_data;
|
||||
GetStruct()->get_header_map = request_get_header_map;
|
||||
|
Reference in New Issue
Block a user