mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Structural improvements for request handling (issue #1044)
- Add new CefRequestContext and CefRequestContextHandler classes. - Add CefRequestContext argument to CefBrowserHost static factory methods. - Move GetCookieManager from CefRequestHandler to CefRequestContextHandler. - Use BrowserContext as the root proxy object for network requests. - Move accessors for CefBrowserMainParts members from CefContext to CefContentBrowserClient. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1424 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -8,12 +8,11 @@
|
||||
#include "libcef/browser/url_request_context_proxy.h"
|
||||
|
||||
CefURLRequestContextGetterProxy::CefURLRequestContextGetterProxy(
|
||||
CefBrowserHostImpl* browser,
|
||||
CefRefPtr<CefRequestContextHandler> handler,
|
||||
CefURLRequestContextGetter* parent)
|
||||
: browser_(browser),
|
||||
: handler_(handler),
|
||||
parent_(parent),
|
||||
context_proxy_(NULL) {
|
||||
DCHECK(browser);
|
||||
DCHECK(parent);
|
||||
}
|
||||
|
||||
@@ -28,7 +27,7 @@ net::URLRequestContext*
|
||||
CEF_REQUIRE_IOT();
|
||||
if (!context_proxy_) {
|
||||
context_proxy_ = parent_->CreateURLRequestContextProxy();
|
||||
context_proxy_->Initialize(browser_);
|
||||
context_proxy_->Initialize(handler_);
|
||||
}
|
||||
return context_proxy_;
|
||||
}
|
||||
@@ -37,3 +36,7 @@ scoped_refptr<base::SingleThreadTaskRunner>
|
||||
CefURLRequestContextGetterProxy::GetNetworkTaskRunner() const {
|
||||
return parent_->GetNetworkTaskRunner();
|
||||
}
|
||||
|
||||
net::HostResolver* CefURLRequestContextGetterProxy::GetHostResolver() const {
|
||||
return parent_->host_resolver();
|
||||
}
|
||||
|
Reference in New Issue
Block a user