mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-01-24 16:31:39 +01:00
0a98edff56
- Fix ASSERT in CefBrowserImpl::UIT_GetPagesCount() when no default printer is configured (Issue #20). - Remove non-existent WebFrame objects while iterating over the bound object list in CefJSContainer::BindToJavascript(). WebFrame objects are destroyed when navigating from a page with more frames to a page with less frames. If we don't remove the non-existent frames they will remain in the list until the browser window is destroyed. - Don't call UIT_* functions from class destructors as destruction may occur on a different thread. libcef: Update due to underlying chromium changes. - Header file locations changed from third_party/WebKit/WebKit to webkit/api as a result of WebKit unforking. - Project file locations changed due to GYP now being used for WebKit builds. - Add simple_clipboard_impl.cc in the libcef directory because it has been moved from webkit/glue to test_shell. - Changes related to navigation. - New parameters added to WebViewDelegate methods. libcef_dll: Update due to underlying chromium changes. - webkit_resources.rc and webkit_strings_en-US.rc moved from grit_derived_sources to obj/global_intermediate/webkit. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@24 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
57 lines
1.6 KiB
C++
57 lines
1.6 KiB
C++
// Copyright (c) 2008 The Chromium Embedded Framework Authors.
|
|
// Portions copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#include "precompiled_libcef.h"
|
|
#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, false);
|
|
}
|
|
|
|
BrowserRequestContext::BrowserRequestContext(
|
|
const std::wstring& cache_path,
|
|
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,
|
|
bool no_proxy) {
|
|
cookie_store_ = new net::CookieMonster();
|
|
|
|
// hard-code A-L and A-C for test shells
|
|
accept_language_ = "en-us,en";
|
|
accept_charset_ = "iso-8859-1,*,utf-8";
|
|
|
|
net::ProxyConfig proxy_config;
|
|
proxy_service_ = net::ProxyService::Create(no_proxy ? &proxy_config : NULL);
|
|
|
|
net::HttpCache *cache;
|
|
if (cache_path.empty()) {
|
|
cache = new net::HttpCache(proxy_service_, 0);
|
|
} else {
|
|
cache = new net::HttpCache(proxy_service_, cache_path, 0);
|
|
}
|
|
cache->set_mode(cache_mode);
|
|
http_transaction_factory_ = cache;
|
|
}
|
|
|
|
BrowserRequestContext::~BrowserRequestContext() {
|
|
delete cookie_store_;
|
|
delete http_transaction_factory_;
|
|
delete proxy_service_;
|
|
}
|
|
|
|
const std::string& BrowserRequestContext::GetUserAgent(
|
|
const GURL& url) const {
|
|
return webkit_glue::GetUserAgent(url);
|
|
}
|