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:
@ -10,11 +10,13 @@
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/memory/scoped_vector.h"
|
||||
#include "base/prefs/pref_service.h"
|
||||
#include "base/strings/string_piece.h"
|
||||
#include "chrome/browser/net/pref_proxy_config_tracker.h"
|
||||
#include "content/public/browser/browser_main_parts.h"
|
||||
#include "net/proxy/proxy_config_service.h"
|
||||
#include "net/url_request/url_request_context_getter.h"
|
||||
|
||||
namespace base {
|
||||
class MessageLoop;
|
||||
@ -44,18 +46,30 @@ class CefBrowserMainParts : public content::BrowserMainParts {
|
||||
virtual void PostMainMessageLoopRun() OVERRIDE;
|
||||
virtual void PostDestroyThreads() OVERRIDE;
|
||||
|
||||
CefBrowserContext* browser_context() const { return browser_context_.get(); }
|
||||
CefDevToolsDelegate* devtools_delegate() const { return devtools_delegate_.get(); }
|
||||
CefBrowserContext* browser_context() const {
|
||||
return global_browser_context_.get();
|
||||
}
|
||||
scoped_refptr<net::URLRequestContextGetter> request_context() const {
|
||||
return global_request_context_;
|
||||
}
|
||||
CefDevToolsDelegate* devtools_delegate() const {
|
||||
return devtools_delegate_.get();
|
||||
}
|
||||
PrefService* pref_service() const { return pref_service_.get(); }
|
||||
scoped_ptr<net::ProxyConfigService> proxy_config_service() {
|
||||
return proxy_config_service_.Pass();
|
||||
}
|
||||
|
||||
void AddBrowserContext(CefBrowserContext* context);
|
||||
void RemoveBrowserContext(CefBrowserContext* context);
|
||||
|
||||
private:
|
||||
void PlatformInitialize();
|
||||
void PlatformCleanup();
|
||||
|
||||
scoped_ptr<CefBrowserContext> browser_context_;
|
||||
scoped_ptr<CefBrowserContext> global_browser_context_;
|
||||
scoped_refptr<net::URLRequestContextGetter> global_request_context_;
|
||||
ScopedVector<CefBrowserContext> browser_contexts_;
|
||||
scoped_ptr<CefDevToolsDelegate> devtools_delegate_;
|
||||
scoped_ptr<base::MessageLoop> message_loop_;
|
||||
scoped_ptr<PrefProxyConfigTracker> pref_proxy_config_tracker_;
|
||||
|
Reference in New Issue
Block a user