mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
- Update to Chromium revision 165669.
- Fix Linux/OS-X compile errors (issue #751). git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@897 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -236,13 +236,15 @@ net::URLRequestContextGetter*
|
||||
|
||||
net::URLRequestContextGetter*
|
||||
CefBrowserContext::GetMediaRequestContextForStoragePartition(
|
||||
const std::string& partition_id) {
|
||||
const FilePath& partition_path,
|
||||
bool in_memory) {
|
||||
return GetRequestContext();
|
||||
}
|
||||
|
||||
net::URLRequestContextGetter*
|
||||
CefBrowserContext::GetRequestContextForStoragePartition(
|
||||
const std::string& partition_id) {
|
||||
const FilePath& partition_path,
|
||||
bool in_memory) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@@ -37,9 +37,11 @@ class CefBrowserContext : public content::BrowserContext {
|
||||
int renderer_child_id) OVERRIDE;
|
||||
virtual net::URLRequestContextGetter*
|
||||
GetMediaRequestContextForStoragePartition(
|
||||
const std::string& partition_id) OVERRIDE;
|
||||
const FilePath& partition_path,
|
||||
bool in_memory) OVERRIDE;
|
||||
virtual net::URLRequestContextGetter* GetRequestContextForStoragePartition(
|
||||
const std::string& partition_id) OVERRIDE;
|
||||
const FilePath& partition_path,
|
||||
bool in_memory) OVERRIDE;
|
||||
virtual content::ResourceContext* GetResourceContext() OVERRIDE;
|
||||
virtual content::GeolocationPermissionContext*
|
||||
GetGeolocationPermissionContext() OVERRIDE;
|
||||
|
@@ -301,8 +301,8 @@ CefRefPtr<CefBrowserHostImpl> CefBrowserHostImpl::GetBrowserForHost(
|
||||
const content::RenderViewHost* host) {
|
||||
DCHECK(host);
|
||||
CEF_REQUIRE_UIT();
|
||||
WebContentsImpl* web_contents =
|
||||
static_cast<WebContentsImpl*>(host->GetDelegate());
|
||||
content::WebContentsImpl* web_contents =
|
||||
static_cast<content::WebContentsImpl*>(host->GetDelegate());
|
||||
if (web_contents)
|
||||
return static_cast<CefBrowserHostImpl*>(web_contents->GetDelegate());
|
||||
return NULL;
|
||||
|
@@ -8,19 +8,12 @@
|
||||
|
||||
#include "libcef/browser/browser_context.h"
|
||||
#include "libcef/browser/browser_message_loop.h"
|
||||
#include "libcef/browser/content_browser_client.h"
|
||||
#include "libcef/browser/devtools_delegate.h"
|
||||
|
||||
#include "base/bind.h"
|
||||
#include "base/command_line.h"
|
||||
#include "base/message_loop.h"
|
||||
#include "base/string_number_conversions.h"
|
||||
#include "base/threading/thread.h"
|
||||
#include "base/threading/thread_restrictions.h"
|
||||
#include "content/browser/browser_process_sub_thread.h"
|
||||
#include "content/browser/download/download_file_manager.h"
|
||||
#include "content/browser/download/save_file_manager.h"
|
||||
#include "content/browser/plugin_service_impl.h"
|
||||
#include "content/public/browser/gpu_data_manager.h"
|
||||
#include "content/public/common/content_client.h"
|
||||
#include "content/public/common/content_switches.h"
|
||||
|
@@ -148,19 +148,19 @@ void BrowserToWebSettings(const CefBrowserSettings& cef, WebPreferences& web) {
|
||||
cef.universal_access_from_file_urls_allowed;
|
||||
web.allow_file_access_from_file_urls = cef.file_access_from_file_urls_allowed;
|
||||
web.experimental_webgl_enabled =
|
||||
GpuProcessHost::gpu_enabled() && !cef.webgl_disabled;
|
||||
content::GpuProcessHost::gpu_enabled() && !cef.webgl_disabled;
|
||||
web.gl_multisampling_enabled = web.experimental_webgl_enabled;
|
||||
web.show_composited_layer_borders = false;
|
||||
web.accelerated_compositing_enabled =
|
||||
GpuProcessHost::gpu_enabled() && !cef.accelerated_compositing_disabled;
|
||||
content::GpuProcessHost::gpu_enabled() && !cef.accelerated_compositing_disabled;
|
||||
web.accelerated_layers_enabled = !cef.accelerated_layers_disabled;
|
||||
web.accelerated_video_enabled = !cef.accelerated_video_disabled;
|
||||
web.accelerated_2d_canvas_enabled =
|
||||
GpuProcessHost::gpu_enabled() && !cef.accelerated_2d_canvas_disabled;
|
||||
content::GpuProcessHost::gpu_enabled() && !cef.accelerated_2d_canvas_disabled;
|
||||
web.accelerated_painting_enabled =
|
||||
GpuProcessHost::gpu_enabled() && cef.accelerated_painting_enabled;
|
||||
content::GpuProcessHost::gpu_enabled() && cef.accelerated_painting_enabled;
|
||||
web.accelerated_filters_enabled =
|
||||
GpuProcessHost::gpu_enabled() && cef.accelerated_filters_enabled;
|
||||
content::GpuProcessHost::gpu_enabled() && cef.accelerated_filters_enabled;
|
||||
web.accelerated_plugins_enabled = !cef.accelerated_plugins_disabled;
|
||||
web.memory_info_enabled = false;
|
||||
web.fullscreen_enabled = cef.fullscreen_enabled;
|
||||
|
@@ -229,13 +229,19 @@ class CefMediaObserver : public content::MediaObserver {
|
||||
int render_process_id,
|
||||
int render_view_id,
|
||||
const content::MediaStreamDevices& devices) OVERRIDE {}
|
||||
virtual void OnMediaRequestStateChanged(
|
||||
int render_process_id,
|
||||
int render_view_id,
|
||||
const content::MediaStreamDevice& device,
|
||||
content::MediaRequestState state) OVERRIDE {}
|
||||
};
|
||||
|
||||
|
||||
CefContentBrowserClient::CefContentBrowserClient()
|
||||
: browser_main_parts_(NULL) {
|
||||
plugin_service_filter_.reset(new CefPluginServiceFilter);
|
||||
PluginServiceImpl::GetInstance()->SetFilter(plugin_service_filter_.get());
|
||||
content::PluginServiceImpl::GetInstance()->SetFilter(
|
||||
plugin_service_filter_.get());
|
||||
}
|
||||
|
||||
CefContentBrowserClient::~CefContentBrowserClient() {
|
||||
|
@@ -349,7 +349,7 @@ bool CefCookieManagerImpl::GetCefCookie(const GURL& url,
|
||||
std::string cookie_path = net::CanonicalCookie::CanonPath(url, pc);
|
||||
base::Time creation_time = base::Time::Now();
|
||||
base::Time cookie_expires =
|
||||
net::CanonicalCookie::CanonExpiration(pc, creation_time);
|
||||
net::CanonicalCookie::CanonExpiration(pc, creation_time, creation_time);
|
||||
|
||||
CefString(&cookie.name).FromString(pc.Name());
|
||||
CefString(&cookie.value).FromString(pc.Value());
|
||||
|
@@ -127,6 +127,10 @@ std::string CefDevToolsDelegate::GetPageThumbnailData(const GURL& url) {
|
||||
return std::string();
|
||||
}
|
||||
|
||||
content::RenderViewHost* CefDevToolsDelegate::CreateNewTarget() {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
std::string CefDevToolsDelegate::GetDevToolsURL(content::RenderViewHost* rvh,
|
||||
bool http_scheme) {
|
||||
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
|
||||
|
@@ -31,6 +31,7 @@ class CefDevToolsDelegate : public content::DevToolsHttpHandlerDelegate {
|
||||
virtual bool BundlesFrontendResources() OVERRIDE;
|
||||
virtual FilePath GetDebugFrontendDir() OVERRIDE;
|
||||
virtual std::string GetPageThumbnailData(const GURL& url) OVERRIDE;
|
||||
virtual content::RenderViewHost* CreateNewTarget() OVERRIDE;
|
||||
|
||||
// Returns the DevTools URL for the specified RenderViewHost.
|
||||
std::string GetDevToolsURL(content::RenderViewHost* rvh, bool http_scheme);
|
||||
|
@@ -100,8 +100,3 @@ CefString CefDownloadItemImpl::GetMimeType() {
|
||||
CEF_VALUE_VERIFY_RETURN(false, CefString());
|
||||
return const_value().GetMimeType();
|
||||
}
|
||||
|
||||
CefString CefDownloadItemImpl::GetReferrerCharset() {
|
||||
CEF_VALUE_VERIFY_RETURN(false, CefString());
|
||||
return const_value().GetReferrerCharset();
|
||||
}
|
||||
|
@@ -36,7 +36,6 @@ class CefDownloadItemImpl
|
||||
virtual CefString GetSuggestedFileName() OVERRIDE;
|
||||
virtual CefString GetContentDisposition() OVERRIDE;
|
||||
virtual CefString GetMimeType() OVERRIDE;
|
||||
virtual CefString GetReferrerCharset() OVERRIDE;
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(CefDownloadItemImpl);
|
||||
|
@@ -263,7 +263,7 @@ bool CefDownloadManagerDelegate::DetermineDownloadTarget(
|
||||
FilePath suggested_name = net::GenerateFileName(
|
||||
item->GetURL(),
|
||||
item->GetContentDisposition(),
|
||||
item->GetReferrerCharset(),
|
||||
EmptyString(),
|
||||
item->GetSuggestedFilename(),
|
||||
item->GetMimeType(),
|
||||
"download");
|
||||
|
@@ -65,7 +65,8 @@ bool CefGetGeolocation(CefRefPtr<CefGetGeolocationCallback> callback) {
|
||||
}
|
||||
|
||||
if (CEF_CURRENTLY_ON_IOT()) {
|
||||
GeolocationProvider* provider = GeolocationProvider::GetInstance();
|
||||
content::GeolocationProvider* provider =
|
||||
content::GeolocationProvider::GetInstance();
|
||||
if (provider) {
|
||||
provider->RequestCallback(base::Bind(LocationCallback, callback));
|
||||
return true;
|
||||
|
@@ -11,11 +11,12 @@ CefResourceDispatcherHostDelegate::CefResourceDispatcherHostDelegate() {
|
||||
CefResourceDispatcherHostDelegate::~CefResourceDispatcherHostDelegate() {
|
||||
}
|
||||
|
||||
void CefResourceDispatcherHostDelegate::HandleExternalProtocol(const GURL& url,
|
||||
bool CefResourceDispatcherHostDelegate::HandleExternalProtocol(const GURL& url,
|
||||
int child_id,
|
||||
int route_id) {
|
||||
CefRefPtr<CefBrowserHostImpl> browser =
|
||||
CefBrowserHostImpl::GetBrowserByRoutingID(child_id, route_id);
|
||||
if (browser.get())
|
||||
browser->HandleExternalProtocol(url);
|
||||
return false;
|
||||
}
|
||||
|
@@ -16,7 +16,7 @@ class CefResourceDispatcherHostDelegate
|
||||
virtual ~CefResourceDispatcherHostDelegate();
|
||||
|
||||
// ResourceDispatcherHostDelegate methods.
|
||||
virtual void HandleExternalProtocol(const GURL& url,
|
||||
virtual bool HandleExternalProtocol(const GURL& url,
|
||||
int child_id,
|
||||
int route_id) OVERRIDE;
|
||||
|
||||
|
@@ -135,7 +135,7 @@ void CefNetworkDelegate::OnSendHeaders(
|
||||
int CefNetworkDelegate::OnHeadersReceived(
|
||||
net::URLRequest* request,
|
||||
const net::CompletionCallback& callback,
|
||||
net::HttpResponseHeaders* original_response_headers,
|
||||
const net::HttpResponseHeaders* original_response_headers,
|
||||
scoped_refptr<net::HttpResponseHeaders>* override_response_headers) {
|
||||
return net::OK;
|
||||
}
|
||||
|
@@ -28,7 +28,7 @@ class CefNetworkDelegate : public net::NetworkDelegate {
|
||||
virtual int OnHeadersReceived(
|
||||
net::URLRequest* request,
|
||||
const net::CompletionCallback& callback,
|
||||
net::HttpResponseHeaders* original_response_headers,
|
||||
const net::HttpResponseHeaders* original_response_headers,
|
||||
scoped_refptr<net::HttpResponseHeaders>* override_response_headers)
|
||||
OVERRIDE;
|
||||
virtual void OnBeforeRedirect(net::URLRequest* request,
|
||||
|
@@ -164,10 +164,7 @@ net::URLRequestContext* CefURLRequestContextGetter::GetURLRequestContext() {
|
||||
url_request_context_->set_accept_language("en-us,en");
|
||||
url_request_context_->set_accept_charset("iso-8859-1,*,utf-8");
|
||||
|
||||
storage_->set_host_resolver(
|
||||
net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism,
|
||||
net::HostResolver::kDefaultRetryAttempts,
|
||||
NULL));
|
||||
storage_->set_host_resolver(net::HostResolver::CreateDefaultResolver(NULL));
|
||||
storage_->set_cert_verifier(net::CertVerifier::CreateDefault());
|
||||
|
||||
bool proxy_service_set = false;
|
||||
|
@@ -159,6 +159,5 @@ void CefURLRequestContextProxy::Initialize(CefBrowserHostImpl* browser) {
|
||||
set_transport_security_state(context->transport_security_state());
|
||||
set_accept_charset(context->accept_charset());
|
||||
set_accept_language(context->accept_language());
|
||||
set_referrer_charset(context->referrer_charset());
|
||||
set_job_factory(context->job_factory());
|
||||
}
|
||||
|
@@ -70,7 +70,7 @@ void CefVisitWebPluginInfo(CefRefPtr<CefWebPluginInfoVisitor> visitor) {
|
||||
}
|
||||
|
||||
if (CEF_CURRENTLY_ON_UIT()) {
|
||||
PluginServiceImpl::GetInstance()->GetPlugins(
|
||||
content::PluginServiceImpl::GetInstance()->GetPlugins(
|
||||
base::Bind(PluginsCallbackImpl, visitor));
|
||||
} else {
|
||||
// Execute on the UI thread.
|
||||
@@ -86,7 +86,7 @@ void CefRefreshWebPlugins() {
|
||||
}
|
||||
|
||||
// No thread affinity.
|
||||
PluginServiceImpl::GetInstance()->RefreshPlugins();
|
||||
content::PluginServiceImpl::GetInstance()->RefreshPlugins();
|
||||
}
|
||||
|
||||
void CefAddWebPluginPath(const CefString& path) {
|
||||
@@ -102,7 +102,7 @@ void CefAddWebPluginPath(const CefString& path) {
|
||||
}
|
||||
|
||||
// No thread affinity.
|
||||
PluginServiceImpl::GetInstance()->AddExtraPluginPath(FilePath(path));
|
||||
content::PluginServiceImpl::GetInstance()->AddExtraPluginPath(FilePath(path));
|
||||
}
|
||||
|
||||
void CefAddWebPluginDirectory(const CefString& dir) {
|
||||
@@ -118,7 +118,7 @@ void CefAddWebPluginDirectory(const CefString& dir) {
|
||||
}
|
||||
|
||||
// No thread affinity.
|
||||
PluginServiceImpl::GetInstance()->AddExtraPluginDir(FilePath(dir));
|
||||
content::PluginServiceImpl::GetInstance()->AddExtraPluginDir(FilePath(dir));
|
||||
}
|
||||
|
||||
void CefRemoveWebPluginPath(const CefString& path) {
|
||||
@@ -134,7 +134,8 @@ void CefRemoveWebPluginPath(const CefString& path) {
|
||||
}
|
||||
|
||||
// No thread affinity.
|
||||
PluginServiceImpl::GetInstance()->RemoveExtraPluginPath(FilePath(path));
|
||||
content::PluginServiceImpl::GetInstance()->RemoveExtraPluginPath(
|
||||
FilePath(path));
|
||||
}
|
||||
|
||||
void CefUnregisterInternalWebPlugin(const CefString& path) {
|
||||
@@ -150,7 +151,8 @@ void CefUnregisterInternalWebPlugin(const CefString& path) {
|
||||
}
|
||||
|
||||
// No thread affinity.
|
||||
PluginServiceImpl::GetInstance()->UnregisterInternalPlugin(FilePath(path));
|
||||
content::PluginServiceImpl::GetInstance()->UnregisterInternalPlugin(
|
||||
FilePath(path));
|
||||
}
|
||||
|
||||
void CefForceWebPluginShutdown(const CefString& path) {
|
||||
@@ -166,7 +168,8 @@ void CefForceWebPluginShutdown(const CefString& path) {
|
||||
}
|
||||
|
||||
if (CEF_CURRENTLY_ON_IOT()) {
|
||||
PluginServiceImpl::GetInstance()->ForcePluginShutdown(FilePath(path));
|
||||
content::PluginServiceImpl::GetInstance()->ForcePluginShutdown(
|
||||
FilePath(path));
|
||||
} else {
|
||||
// Execute on the IO thread.
|
||||
CEF_POST_TASK(CEF_IOT, base::Bind(CefForceWebPluginShutdown, path));
|
||||
@@ -186,7 +189,8 @@ void CefRegisterWebPluginCrash(const CefString& path) {
|
||||
}
|
||||
|
||||
if (CEF_CURRENTLY_ON_IOT()) {
|
||||
PluginServiceImpl::GetInstance()->RegisterPluginCrash(FilePath(path));
|
||||
content::PluginServiceImpl::GetInstance()->RegisterPluginCrash(
|
||||
FilePath(path));
|
||||
} else {
|
||||
// Execute on the IO thread.
|
||||
CEF_POST_TASK(CEF_IOT, base::Bind(CefRegisterWebPluginCrash, path));
|
||||
@@ -209,7 +213,8 @@ void CefIsWebPluginUnstable(
|
||||
|
||||
if (CEF_CURRENTLY_ON_IOT()) {
|
||||
callback->IsUnstable(path,
|
||||
PluginServiceImpl::GetInstance()->IsPluginUnstable(FilePath(path)));
|
||||
content::PluginServiceImpl::GetInstance()->IsPluginUnstable(
|
||||
FilePath(path)));
|
||||
} else {
|
||||
// Execute on the IO thread.
|
||||
CEF_POST_TASK(CEF_IOT, base::Bind(CefIsWebPluginUnstable, path, callback));
|
||||
|
@@ -85,8 +85,8 @@ base::StringPiece CefContentClient::GetDataResource(
|
||||
int resource_id,
|
||||
ui::ScaleFactor scale_factor) const {
|
||||
base::StringPiece value =
|
||||
ResourceBundle::GetSharedInstance().GetRawDataResource(resource_id,
|
||||
scale_factor);
|
||||
ResourceBundle::GetSharedInstance().GetRawDataResourceForScale(
|
||||
resource_id, scale_factor);
|
||||
if (value.empty())
|
||||
LOG(ERROR) << "No data resource available for id " << resource_id;
|
||||
|
||||
|
@@ -33,6 +33,7 @@
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptSource.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
|
||||
#include "webkit/base/file_path_string_conversions.h"
|
||||
#include "webkit/glue/webkit_glue.h"
|
||||
|
||||
using WebKit::WebFrame;
|
||||
@@ -321,7 +322,7 @@ void CefBrowserImpl::LoadRequest(const CefMsg_LoadRequest_Params& params) {
|
||||
data.assign(element.bytes(), element.bytes_length());
|
||||
body.appendData(data);
|
||||
} else if (element.type() == net::UploadElement::TYPE_FILE) {
|
||||
body.appendFile(webkit_glue::FilePathToWebString(element.file_path()));
|
||||
body.appendFile(webkit_base::FilePathToWebString(element.file_path()));
|
||||
} else {
|
||||
NOTREACHED();
|
||||
}
|
||||
|
Reference in New Issue
Block a user