mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-03-12 18:10:14 +01:00
Update to Chromium rev 55388. Note that the Windows 7 SDK is now required to build Chromium.
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@93 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
parent
9ab2eca392
commit
e5e560c64a
CHROMIUM_BUILD_COMPATIBILITY.txtcef.gyp
libcef
browser_appcache_system.ccbrowser_database_system.ccbrowser_impl.ccbrowser_impl_win.ccbrowser_request_context.ccbrowser_webkit_glue.ccbrowser_webkit_glue_win.ccbrowser_webkit_init.hbrowser_webview_delegate.cccef_process_ui_thread.ccsimple_clipboard_impl.ccwebview_host.ccwebview_host.h
patch/patches
@ -51,3 +51,4 @@ Date | CEF Revision | Chromium Revision
|
||||
2010-02-11 | /trunk@71 | /trunk@38776
|
||||
2010-03-29 | /trunk@72 | /trunk@42941
|
||||
2010-06-21 | /trunk@82 | /trunk@50325
|
||||
2010-08-09 | /trunk@93 | /trunk@55388
|
||||
|
5
cef.gyp
5
cef.gyp
@ -219,6 +219,11 @@
|
||||
'libcef_dll/transfer_util.cpp',
|
||||
'libcef_dll/transfer_util.h',
|
||||
],
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
'-lcomctl32.lib',
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
'target_name': 'libcef_dll_wrapper',
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Copyright (c) 2009 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.
|
||||
// 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_appcache_system.h"
|
||||
#include "browser_resource_loader_bridge.h"
|
||||
@ -59,16 +59,17 @@ class BrowserFrontendProxy
|
||||
|
||||
void clear_appcache_system() { system_ = NULL; }
|
||||
|
||||
virtual void OnCacheSelected(int host_id, int64 cache_id ,
|
||||
appcache::Status status) {
|
||||
virtual void OnCacheSelected(int host_id,
|
||||
const appcache::AppCacheInfo& info) {
|
||||
if (!system_)
|
||||
return;
|
||||
if (system_->is_io_thread())
|
||||
system_->ui_message_loop()->PostTask(FROM_HERE, NewRunnableMethod(
|
||||
this, &BrowserFrontendProxy::OnCacheSelected,
|
||||
host_id, cache_id, status));
|
||||
else if (system_->is_ui_thread())
|
||||
system_->frontend_impl_.OnCacheSelected(host_id, cache_id, status);
|
||||
host_id, info));
|
||||
else if (system_->is_ui_thread()) {
|
||||
system_->frontend_impl_.OnCacheSelected(host_id, info);
|
||||
}
|
||||
else
|
||||
NOTREACHED();
|
||||
}
|
||||
@ -106,40 +107,48 @@ class BrowserFrontendProxy
|
||||
return;
|
||||
if (system_->is_io_thread())
|
||||
system_->ui_message_loop()->PostTask(FROM_HERE, NewRunnableMethod(
|
||||
this, &BrowserFrontendProxy::OnProgressEventRaised, host_ids, url, num_total, num_complete));
|
||||
this, &BrowserFrontendProxy::OnProgressEventRaised,
|
||||
host_ids, url, num_total, num_complete));
|
||||
else if (system_->is_ui_thread())
|
||||
system_->frontend_impl_.OnProgressEventRaised(host_ids, url, num_total, num_complete);
|
||||
system_->frontend_impl_.OnProgressEventRaised(
|
||||
host_ids, url, num_total, num_complete);
|
||||
else
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
virtual void OnContentBlocked(int host_id){
|
||||
if (!system_)
|
||||
return;
|
||||
if (system_->is_io_thread())
|
||||
system_->ui_message_loop()->PostTask(FROM_HERE, NewRunnableMethod(
|
||||
this, &BrowserFrontendProxy::OnContentBlocked, host_id));
|
||||
else if (system_->is_ui_thread())
|
||||
system_->frontend_impl_.OnContentBlocked(host_id);
|
||||
else
|
||||
NOTREACHED();
|
||||
|
||||
}
|
||||
|
||||
virtual void OnLogMessage(int host_id, appcache::LogLevel log_level,
|
||||
virtual void OnErrorEventRaised(const std::vector<int>& host_ids,
|
||||
const std::string& message) {
|
||||
|
||||
if (!system_)
|
||||
return;
|
||||
if (system_->is_io_thread())
|
||||
system_->ui_message_loop()->PostTask(FROM_HERE, NewRunnableMethod(
|
||||
this, &BrowserFrontendProxy::OnLogMessage, host_id, log_level, message));
|
||||
this, &BrowserFrontendProxy::OnErrorEventRaised,
|
||||
host_ids, message));
|
||||
else if (system_->is_ui_thread())
|
||||
system_->frontend_impl_.OnLogMessage(host_id, log_level, message);
|
||||
system_->frontend_impl_.OnErrorEventRaised(
|
||||
host_ids, message);
|
||||
else
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
virtual void OnLogMessage(int host_id,
|
||||
appcache::LogLevel log_level,
|
||||
const std::string& message) {
|
||||
if (!system_)
|
||||
return;
|
||||
if (system_->is_io_thread())
|
||||
system_->ui_message_loop()->PostTask(FROM_HERE, NewRunnableMethod(
|
||||
this, &BrowserFrontendProxy::OnLogMessage,
|
||||
host_id, log_level, message));
|
||||
else if (system_->is_ui_thread())
|
||||
system_->frontend_impl_.OnLogMessage(
|
||||
host_id, log_level, message);
|
||||
else
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
virtual void OnContentBlocked(int host_id, const GURL& manifest_url) {}
|
||||
|
||||
private:
|
||||
friend class base::RefCountedThreadSafe<BrowserFrontendProxy>;
|
||||
|
||||
@ -205,34 +214,31 @@ class BrowserBackendProxy
|
||||
}
|
||||
}
|
||||
|
||||
virtual void GetResourceList(
|
||||
int host_id,
|
||||
std::vector<appcache::AppCacheResourceInfo>* resource_infos) {
|
||||
if (system_->is_ui_thread()) {
|
||||
system_->io_message_loop()->PostTask(FROM_HERE, NewRunnableMethod(
|
||||
this, &BrowserBackendProxy::GetResourceList,
|
||||
host_id, resource_infos));
|
||||
} else if (system_->is_io_thread()) {
|
||||
system_->backend_impl_->GetResourceList(host_id, resource_infos);
|
||||
} else {
|
||||
NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
virtual void SelectCacheForWorker(
|
||||
int host_id,
|
||||
int parent_process_id,
|
||||
int parent_host_id) {
|
||||
|
||||
if (system_->is_ui_thread()) {
|
||||
system_->io_message_loop()->PostTask(FROM_HERE, NewRunnableMethod(
|
||||
this, &BrowserBackendProxy::SelectCacheForWorker, host_id, parent_process_id,
|
||||
parent_host_id));
|
||||
} else if (system_->is_io_thread()) {
|
||||
system_->backend_impl_->SelectCacheForWorker(host_id, parent_process_id,
|
||||
parent_host_id);
|
||||
} else {
|
||||
NOTREACHED();
|
||||
}
|
||||
NOTIMPLEMENTED(); // Workers are not supported in test_shell.
|
||||
}
|
||||
|
||||
virtual void SelectCacheForSharedWorker(
|
||||
int host_id,
|
||||
int64 appcache_id) {
|
||||
if (system_->is_ui_thread()) {
|
||||
system_->io_message_loop()->PostTask(FROM_HERE, NewRunnableMethod(
|
||||
this, &BrowserBackendProxy::SelectCacheForSharedWorker, host_id, appcache_id));
|
||||
} else if (system_->is_io_thread()) {
|
||||
system_->backend_impl_->SelectCacheForSharedWorker(host_id, appcache_id);
|
||||
} else {
|
||||
NOTREACHED();
|
||||
}
|
||||
NOTIMPLEMENTED(); // Workers are not supported in test_shell.
|
||||
}
|
||||
|
||||
virtual void MarkAsForeignEntry(int host_id, const GURL& document_url,
|
||||
@ -371,8 +377,7 @@ BrowserAppCacheSystem::~BrowserAppCacheSystem() {
|
||||
}
|
||||
}
|
||||
|
||||
void BrowserAppCacheSystem::InitOnUIThread(
|
||||
const FilePath& cache_directory) {
|
||||
void BrowserAppCacheSystem::InitOnUIThread(const FilePath& cache_directory) {
|
||||
DCHECK(!ui_message_loop_);
|
||||
AppCacheThread::Init(DB_THREAD_ID, IO_THREAD_ID);
|
||||
ui_message_loop_ = MessageLoop::current();
|
||||
|
@ -4,17 +4,12 @@
|
||||
|
||||
#include "browser_database_system.h"
|
||||
|
||||
#if defined(USE_SYSTEM_SQLITE)
|
||||
#include <sqlite3.h>
|
||||
#else
|
||||
#include "third_party/sqlite/preprocessed/sqlite3.h"
|
||||
#endif
|
||||
|
||||
#include "base/auto_reset.h"
|
||||
#include "base/file_util.h"
|
||||
#include "base/message_loop.h"
|
||||
#include "base/platform_thread.h"
|
||||
#include "base/process_util.h"
|
||||
#include "third_party/sqlite/preprocessed/sqlite3.h"
|
||||
#include "third_party/WebKit/WebKit/chromium/public/WebDatabase.h"
|
||||
#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
|
||||
#include "webkit/database/database_util.h"
|
||||
|
@ -917,10 +917,8 @@ void CefBrowserImpl::UIT_Find(int identifier, const std::wstring& search_text,
|
||||
// Just navigate back/forward.
|
||||
delegate->SelectFindResult(options.forward);
|
||||
} else {
|
||||
if (delegate->SupportsFind()) {
|
||||
delegate->StartFind(UTF16ToUTF8(search_text),
|
||||
options.matchCase,
|
||||
identifier);
|
||||
if (delegate->StartFind(search_text.c_str(), options.matchCase,
|
||||
identifier)) {
|
||||
} else {
|
||||
// No find results.
|
||||
UIT_NotifyFindStatus(identifier, 0, gfx::Rect(), 0, true);
|
||||
|
@ -54,10 +54,6 @@ LRESULT CALLBACK CefBrowserImpl::WndProc(HWND hwnd, UINT message,
|
||||
}
|
||||
browser->GetWebViewDelegate()->RevokeDragDrop();
|
||||
|
||||
// Call GC twice to clean up garbage.
|
||||
browser->GetWebView()->mainFrame()->collectGarbage();
|
||||
browser->GetWebView()->mainFrame()->collectGarbage();
|
||||
|
||||
// Clean up anything associated with the WebViewHost widget.
|
||||
browser->GetWebViewHost()->webwidget()->close();
|
||||
|
||||
@ -129,7 +125,7 @@ void CefBrowserImpl::UIT_CreateBrowser(const std::wstring& url)
|
||||
|
||||
// Create the webview host object
|
||||
webviewhost_.reset(
|
||||
WebViewHost::Create(window_info_.m_hWnd, delegate_.get(),
|
||||
WebViewHost::Create(window_info_.m_hWnd, delegate_.get(), NULL,
|
||||
*_Context->web_preferences()));
|
||||
delegate_->RegisterDragDrop();
|
||||
|
||||
|
@ -43,8 +43,10 @@ void BrowserRequestContext::Init(
|
||||
|
||||
// Use the system proxy settings.
|
||||
scoped_ptr<net::ProxyConfigService> proxy_config_service(
|
||||
net::ProxyService::CreateSystemProxyConfigService(NULL, NULL));
|
||||
host_resolver_ = net::CreateSystemHostResolver(NULL);
|
||||
net::ProxyService::CreateSystemProxyConfigService(
|
||||
MessageLoop::current(), NULL));
|
||||
host_resolver_ =
|
||||
net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism);
|
||||
proxy_service_ = net::ProxyService::Create(proxy_config_service.release(),
|
||||
false, NULL, NULL, NULL, NULL);
|
||||
ssl_config_service_ = net::SSLConfigService::CreateSystemSSLConfigService();
|
||||
@ -56,9 +58,8 @@ void BrowserRequestContext::Init(
|
||||
cache_path, 0, BrowserResourceLoaderBridge::GetCacheThread());
|
||||
|
||||
net::HttpCache* cache =
|
||||
new net::HttpCache(NULL, host_resolver_, proxy_service_,
|
||||
ssl_config_service_, http_auth_handler_factory_,
|
||||
NULL, NULL, backend);
|
||||
new net::HttpCache(host_resolver_, proxy_service_, ssl_config_service_,
|
||||
http_auth_handler_factory_, NULL, NULL, backend);
|
||||
|
||||
cache->set_mode(cache_mode);
|
||||
http_transaction_factory_ = cache;
|
||||
|
@ -73,8 +73,8 @@ bool IsProtocolSupportedForMedia(const GURL& url) {
|
||||
return false;
|
||||
}
|
||||
|
||||
std::wstring GetWebKitLocale() {
|
||||
return L"en-US";
|
||||
std::string GetWebKitLocale() {
|
||||
return "en-US";
|
||||
}
|
||||
|
||||
void InitializeTextEncoding() {
|
||||
@ -111,5 +111,20 @@ std::string GetProductVersion() {
|
||||
return std::string("CEF/0.0.0.0");
|
||||
}
|
||||
|
||||
bool IsSingleProcess() {
|
||||
return true;
|
||||
}
|
||||
|
||||
#if defined(OS_LINUX)
|
||||
int MatchFontWithFallback(const std::string& face, bool bold,
|
||||
bool italic, int charset) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
bool GetFontTable(int fd, uint32_t table, uint8_t* output,
|
||||
size_t* output_length) {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
} // namespace webkit_glue
|
||||
|
@ -87,7 +87,7 @@ void CaptureWebViewBitmap(HWND mainWnd, WebView* webview, HBITMAP& bitmap,
|
||||
|
||||
skia::PlatformCanvas canvas(size.cx, size.cy, true);
|
||||
canvas.drawARGB(255, 255, 255, 255, SkXfermode::kSrc_Mode);
|
||||
PlatformContextSkia context(&canvas);
|
||||
WebCore::PlatformContextSkia context(&canvas);
|
||||
WebKit::WebRect rect(0, 0, size.cx, size.cy);
|
||||
webview->layout();
|
||||
webview->paint(&canvas, rect);
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "third_party/WebKit/WebKit/chromium/public/WebSecurityPolicy.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/WebIndexedDatabase.h"
|
||||
#include "third_party/WebKit/WebKit/chromium/public/WebIDBFactory.h"
|
||||
#include "third_party/WebKit/WebKit/chromium/public/WebStorageNamespace.h"
|
||||
#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
|
||||
#include "webkit/glue/simple_webmimeregistry_impl.h"
|
||||
@ -58,6 +58,11 @@ class BrowserWebKitInit : public webkit_glue::WebKitClientImpl {
|
||||
WebKit::WebRuntimeFeatures::enableTouch(true);
|
||||
WebKit::WebRuntimeFeatures::enableIndexedDatabase(true);
|
||||
WebKit::WebRuntimeFeatures::enableGeolocation(false);
|
||||
WebKit::WebRuntimeFeatures::enableSpeechInput(true);
|
||||
|
||||
// TODO(hwennborg): Enable this once the implementation supports it.
|
||||
WebKit::WebRuntimeFeatures::enableDeviceMotion(false);
|
||||
WebKit::WebRuntimeFeatures::enableDeviceOrientation(false);
|
||||
|
||||
// Load libraries for media and enable the media player.
|
||||
FilePath module_path;
|
||||
@ -178,8 +183,8 @@ class BrowserWebKitInit : public webkit_glue::WebKitClientImpl {
|
||||
WebKit::WebStorageNamespace::m_localStorageQuota);
|
||||
}
|
||||
|
||||
virtual WebKit::WebIndexedDatabase* indexedDatabase() {
|
||||
return WebKit::WebIndexedDatabase::create();
|
||||
virtual WebKit::WebIDBFactory* idbFactory() {
|
||||
return WebKit::WebIDBFactory::create();
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -16,13 +16,14 @@
|
||||
#include "v8_impl.h"
|
||||
|
||||
#include "base/file_util.h"
|
||||
#include "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 "gfx/point.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"
|
||||
@ -663,8 +664,8 @@ void BrowserWebViewDelegate::didFailProvisionalLoad(
|
||||
if(rv == RV_HANDLED && !error_str.empty())
|
||||
error_text = WideToUTF8(error_str);
|
||||
} else {
|
||||
error_text = StringPrintf("Error %d when loading url %s", error.reason,
|
||||
failed_ds->request().url().spec().data());
|
||||
error_text = StringPrintf("Error %d when loading url %s",
|
||||
error.reason, failed_ds->request().url().spec().data());
|
||||
}
|
||||
|
||||
// Make sure we never show errors in view source mode.
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "base/i18n/icu_util.h"
|
||||
#include "base/rand_util.h"
|
||||
#include "base/stats_table.h"
|
||||
#include "base/string_number_conversions.h"
|
||||
#include "build/build_config.h"
|
||||
#include "net/base/net_module.h"
|
||||
#if defined(OS_WIN)
|
||||
@ -108,13 +109,13 @@ void CefProcessUIThread::Init() {
|
||||
// Load and initialize the stats table. Attempt to construct a somewhat
|
||||
// unique name to isolate separate instances from each other.
|
||||
statstable_ = new StatsTable(
|
||||
kStatsFilePrefix + Uint64ToString(base::RandUint64()),
|
||||
kStatsFilePrefix + base::Uint64ToString(base::RandUint64()),
|
||||
kStatsFileThreads,
|
||||
kStatsFileCounters);
|
||||
StatsTable::set_current(statstable_);
|
||||
|
||||
// CEF always exposes the GC.
|
||||
webkit_glue::SetJavaScriptFlags(L"--expose-gc");
|
||||
webkit_glue::SetJavaScriptFlags("--expose-gc");
|
||||
// Expose GCController to JavaScript.
|
||||
WebKit::WebScriptController::registerExtension(
|
||||
extensions_v8::GCExtension::Get());
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
|
||||
// Copyright (c) 2009 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.
|
||||
|
||||
@ -51,4 +51,21 @@ void ClipboardReadHTML(Clipboard::Buffer buffer, string16* markup, GURL* url) {
|
||||
*url = GURL(url_str);
|
||||
}
|
||||
|
||||
// TODO(dcheng): Implement.
|
||||
bool ClipboardReadAvailableTypes(Clipboard::Buffer buffer,
|
||||
std::vector<string16>* types,
|
||||
bool* contains_filenames) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ClipboardReadData(Clipboard::Buffer buffer, const string16& type,
|
||||
string16* data, string16* metadata) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ClipboardReadFilenames(Clipboard::Buffer buffer,
|
||||
std::vector<string16>* filenames) {
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace webkit_glue
|
||||
|
@ -18,6 +18,7 @@ static const wchar_t kWindowClassName[] = L"WebViewHost";
|
||||
/*static*/
|
||||
WebViewHost* WebViewHost::Create(HWND parent_view,
|
||||
BrowserWebViewDelegate* delegate,
|
||||
WebDevToolsAgentClient* dev_tools_client,
|
||||
const WebPreferences& prefs) {
|
||||
WebViewHost* host = new WebViewHost();
|
||||
|
||||
@ -40,7 +41,7 @@ WebViewHost* WebViewHost::Create(HWND parent_view,
|
||||
GetModuleHandle(NULL), NULL);
|
||||
win_util::SetWindowUserData(host->view_, host);
|
||||
|
||||
host->webwidget_ = WebView::create(delegate);
|
||||
host->webwidget_ = WebView::create(delegate, dev_tools_client);
|
||||
prefs.Apply(host->webview());
|
||||
host->webview()->initializeMainFrame(delegate);
|
||||
|
||||
|
@ -14,6 +14,7 @@ struct WebPreferences;
|
||||
class BrowserWebViewDelegate;
|
||||
|
||||
namespace WebKit {
|
||||
class WebDevToolsAgentClient;
|
||||
class WebView;
|
||||
}
|
||||
|
||||
@ -25,6 +26,7 @@ class WebViewHost : public WebWidgetHost {
|
||||
// MoveWindow (or equivalent) function.
|
||||
static WebViewHost* Create(gfx::NativeView parent_window,
|
||||
BrowserWebViewDelegate* delegate,
|
||||
WebKit::WebDevToolsAgentClient* devtools_client,
|
||||
const WebPreferences& prefs);
|
||||
|
||||
WebKit::WebView* webview() const;
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: common.gypi
|
||||
===================================================================
|
||||
--- common.gypi (revision 50325)
|
||||
--- common.gypi (revision 55388)
|
||||
+++ common.gypi (working copy)
|
||||
@@ -18,6 +18,9 @@
|
||||
@@ -23,6 +23,9 @@
|
||||
# Variables expected to be overriden on the GYP command line (-D) or by
|
||||
# ~/.gyp/include.gypi.
|
||||
|
||||
@ -14,7 +14,7 @@ Index: common.gypi
|
||||
# variables within the outer variables dict here. This is necessary
|
||||
Index: win/system.gyp
|
||||
===================================================================
|
||||
--- win/system.gyp (revision 50325)
|
||||
--- win/system.gyp (revision 55388)
|
||||
+++ win/system.gyp (working copy)
|
||||
@@ -22,6 +22,13 @@
|
||||
'action': ['', '<@(_inputs)'],
|
||||
|
Loading…
x
Reference in New Issue
Block a user