mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
libcef: Modifications due to underlying chromium changes.
- Change gfx::WindowHandle to gfx::NativeWindow and gfx::ViewHandle to gfx::NativeView. - Add proxy support to BrowserWebViewDelegate. - Add webkit\port\platform\graphics\skia path to libcef_webkit_includes.vsprops due to relocation of PlatformContextSkia.h. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@4 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -7,21 +7,24 @@
|
||||
#include "browser_request_context.h"
|
||||
|
||||
#include "net/base/cookie_monster.h"
|
||||
#include "net/proxy/proxy_service.h"
|
||||
#include "webkit/glue/webkit_glue.h"
|
||||
|
||||
BrowserRequestContext::BrowserRequestContext() {
|
||||
Init(std::wstring(), net::HttpCache::NORMAL);
|
||||
Init(std::wstring(), net::HttpCache::NORMAL, false);
|
||||
}
|
||||
|
||||
BrowserRequestContext::BrowserRequestContext(
|
||||
const std::wstring& cache_path,
|
||||
net::HttpCache::Mode cache_mode) {
|
||||
Init(cache_path, cache_mode);
|
||||
net::HttpCache::Mode cache_mode,
|
||||
bool no_proxy) {
|
||||
Init(cache_path, cache_mode, no_proxy);
|
||||
}
|
||||
|
||||
void BrowserRequestContext::Init(
|
||||
const std::wstring& cache_path,
|
||||
net::HttpCache::Mode cache_mode) {
|
||||
net::HttpCache::Mode cache_mode,
|
||||
bool no_proxy) {
|
||||
cookie_store_ = new net::CookieMonster();
|
||||
|
||||
user_agent_ = webkit_glue::GetUserAgent();
|
||||
@ -30,11 +33,15 @@ void BrowserRequestContext::Init(
|
||||
accept_language_ = "en-us,en";
|
||||
accept_charset_ = "iso-8859-1,*,utf-8";
|
||||
|
||||
net::ProxyInfo proxy_info;
|
||||
proxy_info.UseDirect();
|
||||
proxy_service_ = net::ProxyService::Create(no_proxy ? &proxy_info : NULL);
|
||||
|
||||
net::HttpCache *cache;
|
||||
if (cache_path.empty()) {
|
||||
cache = new net::HttpCache(NULL, 0);
|
||||
cache = new net::HttpCache(proxy_service_, 0);
|
||||
} else {
|
||||
cache = new net::HttpCache(NULL, cache_path, 0);
|
||||
cache = new net::HttpCache(proxy_service_, cache_path, 0);
|
||||
}
|
||||
cache->set_mode(cache_mode);
|
||||
http_transaction_factory_ = cache;
|
||||
@ -43,5 +50,6 @@ void BrowserRequestContext::Init(
|
||||
BrowserRequestContext::~BrowserRequestContext() {
|
||||
delete cookie_store_;
|
||||
delete http_transaction_factory_;
|
||||
delete proxy_service_;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user