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:
Marshall Greenblatt
2008-12-13 18:42:19 +00:00
parent 166b8524dd
commit d0639c9f4e
12 changed files with 125 additions and 114 deletions

View File

@ -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_;
}