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:
@ -53,6 +53,7 @@ class CefPostDataElement;
|
||||
class CefRequest : public virtual CefBase {
|
||||
public:
|
||||
typedef std::multimap<CefString, CefString> HeaderMap;
|
||||
typedef cef_referrer_policy_t ReferrerPolicy;
|
||||
typedef cef_resource_type_t ResourceType;
|
||||
typedef cef_transition_type_t TransitionType;
|
||||
|
||||
@ -93,6 +94,27 @@ class CefRequest : public virtual CefBase {
|
||||
/*--cef()--*/
|
||||
virtual void SetMethod(const CefString& method) =0;
|
||||
|
||||
///
|
||||
// Set the referrer URL and policy. If non-empty the referrer URL must be
|
||||
// fully qualified with an HTTP or HTTPS scheme component. Any username,
|
||||
// password or ref component will be removed.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetReferrer(const CefString& referrer_url,
|
||||
ReferrerPolicy policy) =0;
|
||||
|
||||
///
|
||||
// Get the referrer URL.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual CefString GetReferrerURL() =0;
|
||||
|
||||
///
|
||||
// Get the referrer policy.
|
||||
///
|
||||
/*--cef(default_retval=REFERRER_POLICY_DEFAULT)--*/
|
||||
virtual ReferrerPolicy GetReferrerPolicy() =0;
|
||||
|
||||
///
|
||||
// Get the post data.
|
||||
///
|
||||
@ -106,13 +128,14 @@ class CefRequest : public virtual CefBase {
|
||||
virtual void SetPostData(CefRefPtr<CefPostData> postData) =0;
|
||||
|
||||
///
|
||||
// Get the header values.
|
||||
// Get the header values. Will not include the Referer value if any.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void GetHeaderMap(HeaderMap& headerMap) =0;
|
||||
|
||||
///
|
||||
// Set the header values.
|
||||
// Set the header values. If a Referer value exists in the header map it will
|
||||
// be removed and ignored.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void SetHeaderMap(const HeaderMap& headerMap) =0;
|
||||
@ -200,6 +223,15 @@ class CefPostData : public virtual CefBase {
|
||||
/*--cef()--*/
|
||||
virtual bool IsReadOnly() =0;
|
||||
|
||||
///
|
||||
// Returns true if the underlying POST data includes elements that are not
|
||||
// represented by this CefPostData object (for example, multi-part file upload
|
||||
// data). Modifying CefPostData objects with excluded elements may result in
|
||||
// the request failing.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool HasExcludedElements() = 0;
|
||||
|
||||
///
|
||||
// Returns the number of existing post data elements.
|
||||
///
|
||||
|
Reference in New Issue
Block a user