libcef: Update due to underlying chromium changes.

- Calling AddStandardScheme() is now required for custom scheme handlers due to GURL changes.
- Add '--no-circular-check' flag in cef_create_projects.bat to avoid unnecessary GYP failures.
- nphostapi.h moved to third_party/npapi/bindings directory.
- UTF functions moved to base/utf_string_conversions.h
- app/gfx directory moved to gfx
- Add simple cookie jar implementation.
- Enable WebGL support.


git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@72 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2010-03-29 17:53:26 +00:00
parent a46069c097
commit 669244ca18
28 changed files with 138 additions and 56 deletions

View File

@ -49,3 +49,4 @@ Date | CEF Revision | Chromium Revision
2009-11-04 | /trunk@64 | /trunk@31062 2009-11-04 | /trunk@64 | /trunk@31062
2010-01-11 | /trunk@65 | /trunk@35902 2010-01-11 | /trunk@65 | /trunk@35902
2010-02-11 | /trunk@71 | /trunk@38776 2010-02-11 | /trunk@71 | /trunk@38776
2010-03-29 | /trunk@72 | /trunk@42941

View File

@ -152,7 +152,6 @@
'../webkit/webkit.gyp:glue', '../webkit/webkit.gyp:glue',
'../webkit/webkit.gyp:webkit_resources', '../webkit/webkit.gyp:webkit_resources',
'../webkit/webkit.gyp:webkit_strings', '../webkit/webkit.gyp:webkit_strings',
'../webkit/default_plugin/default_plugin.gyp:default_plugin',
'libcef_static', 'libcef_static',
], ],
'defines': [ 'defines': [
@ -314,7 +313,6 @@
'../webkit/webkit.gyp:glue', '../webkit/webkit.gyp:glue',
'../webkit/webkit.gyp:webkit_resources', '../webkit/webkit.gyp:webkit_resources',
'../webkit/webkit.gyp:webkit_strings', '../webkit/webkit.gyp:webkit_strings',
'../webkit/default_plugin/default_plugin.gyp:default_plugin',
], ],
'sources': [ 'sources': [
'include/cef.h', 'include/cef.h',
@ -346,6 +344,8 @@
'libcef/browser_resource_loader_bridge.h', 'libcef/browser_resource_loader_bridge.h',
'libcef/browser_socket_stream_bridge.cc', 'libcef/browser_socket_stream_bridge.cc',
'libcef/browser_socket_stream_bridge.h', '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.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

@ -4,7 +4,7 @@ CALL tools\patch_build.bat
ECHO Generating project files... ECHO Generating project files...
CALL :SET_ENV %CD% CALL :SET_ENV %CD%
:GEN_PROJ :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 GOTO :END
:SET_ENV :SET_ENV
SET CEF_DIRECTORY=%~n1 SET CEF_DIRECTORY=%~n1

View File

@ -33,8 +33,8 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "webkit/glue/plugins/nphostapi.h"
#include "third_party/npapi/bindings/npapi.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 // Netscape plugins are normally built at separate DLLs that are loaded by the
// browser when needed. This interface supports the creation of plugins that // browser when needed. This interface supports the creation of plugins that

View File

@ -36,8 +36,8 @@ extern "C" {
#endif #endif
#include "cef_export.h" #include "cef_export.h"
#include "webkit/glue/plugins/nphostapi.h"
#include "third_party/npapi/bindings/npapi.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 // Netscape plugins are normally built at separate DLLs that are loaded by the
// browser when needed. This interface supports the creation of plugins that // browser when needed. This interface supports the creation of plugins that

View File

@ -5,6 +5,7 @@
#include "browser_appcache_system.h" #include "browser_appcache_system.h"
#include "browser_resource_loader_bridge.h" #include "browser_resource_loader_bridge.h"
#include "base/callback.h"
#include "base/lock.h" #include "base/lock.h"
#include "base/task.h" #include "base/task.h"
#include "base/waitable_event.h" #include "base/waitable_event.h"
@ -302,7 +303,7 @@ BrowserAppCacheSystem::~BrowserAppCacheSystem() {
void BrowserAppCacheSystem::InitOnUIThread( void BrowserAppCacheSystem::InitOnUIThread(
const FilePath& cache_directory) { const FilePath& cache_directory) {
DCHECK(!ui_message_loop_); 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(); ui_message_loop_ = MessageLoop::current();
cache_directory_ = cache_directory; cache_directory_ = cache_directory;
} }

View File

@ -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) { void BrowserDatabaseSystem::databaseOpened(const WebKit::WebDatabase& database) {
DatabaseOpened(database.securityOrigin().databaseIdentifier(), DatabaseOpened(database.securityOrigin().databaseIdentifier(),
database.name(), database.displayName(), database.name(), database.displayName(),

View File

@ -46,6 +46,8 @@ class BrowserDatabaseSystem : public webkit_database::DatabaseTracker::Observer,
const string16& database_name, const string16& database_name,
int64 database_size, int64 database_size,
int64 space_available); int64 space_available);
virtual void OnDatabaseScheduledForDeletion(const string16& origin_identifier,
const string16& database_name);
// WebDatabaseObserver implementation // WebDatabaseObserver implementation
virtual void databaseOpened(const WebKit::WebDatabase& database); virtual void databaseOpened(const WebKit::WebDatabase& database);

View File

@ -8,7 +8,7 @@
#include "browser_webkit_glue.h" #include "browser_webkit_glue.h"
#include "request_impl.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/WebFrame.h"
#include "third_party/WebKit/WebKit/chromium/public/WebHTTPBody.h" #include "third_party/WebKit/WebKit/chromium/public/WebHTTPBody.h"
#include "third_party/WebKit/WebKit/chromium/public/WebScriptSource.h" #include "third_party/WebKit/WebKit/chromium/public/WebScriptSource.h"

View File

@ -9,7 +9,7 @@
#include "stream_impl.h" #include "stream_impl.h"
#include "printing/units.h" #include "printing/units.h"
#include "base/string_util.h" #include "base/utf_string_conversions.h"
#include "base/win_util.h" #include "base/win_util.h"
#include "skia/ext/vector_canvas.h" #include "skia/ext/vector_canvas.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h"

View File

@ -13,6 +13,7 @@
#include "net/base/ssl_config_service.h" #include "net/base/ssl_config_service.h"
#include "net/base/static_cookie_policy.h" #include "net/base/static_cookie_policy.h"
#include "net/ftp/ftp_network_layer.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.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"
@ -33,7 +34,7 @@ void BrowserRequestContext::Init(
const FilePath& cache_path, const FilePath& cache_path,
net::HttpCache::Mode cache_mode, net::HttpCache::Mode cache_mode,
bool no_proxy) { bool no_proxy) {
cookie_store_ = new net::CookieMonster(NULL); cookie_store_ = new net::CookieMonster(NULL, NULL);
cookie_policy_ = new net::StaticCookiePolicy(); cookie_policy_ = new net::StaticCookiePolicy();
// hard-code A-L and A-C for test shells // hard-code A-L and A-C for test shells
@ -44,17 +45,21 @@ void BrowserRequestContext::Init(
scoped_ptr<net::ProxyConfigService> proxy_config_service( scoped_ptr<net::ProxyConfigService> proxy_config_service(
net::ProxyService::CreateSystemProxyConfigService(NULL, NULL)); net::ProxyService::CreateSystemProxyConfigService(NULL, NULL));
host_resolver_ = net::CreateSystemHostResolver(NULL); host_resolver_ = net::CreateSystemHostResolver(NULL);
proxy_service_ = net::ProxyService::Create(proxy_config_service.release(), proxy_service_ = net::ProxyService::Create(proxy_config_service.release(),
false, NULL, NULL, NULL); false, NULL, NULL, NULL, NULL);
ssl_config_service_ = net::SSLConfigService::CreateSystemSSLConfigService(); ssl_config_service_ = net::SSLConfigService::CreateSystemSSLConfigService();
http_auth_handler_factory_ = net::HttpAuthHandlerFactory::CreateDefault();
net::HttpCache *cache; net::HttpCache *cache;
if (cache_path.empty()) { if (cache_path.empty()) {
cache = new net::HttpCache(NULL, host_resolver_, proxy_service_, cache = new net::HttpCache(NULL, host_resolver_, proxy_service_,
ssl_config_service_, 0); ssl_config_service_, http_auth_handler_factory_,
0);
} else { } else {
cache = new net::HttpCache(NULL, host_resolver_, proxy_service_, 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); cache->set_mode(cache_mode);
http_transaction_factory_ = cache; http_transaction_factory_ = cache;
@ -65,6 +70,7 @@ void BrowserRequestContext::Init(
BrowserRequestContext::~BrowserRequestContext() { BrowserRequestContext::~BrowserRequestContext() {
delete ftp_transaction_factory_; delete ftp_transaction_factory_;
delete http_transaction_factory_; delete http_transaction_factory_;
delete http_auth_handler_factory_;
delete static_cast<net::StaticCookiePolicy*>(cookie_policy_); delete static_cast<net::StaticCookiePolicy*>(cookie_policy_);
} }

View File

@ -40,10 +40,10 @@
#include "base/message_loop.h" #include "base/message_loop.h"
#include "base/ref_counted.h" #include "base/ref_counted.h"
#include "base/string_util.h"
#include "base/time.h" #include "base/time.h"
#include "base/timer.h" #include "base/timer.h"
#include "base/thread.h" #include "base/thread.h"
#include "base/utf_string_conversions.h"
#include "base/waitable_event.h" #include "base/waitable_event.h"
#include "net/base/cookie_policy.h" #include "net/base/cookie_policy.h"
#include "net/base/io_buffer.h" #include "net/base/io_buffer.h"
@ -620,12 +620,16 @@ class ResourceLoaderBridgeImpl : public ResourceLoaderBridge {
params_->upload->AppendBytes(data, data_len); params_->upload->AppendBytes(data, data_len);
} }
virtual void AppendFileRangeToUpload(const FilePath& file_path, virtual void AppendFileRangeToUpload(
uint64 offset, uint64 length) { const FilePath& file_path,
uint64 offset,
uint64 length,
const base::Time& expected_modification_time) {
DCHECK(params_.get()); DCHECK(params_.get());
if (!params_->upload) if (!params_->upload)
params_->upload = new net::UploadData(); 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) { virtual void SetUploadIdentifier(int64 identifier) {

View File

@ -9,7 +9,8 @@
#include "base/message_loop.h" #include "base/message_loop.h"
#include "base/ref_counted.h" #include "base/ref_counted.h"
#include "googleurl/src/gurl.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 "net/url_request/url_request_context.h"
#include "webkit/glue/websocketstreamhandle_bridge.h" #include "webkit/glue/websocketstreamhandle_bridge.h"
#include "webkit/glue/websocketstreamhandle_delegate.h" #include "webkit/glue/websocketstreamhandle_delegate.h"
@ -66,7 +67,7 @@ class WebSocketStreamHandleBridgeImpl
WebKit::WebSocketStreamHandle* handle_; WebKit::WebSocketStreamHandle* handle_;
webkit_glue::WebSocketStreamHandleDelegate* delegate_; webkit_glue::WebSocketStreamHandleDelegate* delegate_;
scoped_refptr<net::SocketStream> socket_; scoped_refptr<net::SocketStreamJob> socket_;
// Number of pending tasks to handle net::SocketStream::Delegate methods. // Number of pending tasks to handle net::SocketStream::Delegate methods.
int num_pending_tasks_; int num_pending_tasks_;
@ -81,6 +82,7 @@ WebSocketStreamHandleBridgeImpl::WebSocketStreamHandleBridgeImpl(
handle_(handle), handle_(handle),
delegate_(delegate), delegate_(delegate),
num_pending_tasks_(0) { num_pending_tasks_(0) {
net::WebSocketJob::EnsureInit();
} }
WebSocketStreamHandleBridgeImpl::~WebSocketStreamHandleBridgeImpl() { WebSocketStreamHandleBridgeImpl::~WebSocketStreamHandleBridgeImpl() {
@ -155,7 +157,7 @@ void WebSocketStreamHandleBridgeImpl::OnClose(net::SocketStream* socket) {
void WebSocketStreamHandleBridgeImpl::DoConnect(const GURL& url) { void WebSocketStreamHandleBridgeImpl::DoConnect(const GURL& url) {
DCHECK(MessageLoop::current() == g_io_thread); 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_->set_context(g_request_context);
socket_->Connect(); socket_->Connect();
} }

View File

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

View File

@ -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

View File

@ -20,7 +20,7 @@ MSVC_POP_WARNING();
#include "base/resource_util.h" #include "base/resource_util.h"
#include "base/scoped_ptr.h" #include "base/scoped_ptr.h"
#include "base/string16.h" #include "base/string16.h"
#include "base/string_util.h" #include "base/utf_string_conversions.h"
#include "base/win_util.h" #include "base/win_util.h"
#include "net/base/mime_util.h" #include "net/base/mime_util.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h"

View File

@ -17,8 +17,8 @@ MSVC_POP_WARNING();
#include "browser_webkit_glue.h" #include "browser_webkit_glue.h"
#undef LOG #undef LOG
#include "app/gfx/gdi_util.h"
#include "base/logging.h" #include "base/logging.h"
#include "gfx/gdi_util.h"
#include "skia/ext/platform_canvas.h" #include "skia/ext/platform_canvas.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/WebSize.h" #include "third_party/WebKit/WebKit/chromium/public/WebSize.h"

View File

@ -10,7 +10,7 @@
#include "base/path_service.h" #include "base/path_service.h"
#include "base/scoped_temp_dir.h" #include "base/scoped_temp_dir.h"
#include "base/stats_counters.h" #include "base/stats_counters.h"
#include "base/string_util.h" #include "base/utf_string_conversions.h"
#include "media/base/media.h" #include "media/base/media.h"
#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"
@ -35,6 +35,7 @@
#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_webcookiejar_impl.h"
class BrowserWebKitInit : public webkit_glue::WebKitClientImpl { class BrowserWebKitInit : public webkit_glue::WebKitClientImpl {
@ -51,6 +52,7 @@ class BrowserWebKitInit : public webkit_glue::WebKitClientImpl {
WebKit::WebRuntimeFeatures::enableSockets(true); WebKit::WebRuntimeFeatures::enableSockets(true);
WebKit::WebRuntimeFeatures::enableApplicationCache(true); WebKit::WebRuntimeFeatures::enableApplicationCache(true);
WebKit::WebRuntimeFeatures::enableDatabase(true); WebKit::WebRuntimeFeatures::enableDatabase(true);
WebKit::WebRuntimeFeatures::enableWebGL(true);
// Load libraries for media and enable the media player. // Load libraries for media and enable the media player.
FilePath module_path; FilePath module_path;
@ -88,6 +90,10 @@ class BrowserWebKitInit : public webkit_glue::WebKitClientImpl {
return NULL; return NULL;
} }
virtual WebKit::WebCookieJar* cookieJar() {
return &cookie_jar_;
}
virtual bool sandboxEnabled() { virtual bool sandboxEnabled() {
return true; return true;
} }
@ -135,20 +141,6 @@ class BrowserWebKitInit : public webkit_glue::WebKitClientImpl {
return NULL; 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&) { virtual void prefetchHostName(const WebKit::WebString&) {
} }
@ -204,6 +196,7 @@ class BrowserWebKitInit : public webkit_glue::WebKitClientImpl {
ScopedTempDir appcache_dir_; ScopedTempDir appcache_dir_;
BrowserAppCacheSystem appcache_system_; BrowserAppCacheSystem appcache_system_;
BrowserDatabaseSystem database_system_; BrowserDatabaseSystem database_system_;
BrowserWebCookieJarImpl cookie_jar_;
}; };
#endif // _BROWSER_WEBKIT_INIT_H #endif // _BROWSER_WEBKIT_INIT_H

View File

@ -14,14 +14,14 @@
#include "request_impl.h" #include "request_impl.h"
#include "v8_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/file_util.h"
#include "base/gfx/point.h" #include "base/gfx/point.h"
#include "base/message_loop.h" #include "base/message_loop.h"
#include "base/process_util.h" #include "base/process_util.h"
#include "base/string_util.h"
#include "base/trace_event.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 "net/base/net_errors.h"
#include "third_party/WebKit/WebKit/chromium/public/WebConsoleMessage.h" #include "third_party/WebKit/WebKit/chromium/public/WebConsoleMessage.h"
#include "third_party/WebKit/WebKit/chromium/public/WebContextMenuData.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/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"
#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/WebNode.h"
#include "third_party/WebKit/WebKit/chromium/public/WebPoint.h" #include "third_party/WebKit/WebKit/chromium/public/WebPoint.h"
#include "third_party/WebKit/WebKit/chromium/public/WebPopupMenu.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/buffered_data_source.h"
#include "webkit/glue/media/media_resource_loader_bridge_factory.h" #include "webkit/glue/media/media_resource_loader_bridge_factory.h"
#include "webkit/glue/media/simple_data_source.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/webdropdata.h"
#include "webkit/glue/webplugin_impl.h" #include "webkit/glue/webplugin_impl.h"
#include "webkit/glue/webpreferences.h" #include "webkit/glue/webpreferences.h"
@ -69,6 +71,7 @@
using appcache::WebApplicationCacheHostImpl; using appcache::WebApplicationCacheHostImpl;
using WebKit::WebConsoleMessage; using WebKit::WebConsoleMessage;
using WebKit::WebContextMenuData; using WebKit::WebContextMenuData;
using WebKit::WebCookieJar;
using WebKit::WebData; using WebKit::WebData;
using WebKit::WebDataSource; using WebKit::WebDataSource;
using WebKit::WebDragData; using WebKit::WebDragData;
@ -413,6 +416,12 @@ int BrowserWebViewDelegate::historyForwardListCount() {
- current_index - 1; - current_index - 1;
} }
// WebPluginPageDelegate -----------------------------------------------------
WebCookieJar* BrowserWebViewDelegate::GetCookieJar() {
return WebKit::webKitClient()->cookieJar();
}
// WebWidgetClient ----------------------------------------------------------- // WebWidgetClient -----------------------------------------------------------
void BrowserWebViewDelegate::didInvalidateRect(const WebRect& rect) { void BrowserWebViewDelegate::didInvalidateRect(const WebRect& rect) {
@ -458,16 +467,16 @@ WebMediaPlayer* BrowserWebViewDelegate::createMediaPlayer(
scoped_refptr<media::FilterFactoryCollection> factory = scoped_refptr<media::FilterFactoryCollection> factory =
new media::FilterFactoryCollection(); new media::FilterFactoryCollection();
WebApplicationCacheHostImpl* appcache_host = appcache::WebApplicationCacheHostImpl* appcache_host =
WebApplicationCacheHostImpl::FromFrame(frame); appcache::WebApplicationCacheHostImpl::FromFrame(frame);
// TODO(hclam): this is the same piece of code as in RenderView, maybe they // TODO(hclam): this is the same piece of code as in RenderView, maybe they
// should be grouped together. // should be grouped together.
webkit_glue::MediaResourceLoaderBridgeFactory* bridge_factory = webkit_glue::MediaResourceLoaderBridgeFactory* bridge_factory =
new webkit_glue::MediaResourceLoaderBridgeFactory( new webkit_glue::MediaResourceLoaderBridgeFactory(
GURL::EmptyGURL(), // referrer GURL(), // referrer
"null", // frame origin "null", // frame origin
"null", // main_frame_origin "null", // main_frame_origin
base::GetCurrentProcId(), base::GetCurrentProcId(),
appcache_host ? appcache_host->host_id() : appcache::kNoHostId, appcache_host ? appcache_host->host_id() : appcache::kNoHostId,
0); 0);
@ -481,7 +490,8 @@ WebMediaPlayer* BrowserWebViewDelegate::createMediaPlayer(
bridge_factory); bridge_factory);
factory->AddFactory(buffered_data_source_factory); factory->AddFactory(buffered_data_source_factory);
factory->AddFactory(simple_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( void BrowserWebViewDelegate::loadURLExternally(

View File

@ -174,6 +174,7 @@ class BrowserWebViewDelegate : public WebKit::WebViewClient,
const gfx::Size& size, const gfx::Size& size,
const std::string& json_arguments, const std::string& json_arguments,
std::string* json_retval) {} std::string* json_retval) {}
virtual WebKit::WebCookieJar* GetCookieJar();
BrowserWebViewDelegate(CefBrowserImpl* browser); BrowserWebViewDelegate(CefBrowserImpl* browser);
~BrowserWebViewDelegate(); ~BrowserWebViewDelegate();

View File

@ -18,12 +18,13 @@
#include <shlobj.h> #include <shlobj.h>
#include <shlwapi.h> #include <shlwapi.h>
#include "app/gfx/gdi_util.h"
#include "app/gfx/native_widget_types.h"
#include "base/gfx/point.h" #include "base/gfx/point.h"
#include "base/message_loop.h" #include "base/message_loop.h"
#include "base/string_util.h"
#include "base/trace_event.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 "net/base/net_errors.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/WebCursorInfo.h" #include "third_party/WebKit/WebKit/chromium/public/WebCursorInfo.h"

View File

@ -17,7 +17,7 @@
#include "base/rand_util.h" #include "base/rand_util.h"
#include "base/resource_util.h" #include "base/resource_util.h"
#include "base/stats_table.h" #include "base/stats_table.h"
#include "base/string_util.h" #include "base/utf_string_conversions.h"
#include "net/base/net_module.h" #include "net/base/net_module.h"
#include "third_party/WebKit/WebKit/chromium/public/WebScriptController.h" #include "third_party/WebKit/WebKit/chromium/public/WebScriptController.h"
#include "webkit/extensions/v8/gc_extension.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_->local_storage_enabled = true;
webprefs_->application_cache_enabled = true; webprefs_->application_cache_enabled = true;
webprefs_->databases_enabled = true; webprefs_->databases_enabled = true;
webprefs_->allow_file_access_from_file_urls = true;
if (multi_threaded_message_loop) { if (multi_threaded_message_loop) {
// Event that will be used to signal thread setup completion. Start // Event that will be used to signal thread setup completion. Start

View File

@ -7,10 +7,10 @@
#define _CONTEXT_H #define _CONTEXT_H
#include "../include/cef.h" #include "../include/cef.h"
#include "app/gfx/native_widget_types.h"
#include "base/at_exit.h" #include "base/at_exit.h"
#include "base/message_loop.h" #include "base/message_loop.h"
#include "base/stats_table.h" #include "base/stats_table.h"
#include "gfx/native_widget_types.h"
#include "webkit/glue/webpreferences.h" #include "webkit/glue/webpreferences.h"
class BrowserWebKitInit; class BrowserWebKitInit;

View File

@ -6,7 +6,7 @@
#include "browser_webkit_glue.h" #include "browser_webkit_glue.h"
#include "base/logging.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_response_headers.h"
#include "net/http/http_util.h" #include "net/http/http_util.h"
#include "net/url_request/url_request.h" #include "net/url_request/url_request.h"

View File

@ -6,8 +6,9 @@
#include "base/lazy_instance.h" #include "base/lazy_instance.h"
#include "base/logging.h" #include "base/logging.h"
#include "base/message_loop.h" #include "base/message_loop.h"
#include "base/string_util.h" #include "base/utf_string_conversions.h"
#include "base/worker_pool.h" #include "base/worker_pool.h"
#include "googleurl/src/url_util.h"
#include "net/base/completion_callback.h" #include "net/base/completion_callback.h"
#include "net/base/io_buffer.h" #include "net/base/io_buffer.h"
#include "net/base/upload_data.h" #include "net/base/upload_data.h"
@ -375,6 +376,11 @@ public:
void RegisterScheme() 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 need to store the pointer of this handler because
// we can't pass it as a parameter to the factory method // we can't pass it as a parameter to the factory method
CefUrlRequestFilter::GetInstance()->AddHostnameHandler( CefUrlRequestFilter::GetInstance()->AddHostnameHandler(

View File

@ -6,7 +6,7 @@
#include "context.h" #include "context.h"
#include "tracker.h" #include "tracker.h"
#include "base/lazy_instance.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/WebKit.h"
#include "third_party/WebKit/WebKit/chromium/public/WebScriptController.h" #include "third_party/WebKit/WebKit/chromium/public/WebScriptController.h"

View File

@ -6,8 +6,8 @@
#define _WEBVIEW_HOST_H #define _WEBVIEW_HOST_H
#include "base/basictypes.h" #include "base/basictypes.h"
#include "app/gfx/native_widget_types.h"
#include "base/gfx/rect.h" #include "base/gfx/rect.h"
#include "gfx/native_widget_types.h"
#include "webwidget_host.h" #include "webwidget_host.h"
struct WebPreferences; struct WebPreferences;

View File

@ -6,9 +6,9 @@
#define _WEBWIDGET_HOST_H #define _WEBWIDGET_HOST_H
#include "base/basictypes.h" #include "base/basictypes.h"
#include "app/gfx/native_widget_types.h"
#include "base/gfx/rect.h" #include "base/gfx/rect.h"
#include "base/scoped_ptr.h" #include "base/scoped_ptr.h"
#include "gfx/native_widget_types.h"
#include "skia/ext/platform_canvas.h" #include "skia/ext/platform_canvas.h"
#include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h" #include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h"