- Update to Chromium revision 59193.

- Use Mesa for off-screen rendering.
- Add support for the FileSystem API and "blob" schema.
- Set User-Agent product version to "Chrome/7.0.517.0"

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@102 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2010-09-13 01:59:43 +00:00
parent e8cc5669f0
commit 92197f8046
19 changed files with 276 additions and 14 deletions

View File

@ -52,3 +52,4 @@ Date | CEF Revision | Chromium Revision
2010-03-29 | /trunk@72 | /trunk@42941 2010-03-29 | /trunk@72 | /trunk@42941
2010-06-21 | /trunk@82 | /trunk@50325 2010-06-21 | /trunk@82 | /trunk@50325
2010-08-09 | /trunk@93 | /trunk@55388 2010-08-09 | /trunk@93 | /trunk@55388
2010-09-12 | /trunk@102 | /trunk@59193

View File

@ -128,6 +128,7 @@
'../base/base.gyp:base_i18n', '../base/base.gyp:base_i18n',
'../breakpad/breakpad.gyp:breakpad_handler', '../breakpad/breakpad.gyp:breakpad_handler',
'../build/temp_gyp/googleurl.gyp:googleurl', '../build/temp_gyp/googleurl.gyp:googleurl',
'../gfx/gfx.gyp:gfx',
'../media/media.gyp:media', '../media/media.gyp:media',
'../net/net.gyp:net', '../net/net.gyp:net',
'../net/net.gyp:net_resources', '../net/net.gyp:net_resources',
@ -141,6 +142,7 @@
'../third_party/libjpeg/libjpeg.gyp:libjpeg', '../third_party/libjpeg/libjpeg.gyp:libjpeg',
'../third_party/libpng/libpng.gyp:libpng', '../third_party/libpng/libpng.gyp:libpng',
'../third_party/libxslt/libxslt.gyp:libxslt', '../third_party/libxslt/libxslt.gyp:libxslt',
'../third_party/mesa/mesa.gyp:osmesa',
'../third_party/modp_b64/modp_b64.gyp:modp_b64', '../third_party/modp_b64/modp_b64.gyp:modp_b64',
'../third_party/WebKit/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:pcre', '../third_party/WebKit/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:pcre',
'../third_party/WebKit/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf', '../third_party/WebKit/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
@ -148,6 +150,7 @@
'../third_party/WebKit/WebKit/chromium/WebKit.gyp:webkit', '../third_party/WebKit/WebKit/chromium/WebKit.gyp:webkit',
'../third_party/zlib/zlib.gyp:zlib', '../third_party/zlib/zlib.gyp:zlib',
'../webkit/support/webkit_support.gyp:appcache', '../webkit/support/webkit_support.gyp:appcache',
'../webkit/support/webkit_support.gyp:blob',
'../webkit/support/webkit_support.gyp:database', '../webkit/support/webkit_support.gyp:database',
'../webkit/support/webkit_support.gyp:glue', '../webkit/support/webkit_support.gyp:glue',
'../webkit/support/webkit_support.gyp:webkit_resources', '../webkit/support/webkit_support.gyp:webkit_resources',
@ -299,6 +302,7 @@
'../base/base.gyp:base_i18n', '../base/base.gyp:base_i18n',
'../breakpad/breakpad.gyp:breakpad_handler', '../breakpad/breakpad.gyp:breakpad_handler',
'../build/temp_gyp/googleurl.gyp:googleurl', '../build/temp_gyp/googleurl.gyp:googleurl',
'../gfx/gfx.gyp:gfx',
'../media/media.gyp:media', '../media/media.gyp:media',
'../net/net.gyp:net', '../net/net.gyp:net',
'../net/net.gyp:net_resources', '../net/net.gyp:net_resources',
@ -312,6 +316,7 @@
'../third_party/libjpeg/libjpeg.gyp:libjpeg', '../third_party/libjpeg/libjpeg.gyp:libjpeg',
'../third_party/libpng/libpng.gyp:libpng', '../third_party/libpng/libpng.gyp:libpng',
'../third_party/libxslt/libxslt.gyp:libxslt', '../third_party/libxslt/libxslt.gyp:libxslt',
'../third_party/mesa/mesa.gyp:osmesa',
'../third_party/modp_b64/modp_b64.gyp:modp_b64', '../third_party/modp_b64/modp_b64.gyp:modp_b64',
'../third_party/WebKit/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:pcre', '../third_party/WebKit/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:pcre',
'../third_party/WebKit/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf', '../third_party/WebKit/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
@ -319,6 +324,7 @@
'../third_party/WebKit/WebKit/chromium/WebKit.gyp:webkit', '../third_party/WebKit/WebKit/chromium/WebKit.gyp:webkit',
'../third_party/zlib/zlib.gyp:zlib', '../third_party/zlib/zlib.gyp:zlib',
'../webkit/support/webkit_support.gyp:appcache', '../webkit/support/webkit_support.gyp:appcache',
'../webkit/support/webkit_support.gyp:blob',
'../webkit/support/webkit_support.gyp:database', '../webkit/support/webkit_support.gyp:database',
'../webkit/support/webkit_support.gyp:glue', '../webkit/support/webkit_support.gyp:glue',
'../webkit/support/webkit_support.gyp:webkit_resources', '../webkit/support/webkit_support.gyp:webkit_resources',
@ -356,6 +362,8 @@
'libcef/browser_socket_stream_bridge.h', 'libcef/browser_socket_stream_bridge.h',
'libcef/browser_webcookiejar_impl.cc', 'libcef/browser_webcookiejar_impl.cc',
'libcef/browser_webcookiejar_impl.h', 'libcef/browser_webcookiejar_impl.h',
'libcef/browser_webblobregistry_impl.cc',
'libcef/browser_webblobregistry_impl.h',
'libcef/browser_webkit_glue.cc', 'libcef/browser_webkit_glue.cc',
'libcef/browser_webkit_glue.h', 'libcef/browser_webkit_glue.h',
'libcef/browser_webkit_glue_win.cc', 'libcef/browser_webkit_glue_win.cc',

View File

@ -9,7 +9,8 @@
#include "base/message_loop.h" #include "base/message_loop.h"
#include "base/platform_thread.h" #include "base/platform_thread.h"
#include "base/process_util.h" #include "base/process_util.h"
#include "third_party/sqlite/preprocessed/sqlite3.h" #include "base/utf_string_conversions.h"
#include "third_party/sqlite/sqlite3.h"
#include "third_party/WebKit/WebKit/chromium/public/WebDatabase.h" #include "third_party/WebKit/WebKit/chromium/public/WebDatabase.h"
#include "third_party/WebKit/WebKit/chromium/public/WebString.h" #include "third_party/WebKit/WebKit/chromium/public/WebString.h"
#include "webkit/database/database_util.h" #include "webkit/database/database_util.h"

View File

@ -53,6 +53,12 @@ CefBrowserImpl::CefBrowserImpl(CefWindowInfo& windowInfo, bool popup,
delegate_.reset(new BrowserWebViewDelegate(this)); delegate_.reset(new BrowserWebViewDelegate(this));
popup_delegate_.reset(new BrowserWebViewDelegate(this)); popup_delegate_.reset(new BrowserWebViewDelegate(this));
nav_controller_.reset(new BrowserNavigationController(this)); nav_controller_.reset(new BrowserNavigationController(this));
if (!file_system_root_.CreateUniqueTempDir()) {
LOG(WARNING) << "Failed to create a temp dir for the filesystem."
"FileSystem feature will be disabled.";
DCHECK(file_system_root_.path().empty());
}
} }

View File

@ -16,6 +16,7 @@
#include "printing/win_printing_context.h" #include "printing/win_printing_context.h"
#endif #endif
#include "base/scoped_temp_dir.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFindOptions.h" #include "third_party/WebKit/WebKit/chromium/public/WebFindOptions.h"
namespace base { namespace base {
@ -228,6 +229,8 @@ public:
static bool ImplementsThreadSafeReferenceCounting() { return true; } static bool ImplementsThreadSafeReferenceCounting() { return true; }
const FilePath& file_system_root() const { return file_system_root_.path(); }
protected: protected:
CefWindowInfo window_info_; CefWindowInfo window_info_;
bool is_popup_; bool is_popup_;
@ -250,6 +253,9 @@ protected:
// Unique browser ID assigned by the context. // Unique browser ID assigned by the context.
int unique_id_; int unique_id_;
// A temporary directory for FileSystem API.
ScopedTempDir file_system_root_;
}; };

View File

@ -17,6 +17,7 @@
#include "net/proxy/proxy_config_service.h" #include "net/proxy/proxy_config_service.h"
#include "net/proxy/proxy_config_service_fixed.h" #include "net/proxy/proxy_config_service_fixed.h"
#include "net/proxy/proxy_service.h" #include "net/proxy/proxy_service.h"
#include "webkit/blob/blob_storage_controller.h"
#include "webkit/glue/webkit_glue.h" #include "webkit/glue/webkit_glue.h"
BrowserRequestContext::BrowserRequestContext() { BrowserRequestContext::BrowserRequestContext() {
@ -46,7 +47,8 @@ void BrowserRequestContext::Init(
net::ProxyService::CreateSystemProxyConfigService( net::ProxyService::CreateSystemProxyConfigService(
MessageLoop::current(), NULL)); MessageLoop::current(), NULL));
host_resolver_ = host_resolver_ =
net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism); net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism,
NULL);
proxy_service_ = net::ProxyService::Create(proxy_config_service.release(), proxy_service_ = net::ProxyService::Create(proxy_config_service.release(),
false, NULL, NULL, NULL, NULL); false, NULL, NULL, NULL, NULL);
ssl_config_service_ = net::SSLConfigService::CreateSystemSSLConfigService(); ssl_config_service_ = net::SSLConfigService::CreateSystemSSLConfigService();
@ -65,6 +67,8 @@ void BrowserRequestContext::Init(
http_transaction_factory_ = cache; http_transaction_factory_ = cache;
ftp_transaction_factory_ = new net::FtpNetworkLayer(host_resolver_); ftp_transaction_factory_ = new net::FtpNetworkLayer(host_resolver_);
blob_storage_controller_.reset(new webkit_blob::BlobStorageController());
} }
BrowserRequestContext::~BrowserRequestContext() { BrowserRequestContext::~BrowserRequestContext() {

View File

@ -10,6 +10,9 @@
#include "net/url_request/url_request_context.h" #include "net/url_request/url_request_context.h"
class FilePath; class FilePath;
namespace webkit_blob {
class BlobStorageController;
}
// A basic URLRequestContext that only provides an in-memory cookie store. // A basic URLRequestContext that only provides an in-memory cookie store.
class BrowserRequestContext : public URLRequestContext { class BrowserRequestContext : public URLRequestContext {
@ -28,9 +31,15 @@ class BrowserRequestContext : public URLRequestContext {
void SetAcceptAllCookies(bool accept_all_cookies); void SetAcceptAllCookies(bool accept_all_cookies);
webkit_blob::BlobStorageController* blob_storage_controller() const {
return blob_storage_controller_.get();
}
private: private:
void Init(const FilePath& cache_path, net::HttpCache::Mode cache_mode, void Init(const FilePath& cache_path, net::HttpCache::Mode cache_mode,
bool no_proxy); bool no_proxy);
scoped_ptr<webkit_blob::BlobStorageController> blob_storage_controller_;
}; };
#endif // _BROWSER_REQUEST_CONTEXT_H #endif // _BROWSER_REQUEST_CONTEXT_H

View File

@ -52,6 +52,7 @@
#include "base/thread.h" #include "base/thread.h"
#include "base/utf_string_conversions.h" #include "base/utf_string_conversions.h"
#include "base/waitable_event.h" #include "base/waitable_event.h"
#include "net/base/cookie_store.h"
#include "net/base/io_buffer.h" #include "net/base/io_buffer.h"
#include "net/base/load_flags.h" #include "net/base/load_flags.h"
#include "net/base/net_errors.h" #include "net/base/net_errors.h"
@ -67,6 +68,7 @@
#endif #endif
#include "net/url_request/url_request.h" #include "net/url_request/url_request.h"
#include "webkit/appcache/appcache_interfaces.h" #include "webkit/appcache/appcache_interfaces.h"
#include "webkit/blob/blob_storage_controller.h"
#include "webkit/glue/resource_loader_bridge.h" #include "webkit/glue/resource_loader_bridge.h"
using webkit_glue::ResourceLoaderBridge; using webkit_glue::ResourceLoaderBridge;
@ -298,6 +300,12 @@ class RequestProxy : public URLRequest::Delegate,
if(!handled) if(!handled)
{ {
// Might need to resolve the blob references in the upload data.
if (params->upload) {
_Context->request_context()->blob_storage_controller()->
ResolveBlobReferencesInUploadData(params->upload.get());
}
request_.reset(new URLRequest(params->url, this)); request_.reset(new URLRequest(params->url, this));
request_->set_method(params->method); request_->set_method(params->method);
request_->set_first_party_for_cookies(params->first_party_for_cookies); request_->set_first_party_for_cookies(params->first_party_for_cookies);
@ -641,6 +649,13 @@ class ResourceLoaderBridgeImpl : public ResourceLoaderBridge {
expected_modification_time); expected_modification_time);
} }
virtual void AppendBlobToUpload(const GURL& blob_url) {
DCHECK(params_.get());
if (!params_->upload)
params_->upload = new net::UploadData();
params_->upload->AppendBlob(blob_url);
}
virtual void SetUploadIdentifier(int64 identifier) { virtual void SetUploadIdentifier(int64 identifier) {
DCHECK(params_.get()); DCHECK(params_.get());
if (!params_->upload) if (!params_->upload)

View File

@ -8,8 +8,6 @@
#include <string> #include <string>
#include "base/message_loop_proxy.h" #include "base/message_loop_proxy.h"
#include "base/file_path.h"
#include "net/http/http_cache.h"
class GURL; class GURL;

View File

@ -0,0 +1,90 @@
// Copyright (c) 2010 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 "browser_webblobregistry_impl.h"
#include "base/message_loop.h"
#include "googleurl/src/gurl.h"
#include "third_party/WebKit/WebKit/chromium/public/WebBlobData.h"
#include "third_party/WebKit/WebKit/chromium/public/WebBlobStorageData.h"
#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/WebKit/chromium/public/WebURL.h"
#include "webkit/blob/blob_data.h"
#include "webkit/blob/blob_storage_controller.h"
using WebKit::WebBlobData;
using WebKit::WebBlobStorageData;
using WebKit::WebString;
using WebKit::WebURL;
MessageLoop* g_io_thread;
webkit_blob::BlobStorageController* g_blob_storage_controller;
/* static */
void BrowserWebBlobRegistryImpl::InitializeOnIOThread(
webkit_blob::BlobStorageController* blob_storage_controller) {
g_io_thread = MessageLoop::current();
g_blob_storage_controller = blob_storage_controller;
}
/* static */
void BrowserWebBlobRegistryImpl::Cleanup() {
g_io_thread = NULL;
g_blob_storage_controller = NULL;
}
BrowserWebBlobRegistryImpl::BrowserWebBlobRegistryImpl() {
}
void BrowserWebBlobRegistryImpl::registerBlobURL(
const WebURL& url, WebBlobData& data) {
DCHECK(g_io_thread);
scoped_refptr<webkit_blob::BlobData> blob_data(
new webkit_blob::BlobData(data));
blob_data->AddRef(); // Release on DoRegisterBlobURL.
g_io_thread->PostTask(
FROM_HERE,
NewRunnableMethod(this,
&BrowserWebBlobRegistryImpl::DoRegisterBlobUrl,
url,
blob_data.get()));
}
void BrowserWebBlobRegistryImpl::registerBlobURL(
const WebURL& url, const WebURL& src_url) {
DCHECK(g_io_thread);
g_io_thread->PostTask(
FROM_HERE,
NewRunnableMethod(this,
&BrowserWebBlobRegistryImpl::DoRegisterBlobUrlFrom,
url,
src_url));
}
void BrowserWebBlobRegistryImpl::unregisterBlobURL(const WebURL& url) {
DCHECK(g_io_thread);
g_io_thread->PostTask(
FROM_HERE,
NewRunnableMethod(this,
&BrowserWebBlobRegistryImpl::DoUnregisterBlobUrl,
url));
}
void BrowserWebBlobRegistryImpl::DoRegisterBlobUrl(
const GURL& url, webkit_blob::BlobData* blob_data) {
DCHECK(g_blob_storage_controller);
g_blob_storage_controller->RegisterBlobUrl(url, blob_data);
blob_data->Release();
}
void BrowserWebBlobRegistryImpl::DoRegisterBlobUrlFrom(
const GURL& url, const GURL& src_url) {
DCHECK(g_blob_storage_controller);
g_blob_storage_controller->RegisterBlobUrlFrom(url, src_url);
}
void BrowserWebBlobRegistryImpl::DoUnregisterBlobUrl(const GURL& url) {
DCHECK(g_blob_storage_controller);
g_blob_storage_controller->UnregisterBlobUrl(url);
}

View File

@ -0,0 +1,47 @@
// Copyright (c) 2010 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.
#ifndef BROWSER_WEBBLOBREGISTRY_IMPL_H_
#define BROWSER_WEBBLOBREGISTRY_IMPL_H_
#include "base/ref_counted.h"
#include "third_party/WebKit/WebKit/chromium/public/WebBlobRegistry.h"
class GURL;
namespace webkit_blob {
class BlobData;
class BlobStorageController;
}
class BrowserWebBlobRegistryImpl
: public WebKit::WebBlobRegistry,
public base::RefCountedThreadSafe<BrowserWebBlobRegistryImpl> {
public:
static void InitializeOnIOThread(
webkit_blob::BlobStorageController* blob_storage_controller);
static void Cleanup();
BrowserWebBlobRegistryImpl();
// See WebBlobRegistry.h for documentation on these functions.
virtual void registerBlobURL(const WebKit::WebURL& url,
WebKit::WebBlobData& data);
virtual void registerBlobURL(const WebKit::WebURL& url,
const WebKit::WebURL& src_url);
virtual void unregisterBlobURL(const WebKit::WebURL& url);
// Run on I/O thread.
void DoRegisterBlobUrl(const GURL& url, webkit_blob::BlobData* blob_data);
void DoRegisterBlobUrlFrom(const GURL& url, const GURL& src_url);
void DoUnregisterBlobUrl(const GURL& url);
protected:
friend class base::RefCountedThreadSafe<BrowserWebBlobRegistryImpl>;
private:
DISALLOW_COPY_AND_ASSIGN(BrowserWebBlobRegistryImpl);
};
#endif // BROWSER_WEBBLOBREGISTRY_IMPL_H_

View File

@ -115,7 +115,7 @@ std::string WebStringToStdString(const WebKit::WebString& str) {
} }
std::string GetProductVersion() { std::string GetProductVersion() {
return std::string("CEF/0.0.0.0"); return std::string("Chrome/7.0.517.0");
} }
bool IsSingleProcess() { bool IsSingleProcess() {
@ -134,4 +134,8 @@ bool GetFontTable(int fd, uint32_t table, uint8_t* output,
} }
#endif #endif
void EnableSpdy(bool enable) {
// Used in benchmarking, Ignored for CEF.
}
} // namespace webkit_glue } // namespace webkit_glue

View File

@ -15,7 +15,6 @@
#include "webkit/appcache/web_application_cache_host_impl.h" #include "webkit/appcache/web_application_cache_host_impl.h"
#include "webkit/database/vfs_backend.h" #include "webkit/database/vfs_backend.h"
#include "webkit/extensions/v8/gears_extension.h" #include "webkit/extensions/v8/gears_extension.h"
#include "webkit/extensions/v8/interval_extension.h"
#include "third_party/WebKit/WebKit/chromium/public/WebData.h" #include "third_party/WebKit/WebKit/chromium/public/WebData.h"
#include "third_party/WebKit/WebKit/chromium/public/WebDatabase.h" #include "third_party/WebKit/WebKit/chromium/public/WebDatabase.h"
#include "third_party/WebKit/WebKit/chromium/public/WebKit.h" #include "third_party/WebKit/WebKit/chromium/public/WebKit.h"
@ -25,16 +24,20 @@
#include "third_party/WebKit/WebKit/chromium/public/WebStorageArea.h" #include "third_party/WebKit/WebKit/chromium/public/WebStorageArea.h"
#include "third_party/WebKit/WebKit/chromium/public/WebStorageEventDispatcher.h" #include "third_party/WebKit/WebKit/chromium/public/WebStorageEventDispatcher.h"
#include "third_party/WebKit/WebKit/chromium/public/WebIDBFactory.h" #include "third_party/WebKit/WebKit/chromium/public/WebIDBFactory.h"
#include "third_party/WebKit/WebKit/chromium/public/WebIDBKey.h"
#include "third_party/WebKit/WebKit/chromium/public/WebIDBKeyPath.h"
#include "third_party/WebKit/WebKit/chromium/public/WebSerializedScriptValue.h"
#include "third_party/WebKit/WebKit/chromium/public/WebStorageNamespace.h" #include "third_party/WebKit/WebKit/chromium/public/WebStorageNamespace.h"
#include "third_party/WebKit/WebKit/chromium/public/WebString.h" #include "third_party/WebKit/WebKit/chromium/public/WebString.h"
#include "webkit/glue/simple_webmimeregistry_impl.h" #include "webkit/glue/simple_webmimeregistry_impl.h"
#include "webkit/glue/webclipboard_impl.h" #include "webkit/glue/webclipboard_impl.h"
#include "webkit/glue/webfilesystem_impl.h" #include "webkit/glue/webfileutilities_impl.h"
#include "webkit/glue/webkit_glue.h" #include "webkit/glue/webkit_glue.h"
#include "webkit/glue/webkitclient_impl.h" #include "webkit/glue/webkitclient_impl.h"
#include "browser_appcache_system.h" #include "browser_appcache_system.h"
#include "browser_database_system.h" #include "browser_database_system.h"
#include "browser_resource_loader_bridge.h" #include "browser_resource_loader_bridge.h"
#include "browser_webblobregistry_impl.h"
#include "browser_webcookiejar_impl.h" #include "browser_webcookiejar_impl.h"
@ -47,8 +50,6 @@ class BrowserWebKitInit : public webkit_glue::WebKitClientImpl {
WebKit::setLayoutTestMode(false); WebKit::setLayoutTestMode(false);
WebKit::WebScriptController::registerExtension( WebKit::WebScriptController::registerExtension(
extensions_v8::GearsExtension::Get()); extensions_v8::GearsExtension::Get());
WebKit::WebScriptController::registerExtension(
extensions_v8::IntervalExtension::Get());
WebKit::WebRuntimeFeatures::enableSockets(true); WebKit::WebRuntimeFeatures::enableSockets(true);
WebKit::WebRuntimeFeatures::enableApplicationCache(true); WebKit::WebRuntimeFeatures::enableApplicationCache(true);
WebKit::WebRuntimeFeatures::enableDatabase(true); WebKit::WebRuntimeFeatures::enableDatabase(true);
@ -59,6 +60,7 @@ class BrowserWebKitInit : public webkit_glue::WebKitClientImpl {
WebKit::WebRuntimeFeatures::enableIndexedDatabase(true); WebKit::WebRuntimeFeatures::enableIndexedDatabase(true);
WebKit::WebRuntimeFeatures::enableGeolocation(false); WebKit::WebRuntimeFeatures::enableGeolocation(false);
WebKit::WebRuntimeFeatures::enableSpeechInput(true); WebKit::WebRuntimeFeatures::enableSpeechInput(true);
WebKit::WebRuntimeFeatures::enableFileSystem(true);
// TODO(hwennborg): Enable this once the implementation supports it. // TODO(hwennborg): Enable this once the implementation supports it.
WebKit::WebRuntimeFeatures::enableDeviceMotion(false); WebKit::WebRuntimeFeatures::enableDeviceMotion(false);
@ -83,7 +85,9 @@ class BrowserWebKitInit : public webkit_glue::WebKitClientImpl {
WebKit::WebDatabase::setObserver(&database_system_); WebKit::WebDatabase::setObserver(&database_system_);
file_system_.set_sandbox_enabled(false); blob_registry_ = new BrowserWebBlobRegistryImpl();
file_utilities_.set_sandbox_enabled(false);
} }
~BrowserWebKitInit() { ~BrowserWebKitInit() {
@ -98,14 +102,18 @@ class BrowserWebKitInit : public webkit_glue::WebKitClientImpl {
return &clipboard_; return &clipboard_;
} }
virtual WebKit::WebFileSystem* fileSystem() { virtual WebKit::WebFileUtilities* fileUtilities() {
return &file_system_; return &file_utilities_;
} }
virtual WebKit::WebSandboxSupport* sandboxSupport() { virtual WebKit::WebSandboxSupport* sandboxSupport() {
return NULL; return NULL;
} }
virtual WebKit::WebBlobRegistry* blobRegistry() {
return blob_registry_.get();
}
virtual WebKit::WebCookieJar* cookieJar() { virtual WebKit::WebCookieJar* cookieJar() {
return &cookie_jar_; return &cookie_jar_;
} }
@ -187,14 +195,27 @@ class BrowserWebKitInit : public webkit_glue::WebKitClientImpl {
return WebKit::WebIDBFactory::create(); return WebKit::WebIDBFactory::create();
} }
virtual void createIDBKeysFromSerializedValuesAndKeyPath(
const WebKit::WebVector<WebKit::WebSerializedScriptValue>& values,
const WebKit::WebString& keyPath,
WebKit::WebVector<WebKit::WebIDBKey>& keys_out) {
WebKit::WebVector<WebKit::WebIDBKey> keys(values.size());
for (size_t i = 0; i < values.size(); ++i) {
keys[i] = WebKit::WebIDBKey::createFromValueAndKeyPath(
values[i], WebKit::WebIDBKeyPath::create(keyPath));
}
keys_out.swap(keys);
}
private: private:
webkit_glue::SimpleWebMimeRegistryImpl mime_registry_; webkit_glue::SimpleWebMimeRegistryImpl mime_registry_;
webkit_glue::WebClipboardImpl clipboard_; webkit_glue::WebClipboardImpl clipboard_;
webkit_glue::WebFileSystemImpl file_system_; webkit_glue::WebFileUtilitiesImpl file_utilities_;
ScopedTempDir appcache_dir_; ScopedTempDir appcache_dir_;
BrowserAppCacheSystem appcache_system_; BrowserAppCacheSystem appcache_system_;
BrowserDatabaseSystem database_system_; BrowserDatabaseSystem database_system_;
BrowserWebCookieJarImpl cookie_jar_; BrowserWebCookieJarImpl cookie_jar_;
scoped_refptr<BrowserWebBlobRegistryImpl> blob_registry_;
}; };
#endif // _BROWSER_WEBKIT_INIT_H #endif // _BROWSER_WEBKIT_INIT_H

View File

@ -31,6 +31,8 @@
#include "third_party/WebKit/WebKit/chromium/public/WebData.h" #include "third_party/WebKit/WebKit/chromium/public/WebData.h"
#include "third_party/WebKit/WebKit/chromium/public/WebDataSource.h" #include "third_party/WebKit/WebKit/chromium/public/WebDataSource.h"
#include "third_party/WebKit/WebKit/chromium/public/WebDragData.h" #include "third_party/WebKit/WebKit/chromium/public/WebDragData.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFileError.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFileSystemCallbacks.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/WebKit/chromium/public/WebHistoryItem.h" #include "third_party/WebKit/WebKit/chromium/public/WebHistoryItem.h"
#include "third_party/WebKit/WebKit/chromium/public/WebKit.h" #include "third_party/WebKit/WebKit/chromium/public/WebKit.h"
@ -83,6 +85,8 @@ using WebKit::WebDragData;
using WebKit::WebDragOperationsMask; using WebKit::WebDragOperationsMask;
using WebKit::WebEditingAction; using WebKit::WebEditingAction;
using WebKit::WebFileChooserParams; using WebKit::WebFileChooserParams;
using WebKit::WebFileSystem;
using WebKit::WebFileSystemCallbacks;
using WebKit::WebFormElement; using WebKit::WebFormElement;
using WebKit::WebFrame; using WebKit::WebFrame;
using WebKit::WebHistoryItem; using WebKit::WebHistoryItem;
@ -778,6 +782,18 @@ void BrowserWebViewDelegate::reportFindInPageSelection(
false); false);
} }
void BrowserWebViewDelegate::openFileSystem(
WebFrame* frame, WebFileSystem::Type type, long long size,
WebFileSystemCallbacks* callbacks) {
if (browser_->file_system_root().empty()) {
// The FileSystem temp directory was not initialized successfully.
callbacks->didFail(WebKit::WebFileErrorSecurity);
} else {
callbacks->didOpenFileSystem(
"CefFileSystem",
webkit_glue::FilePathToWebString(browser_->file_system_root()));
}
}
// Public methods ------------------------------------------------------------ // Public methods ------------------------------------------------------------

View File

@ -23,6 +23,7 @@
#include "base/weak_ptr.h" #include "base/weak_ptr.h"
#include "third_party/WebKit/WebKit/chromium/public/WebContextMenuData.h" #include "third_party/WebKit/WebKit/chromium/public/WebContextMenuData.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFileChooserParams.h" #include "third_party/WebKit/WebKit/chromium/public/WebFileChooserParams.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFileSystem.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFrameClient.h" #include "third_party/WebKit/WebKit/chromium/public/WebFrameClient.h"
#include "third_party/WebKit/WebKit/chromium/public/WebRect.h" #include "third_party/WebKit/WebKit/chromium/public/WebRect.h"
#include "third_party/WebKit/WebKit/chromium/public/WebViewClient.h" #include "third_party/WebKit/WebKit/chromium/public/WebViewClient.h"
@ -167,6 +168,11 @@ class BrowserWebViewDelegate : public WebKit::WebViewClient,
int request_id, int count, bool final_update); int request_id, int count, bool final_update);
virtual void reportFindInPageSelection( virtual void reportFindInPageSelection(
int request_id, int active_match_ordinal, const WebKit::WebRect& sel); int request_id, int active_match_ordinal, const WebKit::WebRect& sel);
virtual void openFileSystem(
WebKit::WebFrame* frame,
WebKit::WebFileSystem::Type type,
long long size,
WebKit::WebFileSystemCallbacks* callbacks);
// webkit_glue::WebPluginPageDelegate // webkit_glue::WebPluginPageDelegate
virtual webkit_glue::WebPluginDelegate* CreatePluginDelegate( virtual webkit_glue::WebPluginDelegate* CreatePluginDelegate(

View File

@ -8,6 +8,7 @@
#include "browser_appcache_system.h" #include "browser_appcache_system.h"
#include "browser_resource_loader_bridge.h" #include "browser_resource_loader_bridge.h"
#include "browser_socket_stream_bridge.h" #include "browser_socket_stream_bridge.h"
#include "browser_webblobregistry_impl.h"
#include "build/build_config.h" #include "build/build_config.h"
@ -39,6 +40,8 @@ void CefProcessIOThread::Init() {
BrowserAppCacheSystem::InitializeOnIOThread(request_context_); BrowserAppCacheSystem::InitializeOnIOThread(request_context_);
BrowserSocketStreamBridge::InitializeOnIOThread(request_context_); BrowserSocketStreamBridge::InitializeOnIOThread(request_context_);
BrowserWebBlobRegistryImpl::InitializeOnIOThread(
request_context_->blob_storage_controller());
} }
void CefProcessIOThread::CleanUp() { void CefProcessIOThread::CleanUp() {
@ -48,6 +51,7 @@ void CefProcessIOThread::CleanUp() {
MessageLoop::current()->RunAllPending(); MessageLoop::current()->RunAllPending();
BrowserSocketStreamBridge::Cleanup(); BrowserSocketStreamBridge::Cleanup();
BrowserWebBlobRegistryImpl::Cleanup();
_Context->set_request_context(NULL); _Context->set_request_context(NULL);
request_context_ = NULL; request_context_ = NULL;

View File

@ -17,11 +17,15 @@
#include "base/stats_table.h" #include "base/stats_table.h"
#include "base/string_number_conversions.h" #include "base/string_number_conversions.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "app/gfx/gl/gl_implementation.h"
#include "net/base/net_module.h" #include "net/base/net_module.h"
#if defined(OS_WIN) #if defined(OS_WIN)
#include "net/socket/ssl_client_socket_nss_factory.h" #include "net/socket/ssl_client_socket_nss_factory.h"
#endif #endif
#include "webkit/blob/blob_storage_controller.h"
#include "webkit/blob/blob_url_request_job.h"
#include "webkit/extensions/v8/gc_extension.h" #include "webkit/extensions/v8/gc_extension.h"
#include "net/url_request/url_request.h"
#if defined(OS_WIN) #if defined(OS_WIN)
#include <commctrl.h> #include <commctrl.h>
@ -32,6 +36,22 @@ static const char* kStatsFilePrefix = "libcef_";
static int kStatsFileThreads = 20; static int kStatsFileThreads = 20;
static int kStatsFileCounters = 200; static int kStatsFileCounters = 200;
namespace {
URLRequestJob* BlobURLRequestJobFactory(URLRequest* request,
const std::string& scheme) {
webkit_blob::BlobStorageController* blob_storage_controller =
static_cast<BrowserRequestContext*>(request->context())->
blob_storage_controller();
return new webkit_blob::BlobURLRequestJob(
request,
blob_storage_controller->GetBlobDataFromUrl(request->url()),
NULL);
}
} // namespace
CefProcessUIThread::CefProcessUIThread() CefProcessUIThread::CefProcessUIThread()
: CefThread(CefThread::UI), statstable_(NULL), webkit_init_(NULL) {} : CefThread(CefThread::UI), statstable_(NULL), webkit_init_(NULL) {}
@ -126,6 +146,10 @@ void CefProcessUIThread::Init() {
net::ClientSocketFactory::SetSSLClientSocketFactory( net::ClientSocketFactory::SetSSLClientSocketFactory(
net::SSLClientSocketNSSFactory); net::SSLClientSocketNSSFactory);
#endif #endif
gfx::InitializeGLBindings(gfx::kGLImplementationOSMesaGL);
URLRequest::RegisterProtocolFactory("blob", &BlobURLRequestJobFactory);
} }
void CefProcessUIThread::CleanUp() { void CefProcessUIThread::CleanUp() {

View File

@ -299,7 +299,7 @@ void CefPostDataImpl::Get(net::UploadData& data)
static_cast<CefPostDataElementImpl*>(it->get())->Get(element); static_cast<CefPostDataElementImpl*>(it->get())->Get(element);
data_elements.push_back(element); data_elements.push_back(element);
} }
data.set_elements(data_elements); data.SetElements(data_elements);
Unlock(); Unlock();
} }

View File

@ -15,6 +15,8 @@
#include "third_party/WebKit/WebKit/chromium/public/win/WebInputEventFactory.h" #include "third_party/WebKit/WebKit/chromium/public/win/WebInputEventFactory.h"
#include "third_party/WebKit/WebKit/chromium/public/win/WebScreenInfoFactory.h" #include "third_party/WebKit/WebKit/chromium/public/win/WebScreenInfoFactory.h"
#include <commctrl.h>
using WebKit::WebInputEvent; using WebKit::WebInputEvent;
using WebKit::WebInputEventFactory; using WebKit::WebInputEventFactory;
using WebKit::WebKeyboardEvent; using WebKit::WebKeyboardEvent;