mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add NetworkService support for CefURLRequest (see issue #2622).
Requests created using CefURLRequest::Create are not associated with a browser/frame. When originating from the render process these requests cannot be intercepted and consequently only http(s) and blob requests are supported. To work around this limitation a new CefFrame::CreateURLRequest method has been added that allows the request to be associated with that browser/frame for interception purposes. This change also fixes an issue with the NetworkService implementation where redirected requests could result in two parallel requests being sent to the target server. To test: URLRequestTest.* tests pass with NetworkService enabled.
This commit is contained in:
@ -14,7 +14,8 @@ class CefBrowserImpl;
|
||||
|
||||
namespace blink {
|
||||
class WebLocalFrame;
|
||||
}
|
||||
class WebURLLoaderFactory;
|
||||
} // namespace blink
|
||||
|
||||
// Implementation of CefFrame. CefFrameImpl objects are owned by the
|
||||
// CefBrowerImpl and will be detached when the browser is notified that the
|
||||
@ -53,6 +54,12 @@ class CefFrameImpl : public CefFrame {
|
||||
CefRefPtr<CefBrowser> GetBrowser() override;
|
||||
CefRefPtr<CefV8Context> GetV8Context() override;
|
||||
void VisitDOM(CefRefPtr<CefDOMVisitor> visitor) override;
|
||||
CefRefPtr<CefURLRequest> CreateURLRequest(
|
||||
CefRefPtr<CefRequest> request,
|
||||
CefRefPtr<CefURLRequestClient> client) override;
|
||||
|
||||
// Used by CefRenderURLRequest.
|
||||
blink::WebURLLoaderFactory* GetURLLoaderFactory();
|
||||
|
||||
void Detach();
|
||||
|
||||
@ -65,6 +72,8 @@ class CefFrameImpl : public CefFrame {
|
||||
blink::WebLocalFrame* frame_;
|
||||
int64 frame_id_;
|
||||
|
||||
std::unique_ptr<blink::WebURLLoaderFactory> url_loader_factory_;
|
||||
|
||||
IMPLEMENT_REFCOUNTING(CefFrameImpl);
|
||||
DISALLOW_COPY_AND_ASSIGN(CefFrameImpl);
|
||||
};
|
||||
|
Reference in New Issue
Block a user