diff --git a/CHROMIUM_BUILD_COMPATIBILITY.txt b/CHROMIUM_BUILD_COMPATIBILITY.txt index ce9b4069b..a407c74c5 100644 --- a/CHROMIUM_BUILD_COMPATIBILITY.txt +++ b/CHROMIUM_BUILD_COMPATIBILITY.txt @@ -49,3 +49,4 @@ Date | CEF Revision | Chromium Revision 2009-11-04 | /trunk@64 | /trunk@31062 2010-01-11 | /trunk@65 | /trunk@35902 2010-02-11 | /trunk@71 | /trunk@38776 +2010-03-29 | /trunk@72 | /trunk@42941 diff --git a/cef.gyp b/cef.gyp index 268868352..e7e20ddc9 100644 --- a/cef.gyp +++ b/cef.gyp @@ -152,7 +152,6 @@ '../webkit/webkit.gyp:glue', '../webkit/webkit.gyp:webkit_resources', '../webkit/webkit.gyp:webkit_strings', - '../webkit/default_plugin/default_plugin.gyp:default_plugin', 'libcef_static', ], 'defines': [ @@ -314,7 +313,6 @@ '../webkit/webkit.gyp:glue', '../webkit/webkit.gyp:webkit_resources', '../webkit/webkit.gyp:webkit_strings', - '../webkit/default_plugin/default_plugin.gyp:default_plugin', ], 'sources': [ 'include/cef.h', @@ -346,6 +344,8 @@ 'libcef/browser_resource_loader_bridge.h', 'libcef/browser_socket_stream_bridge.cc', 'libcef/browser_socket_stream_bridge.h', + 'libcef/browser_webcookiejar_impl.cc', + 'libcef/browser_webcookiejar_impl.h', 'libcef/browser_webkit_glue.cc', 'libcef/browser_webkit_glue.h', 'libcef/browser_webkit_glue_win.cc', diff --git a/cef_create_projects.bat b/cef_create_projects.bat index 62b6b227b..fc18cf092 100644 --- a/cef_create_projects.bat +++ b/cef_create_projects.bat @@ -4,7 +4,7 @@ CALL tools\patch_build.bat ECHO Generating project files... CALL :SET_ENV %CD% :GEN_PROJ -CALL ..\tools\gyp\gyp.bat cef.gyp -I ..\build\common.gypi -I ..\build\features_override.gypi -I cef.gypi +CALL ..\tools\gyp\gyp.bat cef.gyp -I ..\build\common.gypi -I ..\build\features_override.gypi -I cef.gypi --no-circular-check GOTO :END :SET_ENV SET CEF_DIRECTORY=%~n1 diff --git a/include/cef_nplugin.h b/include/cef_nplugin.h index 014cb814b..dfa80efb9 100644 --- a/include/cef_nplugin.h +++ b/include/cef_nplugin.h @@ -33,8 +33,8 @@ #include #include -#include "webkit/glue/plugins/nphostapi.h" #include "third_party/npapi/bindings/npapi.h" +#include "third_party/npapi/bindings/nphostapi.h" // Netscape plugins are normally built at separate DLLs that are loaded by the // browser when needed. This interface supports the creation of plugins that diff --git a/include/cef_nplugin_capi.h b/include/cef_nplugin_capi.h index c24d2e48b..4a01e36ec 100644 --- a/include/cef_nplugin_capi.h +++ b/include/cef_nplugin_capi.h @@ -36,8 +36,8 @@ extern "C" { #endif #include "cef_export.h" -#include "webkit/glue/plugins/nphostapi.h" #include "third_party/npapi/bindings/npapi.h" +#include "third_party/npapi/bindings/nphostapi.h" // Netscape plugins are normally built at separate DLLs that are loaded by the // browser when needed. This interface supports the creation of plugins that diff --git a/libcef/browser_appcache_system.cc b/libcef/browser_appcache_system.cc index 6d7fba375..8d942bfe2 100644 --- a/libcef/browser_appcache_system.cc +++ b/libcef/browser_appcache_system.cc @@ -5,6 +5,7 @@ #include "browser_appcache_system.h" #include "browser_resource_loader_bridge.h" +#include "base/callback.h" #include "base/lock.h" #include "base/task.h" #include "base/waitable_event.h" @@ -302,7 +303,7 @@ BrowserAppCacheSystem::~BrowserAppCacheSystem() { void BrowserAppCacheSystem::InitOnUIThread( const FilePath& cache_directory) { DCHECK(!ui_message_loop_); - AppCacheThread::InitIDs(DB_THREAD_ID, IO_THREAD_ID); + AppCacheThread::Init(DB_THREAD_ID, IO_THREAD_ID, NULL); ui_message_loop_ = MessageLoop::current(); cache_directory_ = cache_directory; } diff --git a/libcef/browser_database_system.cc b/libcef/browser_database_system.cc index 66c8f0679..c8c6491ed 100644 --- a/libcef/browser_database_system.cc +++ b/libcef/browser_database_system.cc @@ -134,6 +134,13 @@ void BrowserDatabaseSystem::OnDatabaseSizeChanged( } } +void BrowserDatabaseSystem::OnDatabaseScheduledForDeletion( + const string16& origin_identifier, + const string16& database_name) { + WebKit::WebDatabase::closeDatabaseImmediately( + origin_identifier, database_name); +} + void BrowserDatabaseSystem::databaseOpened(const WebKit::WebDatabase& database) { DatabaseOpened(database.securityOrigin().databaseIdentifier(), database.name(), database.displayName(), diff --git a/libcef/browser_database_system.h b/libcef/browser_database_system.h index 2f50a2011..56ed1a435 100644 --- a/libcef/browser_database_system.h +++ b/libcef/browser_database_system.h @@ -46,6 +46,8 @@ class BrowserDatabaseSystem : public webkit_database::DatabaseTracker::Observer, const string16& database_name, int64 database_size, int64 space_available); + virtual void OnDatabaseScheduledForDeletion(const string16& origin_identifier, + const string16& database_name); // WebDatabaseObserver implementation virtual void databaseOpened(const WebKit::WebDatabase& database); diff --git a/libcef/browser_impl.cc b/libcef/browser_impl.cc index 500630899..4355d2a6d 100644 --- a/libcef/browser_impl.cc +++ b/libcef/browser_impl.cc @@ -8,7 +8,7 @@ #include "browser_webkit_glue.h" #include "request_impl.h" -#include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" #include "third_party/WebKit/WebKit/chromium/public/WebHTTPBody.h" #include "third_party/WebKit/WebKit/chromium/public/WebScriptSource.h" diff --git a/libcef/browser_impl_win.cc b/libcef/browser_impl_win.cc index 4f4b3da67..569c97a6f 100644 --- a/libcef/browser_impl_win.cc +++ b/libcef/browser_impl_win.cc @@ -9,7 +9,7 @@ #include "stream_impl.h" #include "printing/units.h" -#include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "base/win_util.h" #include "skia/ext/vector_canvas.h" #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" diff --git a/libcef/browser_request_context.cc b/libcef/browser_request_context.cc index 41f961e16..da44733e2 100644 --- a/libcef/browser_request_context.cc +++ b/libcef/browser_request_context.cc @@ -13,6 +13,7 @@ #include "net/base/ssl_config_service.h" #include "net/base/static_cookie_policy.h" #include "net/ftp/ftp_network_layer.h" +#include "net/http/http_auth_handler_factory.h" #include "net/proxy/proxy_config_service.h" #include "net/proxy/proxy_config_service_fixed.h" #include "net/proxy/proxy_service.h" @@ -33,7 +34,7 @@ void BrowserRequestContext::Init( const FilePath& cache_path, net::HttpCache::Mode cache_mode, bool no_proxy) { - cookie_store_ = new net::CookieMonster(NULL); + cookie_store_ = new net::CookieMonster(NULL, NULL); cookie_policy_ = new net::StaticCookiePolicy(); // hard-code A-L and A-C for test shells @@ -44,17 +45,21 @@ void BrowserRequestContext::Init( scoped_ptr proxy_config_service( net::ProxyService::CreateSystemProxyConfigService(NULL, NULL)); host_resolver_ = net::CreateSystemHostResolver(NULL); - proxy_service_ = net::ProxyService::Create(proxy_config_service.release(), - false, NULL, NULL, NULL); + proxy_service_ = net::ProxyService::Create(proxy_config_service.release(), + false, NULL, NULL, NULL, NULL); ssl_config_service_ = net::SSLConfigService::CreateSystemSSLConfigService(); + http_auth_handler_factory_ = net::HttpAuthHandlerFactory::CreateDefault(); + net::HttpCache *cache; if (cache_path.empty()) { cache = new net::HttpCache(NULL, host_resolver_, proxy_service_, - ssl_config_service_, 0); + ssl_config_service_, http_auth_handler_factory_, + 0); } else { cache = new net::HttpCache(NULL, host_resolver_, proxy_service_, - ssl_config_service_, cache_path, 0); + ssl_config_service_, http_auth_handler_factory_, + cache_path, 0); } cache->set_mode(cache_mode); http_transaction_factory_ = cache; @@ -65,6 +70,7 @@ void BrowserRequestContext::Init( BrowserRequestContext::~BrowserRequestContext() { delete ftp_transaction_factory_; delete http_transaction_factory_; + delete http_auth_handler_factory_; delete static_cast(cookie_policy_); } diff --git a/libcef/browser_resource_loader_bridge.cc b/libcef/browser_resource_loader_bridge.cc index c1798a056..03879dec3 100644 --- a/libcef/browser_resource_loader_bridge.cc +++ b/libcef/browser_resource_loader_bridge.cc @@ -40,10 +40,10 @@ #include "base/message_loop.h" #include "base/ref_counted.h" -#include "base/string_util.h" #include "base/time.h" #include "base/timer.h" #include "base/thread.h" +#include "base/utf_string_conversions.h" #include "base/waitable_event.h" #include "net/base/cookie_policy.h" #include "net/base/io_buffer.h" @@ -620,12 +620,16 @@ class ResourceLoaderBridgeImpl : public ResourceLoaderBridge { params_->upload->AppendBytes(data, data_len); } - virtual void AppendFileRangeToUpload(const FilePath& file_path, - uint64 offset, uint64 length) { + virtual void AppendFileRangeToUpload( + const FilePath& file_path, + uint64 offset, + uint64 length, + const base::Time& expected_modification_time) { DCHECK(params_.get()); if (!params_->upload) params_->upload = new net::UploadData(); - params_->upload->AppendFileRange(file_path, offset, length); + params_->upload->AppendFileRange(file_path, offset, length, + expected_modification_time); } virtual void SetUploadIdentifier(int64 identifier) { diff --git a/libcef/browser_socket_stream_bridge.cc b/libcef/browser_socket_stream_bridge.cc index 61f5917ee..89662e74a 100644 --- a/libcef/browser_socket_stream_bridge.cc +++ b/libcef/browser_socket_stream_bridge.cc @@ -9,7 +9,8 @@ #include "base/message_loop.h" #include "base/ref_counted.h" #include "googleurl/src/gurl.h" -#include "net/socket_stream/socket_stream.h" +#include "net/socket_stream/socket_stream_job.h" +#include "net/websockets/websocket_job.h" #include "net/url_request/url_request_context.h" #include "webkit/glue/websocketstreamhandle_bridge.h" #include "webkit/glue/websocketstreamhandle_delegate.h" @@ -66,7 +67,7 @@ class WebSocketStreamHandleBridgeImpl WebKit::WebSocketStreamHandle* handle_; webkit_glue::WebSocketStreamHandleDelegate* delegate_; - scoped_refptr socket_; + scoped_refptr socket_; // Number of pending tasks to handle net::SocketStream::Delegate methods. int num_pending_tasks_; @@ -81,6 +82,7 @@ WebSocketStreamHandleBridgeImpl::WebSocketStreamHandleBridgeImpl( handle_(handle), delegate_(delegate), num_pending_tasks_(0) { + net::WebSocketJob::EnsureInit(); } WebSocketStreamHandleBridgeImpl::~WebSocketStreamHandleBridgeImpl() { @@ -155,7 +157,7 @@ void WebSocketStreamHandleBridgeImpl::OnClose(net::SocketStream* socket) { void WebSocketStreamHandleBridgeImpl::DoConnect(const GURL& url) { DCHECK(MessageLoop::current() == g_io_thread); - socket_ = new net::SocketStream(url, this); + socket_ = net::SocketStreamJob::CreateSocketStreamJob(url, this); socket_->set_context(g_request_context); socket_->Connect(); } diff --git a/libcef/browser_webcookiejar_impl.cc b/libcef/browser_webcookiejar_impl.cc new file mode 100644 index 000000000..6576dab26 --- /dev/null +++ b/libcef/browser_webcookiejar_impl.cc @@ -0,0 +1,25 @@ +// 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_webcookiejar_impl.h" +#include "browser_resource_loader_bridge.h" + +#include "third_party/WebKit/WebKit/chromium/public/WebURL.h" + +using WebKit::WebString; +using WebKit::WebURL; + +void BrowserWebCookieJarImpl::setCookie(const WebURL& url, + const WebURL& first_party_for_cookies, + const WebString& value) { + BrowserResourceLoaderBridge::SetCookie( + url, first_party_for_cookies, value.utf8()); +} + +WebString BrowserWebCookieJarImpl::cookies( + const WebURL& url, + const WebURL& first_party_for_cookies) { + return WebString::fromUTF8( + BrowserResourceLoaderBridge::GetCookies(url, first_party_for_cookies)); +} diff --git a/libcef/browser_webcookiejar_impl.h b/libcef/browser_webcookiejar_impl.h new file mode 100644 index 000000000..a8b036356 --- /dev/null +++ b/libcef/browser_webcookiejar_impl.h @@ -0,0 +1,22 @@ +// 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_SIMPLE_WEBCOOKIEJAR_IMPL_H +#define _BROWSER_SIMPLE_WEBCOOKIEJAR_IMPL_H + +// TODO(darin): WebCookieJar.h is missing a WebString.h include! +#include "third_party/WebKit/WebKit/chromium/public/WebString.h" +#include "third_party/WebKit/WebKit/chromium/public/WebCookieJar.h" + +class BrowserWebCookieJarImpl : public WebKit::WebCookieJar { + public: + // WebKit::WebCookieJar methods: + virtual void setCookie( + const WebKit::WebURL& url, const WebKit::WebURL& first_party_for_cookies, + const WebKit::WebString& cookie); + virtual WebKit::WebString cookies( + const WebKit::WebURL& url, const WebKit::WebURL& first_party_for_cookies); +}; + +#endif // _BROWSER_SIMPLE_WEBCOOKIEJAR_IMPL_H diff --git a/libcef/browser_webkit_glue.cc b/libcef/browser_webkit_glue.cc index 02e0c01e8..a387150da 100644 --- a/libcef/browser_webkit_glue.cc +++ b/libcef/browser_webkit_glue.cc @@ -20,7 +20,7 @@ MSVC_POP_WARNING(); #include "base/resource_util.h" #include "base/scoped_ptr.h" #include "base/string16.h" -#include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "base/win_util.h" #include "net/base/mime_util.h" #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" diff --git a/libcef/browser_webkit_glue_win.cc b/libcef/browser_webkit_glue_win.cc index 336e5ce06..d906c8438 100644 --- a/libcef/browser_webkit_glue_win.cc +++ b/libcef/browser_webkit_glue_win.cc @@ -17,8 +17,8 @@ MSVC_POP_WARNING(); #include "browser_webkit_glue.h" #undef LOG -#include "app/gfx/gdi_util.h" #include "base/logging.h" +#include "gfx/gdi_util.h" #include "skia/ext/platform_canvas.h" #include "third_party/WebKit/WebKit/chromium/public/WebRect.h" #include "third_party/WebKit/WebKit/chromium/public/WebSize.h" diff --git a/libcef/browser_webkit_init.h b/libcef/browser_webkit_init.h index 5fbeb49b8..388a96c3e 100644 --- a/libcef/browser_webkit_init.h +++ b/libcef/browser_webkit_init.h @@ -10,7 +10,7 @@ #include "base/path_service.h" #include "base/scoped_temp_dir.h" #include "base/stats_counters.h" -#include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "media/base/media.h" #include "webkit/appcache/web_application_cache_host_impl.h" #include "webkit/database/vfs_backend.h" @@ -35,6 +35,7 @@ #include "browser_appcache_system.h" #include "browser_database_system.h" #include "browser_resource_loader_bridge.h" +#include "browser_webcookiejar_impl.h" class BrowserWebKitInit : public webkit_glue::WebKitClientImpl { @@ -51,6 +52,7 @@ class BrowserWebKitInit : public webkit_glue::WebKitClientImpl { WebKit::WebRuntimeFeatures::enableSockets(true); WebKit::WebRuntimeFeatures::enableApplicationCache(true); WebKit::WebRuntimeFeatures::enableDatabase(true); + WebKit::WebRuntimeFeatures::enableWebGL(true); // Load libraries for media and enable the media player. FilePath module_path; @@ -88,6 +90,10 @@ class BrowserWebKitInit : public webkit_glue::WebKitClientImpl { return NULL; } + virtual WebKit::WebCookieJar* cookieJar() { + return &cookie_jar_; + } + virtual bool sandboxEnabled() { return true; } @@ -135,20 +141,6 @@ class BrowserWebKitInit : public webkit_glue::WebKitClientImpl { return NULL; } - virtual void setCookies(const WebKit::WebURL& url, - const WebKit::WebURL& first_party_for_cookies, - const WebKit::WebString& value) { - BrowserResourceLoaderBridge::SetCookie( - url, first_party_for_cookies, value.utf8()); - } - - virtual WebKit::WebString cookies( - const WebKit::WebURL& url, - const WebKit::WebURL& first_party_for_cookies) { - return WebKit::WebString::fromUTF8(BrowserResourceLoaderBridge::GetCookies( - url, first_party_for_cookies)); - } - virtual void prefetchHostName(const WebKit::WebString&) { } @@ -204,6 +196,7 @@ class BrowserWebKitInit : public webkit_glue::WebKitClientImpl { ScopedTempDir appcache_dir_; BrowserAppCacheSystem appcache_system_; BrowserDatabaseSystem database_system_; + BrowserWebCookieJarImpl cookie_jar_; }; #endif // _BROWSER_WEBKIT_INIT_H diff --git a/libcef/browser_webview_delegate.cc b/libcef/browser_webview_delegate.cc index 3cdd24fca..388b7a062 100644 --- a/libcef/browser_webview_delegate.cc +++ b/libcef/browser_webview_delegate.cc @@ -14,14 +14,14 @@ #include "request_impl.h" #include "v8_impl.h" -#include "app/gfx/gdi_util.h" -#include "app/gfx/native_widget_types.h" #include "base/file_util.h" #include "base/gfx/point.h" #include "base/message_loop.h" #include "base/process_util.h" -#include "base/string_util.h" #include "base/trace_event.h" +#include "base/utf_string_conversions.h" +#include "gfx/gdi_util.h" +#include "gfx/native_widget_types.h" #include "net/base/net_errors.h" #include "third_party/WebKit/WebKit/chromium/public/WebConsoleMessage.h" #include "third_party/WebKit/WebKit/chromium/public/WebContextMenuData.h" @@ -32,6 +32,7 @@ #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/WebKit.h" +#include "third_party/WebKit/WebKit/chromium/public/WebKitClient.h" #include "third_party/WebKit/WebKit/chromium/public/WebNode.h" #include "third_party/WebKit/WebKit/chromium/public/WebPoint.h" #include "third_party/WebKit/WebKit/chromium/public/WebPopupMenu.h" @@ -50,6 +51,7 @@ #include "webkit/glue/media/buffered_data_source.h" #include "webkit/glue/media/media_resource_loader_bridge_factory.h" #include "webkit/glue/media/simple_data_source.h" +#include "webkit/glue/media/video_renderer_impl.h" #include "webkit/glue/webdropdata.h" #include "webkit/glue/webplugin_impl.h" #include "webkit/glue/webpreferences.h" @@ -69,6 +71,7 @@ using appcache::WebApplicationCacheHostImpl; using WebKit::WebConsoleMessage; using WebKit::WebContextMenuData; +using WebKit::WebCookieJar; using WebKit::WebData; using WebKit::WebDataSource; using WebKit::WebDragData; @@ -413,6 +416,12 @@ int BrowserWebViewDelegate::historyForwardListCount() { - current_index - 1; } +// WebPluginPageDelegate ----------------------------------------------------- + +WebCookieJar* BrowserWebViewDelegate::GetCookieJar() { + return WebKit::webKitClient()->cookieJar(); +} + // WebWidgetClient ----------------------------------------------------------- void BrowserWebViewDelegate::didInvalidateRect(const WebRect& rect) { @@ -458,16 +467,16 @@ WebMediaPlayer* BrowserWebViewDelegate::createMediaPlayer( scoped_refptr factory = new media::FilterFactoryCollection(); - WebApplicationCacheHostImpl* appcache_host = - WebApplicationCacheHostImpl::FromFrame(frame); + appcache::WebApplicationCacheHostImpl* appcache_host = + appcache::WebApplicationCacheHostImpl::FromFrame(frame); // TODO(hclam): this is the same piece of code as in RenderView, maybe they // should be grouped together. webkit_glue::MediaResourceLoaderBridgeFactory* bridge_factory = new webkit_glue::MediaResourceLoaderBridgeFactory( - GURL::EmptyGURL(), // referrer - "null", // frame origin - "null", // main_frame_origin + GURL(), // referrer + "null", // frame origin + "null", // main_frame_origin base::GetCurrentProcId(), appcache_host ? appcache_host->host_id() : appcache::kNoHostId, 0); @@ -481,7 +490,8 @@ WebMediaPlayer* BrowserWebViewDelegate::createMediaPlayer( bridge_factory); factory->AddFactory(buffered_data_source_factory); factory->AddFactory(simple_data_source_factory); - return new webkit_glue::WebMediaPlayerImpl(client, factory); + return new webkit_glue::WebMediaPlayerImpl( + client, factory, new webkit_glue::VideoRendererImpl::FactoryFactory()); } void BrowserWebViewDelegate::loadURLExternally( diff --git a/libcef/browser_webview_delegate.h b/libcef/browser_webview_delegate.h index b2238dc79..68f9761c5 100644 --- a/libcef/browser_webview_delegate.h +++ b/libcef/browser_webview_delegate.h @@ -174,6 +174,7 @@ class BrowserWebViewDelegate : public WebKit::WebViewClient, const gfx::Size& size, const std::string& json_arguments, std::string* json_retval) {} + virtual WebKit::WebCookieJar* GetCookieJar(); BrowserWebViewDelegate(CefBrowserImpl* browser); ~BrowserWebViewDelegate(); diff --git a/libcef/browser_webview_delegate_win.cc b/libcef/browser_webview_delegate_win.cc index bce0e596c..9b20cbdea 100644 --- a/libcef/browser_webview_delegate_win.cc +++ b/libcef/browser_webview_delegate_win.cc @@ -18,12 +18,13 @@ #include #include -#include "app/gfx/gdi_util.h" -#include "app/gfx/native_widget_types.h" #include "base/gfx/point.h" #include "base/message_loop.h" -#include "base/string_util.h" #include "base/trace_event.h" +#include "base/string_util.h" +#include "base/utf_string_conversions.h" +#include "gfx/gdi_util.h" +#include "gfx/native_widget_types.h" #include "net/base/net_errors.h" #include "third_party/WebKit/WebKit/chromium/public/WebContextMenuData.h" #include "third_party/WebKit/WebKit/chromium/public/WebCursorInfo.h" diff --git a/libcef/context.cc b/libcef/context.cc index 88706e502..72b45f5ff 100644 --- a/libcef/context.cc +++ b/libcef/context.cc @@ -17,7 +17,7 @@ #include "base/rand_util.h" #include "base/resource_util.h" #include "base/stats_table.h" -#include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "net/base/net_module.h" #include "third_party/WebKit/WebKit/chromium/public/WebScriptController.h" #include "webkit/extensions/v8/gc_extension.h" @@ -353,6 +353,7 @@ bool CefContext::Initialize(bool multi_threaded_message_loop, webprefs_->local_storage_enabled = true; webprefs_->application_cache_enabled = true; webprefs_->databases_enabled = true; + webprefs_->allow_file_access_from_file_urls = true; if (multi_threaded_message_loop) { // Event that will be used to signal thread setup completion. Start diff --git a/libcef/context.h b/libcef/context.h index 0787843e8..9d003315d 100644 --- a/libcef/context.h +++ b/libcef/context.h @@ -7,10 +7,10 @@ #define _CONTEXT_H #include "../include/cef.h" -#include "app/gfx/native_widget_types.h" #include "base/at_exit.h" #include "base/message_loop.h" #include "base/stats_table.h" +#include "gfx/native_widget_types.h" #include "webkit/glue/webpreferences.h" class BrowserWebKitInit; diff --git a/libcef/request_impl.cc b/libcef/request_impl.cc index 279cb334a..24b25fff7 100644 --- a/libcef/request_impl.cc +++ b/libcef/request_impl.cc @@ -6,7 +6,7 @@ #include "browser_webkit_glue.h" #include "base/logging.h" -#include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "net/http/http_response_headers.h" #include "net/http/http_util.h" #include "net/url_request/url_request.h" diff --git a/libcef/scheme_impl.cc b/libcef/scheme_impl.cc index c037bdd39..3bf6d2051 100644 --- a/libcef/scheme_impl.cc +++ b/libcef/scheme_impl.cc @@ -6,8 +6,9 @@ #include "base/lazy_instance.h" #include "base/logging.h" #include "base/message_loop.h" -#include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "base/worker_pool.h" +#include "googleurl/src/url_util.h" #include "net/base/completion_callback.h" #include "net/base/io_buffer.h" #include "net/base/upload_data.h" @@ -375,6 +376,11 @@ public: void RegisterScheme() { + // Register the scheme as a standard scheme if it isn't already. + url_parse::Component scheme(0, scheme_name_.length()); + if (!url_util::IsStandard(scheme_name_.c_str(), scheme)) + url_util::AddStandardScheme(scheme_name_.c_str()); + // we need to store the pointer of this handler because // we can't pass it as a parameter to the factory method CefUrlRequestFilter::GetInstance()->AddHostnameHandler( diff --git a/libcef/v8_impl.cc b/libcef/v8_impl.cc index 62e455cdd..b4afa6823 100644 --- a/libcef/v8_impl.cc +++ b/libcef/v8_impl.cc @@ -6,7 +6,7 @@ #include "context.h" #include "tracker.h" #include "base/lazy_instance.h" -#include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "third_party/WebKit/WebKit/chromium/public/WebKit.h" #include "third_party/WebKit/WebKit/chromium/public/WebScriptController.h" diff --git a/libcef/webview_host.h b/libcef/webview_host.h index 7efc4a6f4..59304aa95 100644 --- a/libcef/webview_host.h +++ b/libcef/webview_host.h @@ -6,8 +6,8 @@ #define _WEBVIEW_HOST_H #include "base/basictypes.h" -#include "app/gfx/native_widget_types.h" #include "base/gfx/rect.h" +#include "gfx/native_widget_types.h" #include "webwidget_host.h" struct WebPreferences; diff --git a/libcef/webwidget_host.h b/libcef/webwidget_host.h index 5afdf3722..1d92b9eab 100644 --- a/libcef/webwidget_host.h +++ b/libcef/webwidget_host.h @@ -6,9 +6,9 @@ #define _WEBWIDGET_HOST_H #include "base/basictypes.h" -#include "app/gfx/native_widget_types.h" #include "base/gfx/rect.h" #include "base/scoped_ptr.h" +#include "gfx/native_widget_types.h" #include "skia/ext/platform_canvas.h" #include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h"