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:
@ -30,7 +30,6 @@
|
||||
#include "libcef/common/drag_data_impl.h"
|
||||
#include "libcef/common/extensions/extensions_util.h"
|
||||
#include "libcef/common/main_delegate.h"
|
||||
#include "libcef/common/net/http_header_utils.h"
|
||||
#include "libcef/common/process_message_impl.h"
|
||||
#include "libcef/common/request_impl.h"
|
||||
|
||||
@ -1373,26 +1372,10 @@ void CefBrowserHostImpl::Navigate(const CefNavigateParams& params) {
|
||||
|
||||
void CefBrowserHostImpl::LoadRequest(int64 frame_id,
|
||||
CefRefPtr<CefRequest> request) {
|
||||
CefNavigateParams params(GURL(std::string(request->GetURL())),
|
||||
ui::PAGE_TRANSITION_TYPED);
|
||||
params.method = request->GetMethod();
|
||||
CefNavigateParams params(GURL(), ui::PAGE_TRANSITION_TYPED);
|
||||
params.frame_id = frame_id;
|
||||
params.first_party_for_cookies =
|
||||
GURL(std::string(request->GetFirstPartyForCookies()));
|
||||
|
||||
CefRequest::HeaderMap headerMap;
|
||||
request->GetHeaderMap(headerMap);
|
||||
if (!headerMap.empty())
|
||||
params.headers = HttpHeaderUtils::GenerateHeaders(headerMap);
|
||||
|
||||
CefRefPtr<CefPostData> postData = request->GetPostData();
|
||||
if (postData.get()) {
|
||||
CefPostDataImpl* impl = static_cast<CefPostDataImpl*>(postData.get());
|
||||
params.upload_data = new net::UploadData();
|
||||
impl->Get(*params.upload_data.get());
|
||||
}
|
||||
|
||||
params.load_flags = request->GetFlags();
|
||||
static_cast<CefRequestImpl*>(request.get())->Get(params);
|
||||
|
||||
Navigate(params);
|
||||
}
|
||||
|
Reference in New Issue
Block a user