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:
Marshall Greenblatt
2013-09-03 16:43:31 +00:00
parent 935a35f21c
commit 385be456c3
57 changed files with 2288 additions and 440 deletions

View File

@@ -6,16 +6,21 @@
#define CEF_LIBCEF_BROWSER_URL_REQUEST_CONTEXT_GETTER_PROXY_H_
#pragma once
#include "include/cef_request_context_handler.h"
#include "base/memory/scoped_ptr.h"
#include "net/url_request/url_request_context_getter.h"
class CefBrowserHostImpl;
class CefURLRequestContextGetter;
class CefURLRequestContextProxy;
namespace net {
class HostResolver;
}
class CefURLRequestContextGetterProxy : public net::URLRequestContextGetter {
public:
CefURLRequestContextGetterProxy(CefBrowserHostImpl* browser,
CefURLRequestContextGetterProxy(CefRefPtr<CefRequestContextHandler> handler,
CefURLRequestContextGetter* parent);
virtual ~CefURLRequestContextGetterProxy();
@@ -24,8 +29,12 @@ class CefURLRequestContextGetterProxy : public net::URLRequestContextGetter {
virtual scoped_refptr<base::SingleThreadTaskRunner>
GetNetworkTaskRunner() const OVERRIDE;
net::HostResolver* GetHostResolver() const;
CefRefPtr<CefRequestContextHandler> handler() const { return handler_; }
private:
CefBrowserHostImpl* browser_;
CefRefPtr<CefRequestContextHandler> handler_;
scoped_refptr<CefURLRequestContextGetter> parent_;
// The |context_proxy_| object is owned by |parent_|.