From c56def556958abad46d8cc4055f5e6281a4924d8 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Thu, 21 Jun 2012 20:35:13 +0000 Subject: [PATCH] Update to Chromium revision 140240. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@701 5089003a-bbd8-11dd-ad1f-f1f9622dbc98 --- cef1/CHROMIUM_BUILD_COMPATIBILITY.txt | 2 +- cef1/cef.gyp | 12 ++++--- cef1/libcef/browser_dom_storage_system.cc | 38 +++++++++-------------- cef1/libcef/browser_drag_delegate_win.cc | 4 ++- cef1/libcef/browser_file_system.cc | 9 +++--- cef1/libcef/browser_impl_win.cc | 5 ++- cef1/libcef/browser_request_context.cc | 6 ++-- cef1/libcef/browser_webkit_init.cc | 9 ++---- cef1/libcef/browser_webkit_init.h | 6 ++-- cef1/libcef/cef_context.cc | 18 ++++++----- cef1/libcef/cef_process_ui_thread.cc | 12 ++++--- cef1/libcef/cef_process_ui_thread.h | 7 +++-- cef1/libcef/cookie_manager_impl.cc | 3 +- cef1/patch/patches/base.patch | 6 ++-- cef1/patch/patches/tools_gyp.patch | 20 ++++++------ 15 files changed, 82 insertions(+), 75 deletions(-) diff --git a/cef1/CHROMIUM_BUILD_COMPATIBILITY.txt b/cef1/CHROMIUM_BUILD_COMPATIBILITY.txt index b40442aae..60d16519b 100644 --- a/cef1/CHROMIUM_BUILD_COMPATIBILITY.txt +++ b/cef1/CHROMIUM_BUILD_COMPATIBILITY.txt @@ -17,5 +17,5 @@ { 'chromium_url': 'http://src.chromium.org/svn/trunk/src', - 'chromium_revision': '138235', + 'chromium_revision': '140240', } diff --git a/cef1/cef.gyp b/cef1/cef.gyp index 89cdbe845..faf9fce67 100644 --- a/cef1/cef.gyp +++ b/cef1/cef.gyp @@ -177,7 +177,7 @@ 'pak_inputs': [ '<(grit_out_dir)/devtools_resources.pak', '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak', - '<(SHARED_INTERMEDIATE_DIR)/ui/native_theme/native_theme_resources.pak', + '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources_standard/ui_resources_standard.pak', '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak', '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.pak', ], @@ -257,7 +257,7 @@ 'pak_inputs': [ '<(grit_out_dir)/devtools_resources.pak', '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak', - '<(SHARED_INTERMEDIATE_DIR)/ui/native_theme/native_theme_resources.pak', + '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources_standard/ui_resources_standard.pak', '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak', '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.pak', ], @@ -391,7 +391,7 @@ 'pak_inputs': [ '<(grit_out_dir)/devtools_resources.pak', '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak', - '<(SHARED_INTERMEDIATE_DIR)/ui/native_theme/native_theme_resources.pak', + '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources_standard/ui_resources_standard.pak', '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak', '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.pak', ], @@ -454,7 +454,7 @@ '<(DEPTH)/third_party/WebKit/Source/WebCore/WebCore.gyp/WebCore.gyp:webcore', '<(DEPTH)/third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:webkit', '<(DEPTH)/third_party/zlib/zlib.gyp:zlib', - '<(DEPTH)/ui/ui.gyp:native_theme_resources', + '<(DEPTH)/ui/ui.gyp:ui_resources_standard', '<(DEPTH)/ui/ui.gyp:ui', '<(DEPTH)/v8/tools/gyp/v8.gyp:v8', '<(DEPTH)/webkit/support/webkit_support.gyp:appcache', @@ -639,7 +639,7 @@ '<(DEPTH)/third_party/WebKit/Source/WebCore/WebCore.gyp/WebCore.gyp:webcore', '<(DEPTH)/third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:webkit', '<(DEPTH)/third_party/zlib/zlib.gyp:zlib', - '<(DEPTH)/ui/ui.gyp:native_theme_resources', + '<(DEPTH)/ui/ui.gyp:ui_resources_standard', '<(DEPTH)/ui/ui.gyp:ui', '<(DEPTH)/v8/tools/gyp/v8.gyp:v8', '<(DEPTH)/webkit/support/webkit_support.gyp:appcache', @@ -772,6 +772,8 @@ 'libcef/xml_reader_impl.h', 'libcef/zip_reader_impl.cc', 'libcef/zip_reader_impl.h', + '<(DEPTH)/chrome/browser/net/clear_on_exit_policy.cc', + '<(DEPTH)/chrome/browser/net/clear_on_exit_policy.h', '<(DEPTH)/chrome/browser/net/sqlite_persistent_cookie_store.cc', '<(DEPTH)/chrome/browser/net/sqlite_persistent_cookie_store.h', # DevTools resource IDs generated by grit diff --git a/cef1/libcef/browser_dom_storage_system.cc b/cef1/libcef/browser_dom_storage_system.cc index c2de1823b..7a99a2972 100644 --- a/cef1/libcef/browser_dom_storage_system.cc +++ b/cef1/libcef/browser_dom_storage_system.cc @@ -58,10 +58,10 @@ class BrowserDomStorageSystem::AreaImpl : public WebStorageArea { virtual WebString key(unsigned index) OVERRIDE; virtual WebString getItem(const WebString& key) OVERRIDE; virtual void setItem(const WebString& key, const WebString& newValue, - const WebURL&, Result&, WebString& oldValue) OVERRIDE; - virtual void removeItem(const WebString& key, const WebURL& url, - WebString& oldValue) OVERRIDE; - virtual void clear(const WebURL& url, bool& somethingCleared) OVERRIDE; + const WebURL& pageUrl, Result&) OVERRIDE; + virtual void removeItem(const WebString& key, + const WebURL& pageUrl) OVERRIDE; + virtual void clear(const WebURL& pageUrl) OVERRIDE; private: DomStorageHost* Host() { @@ -156,44 +156,36 @@ WebString BrowserDomStorageSystem::AreaImpl::getItem(const WebString& key) { void BrowserDomStorageSystem::AreaImpl::setItem( const WebString& key, const WebString& newValue, - const WebURL& pageUrl, Result& result, WebString& oldValue) { + const WebURL& pageUrl, Result& result) { result = ResultBlockedByQuota; - oldValue = NullableString16(true); if (!Host()) return; AutoReset auto_reset(&parent_->area_being_processed_, this); - NullableString16 old_value; + NullableString16 unused; if (!Host()->SetAreaItem(connection_id_, key, newValue, pageUrl, - &old_value)) + &unused)) return; result = ResultOK; - oldValue = old_value; } void BrowserDomStorageSystem::AreaImpl::removeItem( - const WebString& key, const WebURL& pageUrl, WebString& oldValue) { - oldValue = NullableString16(true); + const WebString& key, const WebURL& pageUrl) { if (!Host()) return; AutoReset auto_reset(&parent_->area_being_processed_, this); - string16 old_value; - if (!Host()->RemoveAreaItem(connection_id_, key, pageUrl, &old_value)) - return; - - oldValue = old_value; + string16 notused; + Host()->RemoveAreaItem(connection_id_, key, pageUrl, ¬used); } -void BrowserDomStorageSystem::AreaImpl::clear( - const WebURL& pageUrl, bool& somethingCleared) { - if (Host()) { - AutoReset auto_reset(&parent_->area_being_processed_, this); - somethingCleared = Host()->ClearArea(connection_id_, pageUrl); +void BrowserDomStorageSystem::AreaImpl::clear(const WebURL& pageUrl) { + if (!Host()) return; - } - somethingCleared = false; + + AutoReset auto_reset(&parent_->area_being_processed_, this); + Host()->ClearArea(connection_id_, pageUrl); } // BrowserDomStorageSystem ----------------------------- diff --git a/cef1/libcef/browser_drag_delegate_win.cc b/cef1/libcef/browser_drag_delegate_win.cc index 0f314903c..df000450d 100644 --- a/cef1/libcef/browser_drag_delegate_win.cc +++ b/cef1/libcef/browser_drag_delegate_win.cc @@ -26,6 +26,7 @@ #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" #include "ui/base/dragdrop/drag_utils.h" +#include "ui/gfx/image/image_skia.h" #include "webkit/glue/webdropdata.h" using WebKit::WebDragOperationsMask; @@ -291,7 +292,8 @@ void BrowserDragDelegate::DoDragging(const WebDropData& drop_data, // Set drag image. if (!image.isNull()) { drag_utils::SetDragImageOnDataObject( - image, gfx::Size(image.width(), image.height()), image_offset, &data); + gfx::ImageSkia(image), gfx::Size(image.width(), image.height()), + image_offset, &data); } // We need to enable recursive tasks on the message loop so we can get diff --git a/cef1/libcef/browser_file_system.cc b/cef1/libcef/browser_file_system.cc index 25a6351dc..43bb4fbe2 100644 --- a/cef1/libcef/browser_file_system.cc +++ b/cef1/libcef/browser_file_system.cc @@ -23,6 +23,7 @@ #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h" #include "webkit/blob/blob_storage_controller.h" +#include "webkit/fileapi/file_system_util.h" #include "webkit/fileapi/mock_file_system_options.h" #include "webkit/glue/webkit_glue.h" @@ -249,7 +250,7 @@ void BrowserFileSystem::DidFinish(WebFileSystemCallbacks* callbacks, if (result == base::PLATFORM_FILE_OK) callbacks->didSucceed(); else - callbacks->didFail(webkit_glue::PlatformFileErrorToWebFileError(result)); + callbacks->didFail(fileapi::PlatformFileErrorToWebFileError(result)); } void BrowserFileSystem::DidGetMetadata(WebFileSystemCallbacks* callbacks, @@ -266,7 +267,7 @@ void BrowserFileSystem::DidGetMetadata(WebFileSystemCallbacks* callbacks, webkit_glue::FilePathToWebString(platform_path); callbacks->didReadMetadata(web_file_info); } else { - callbacks->didFail(webkit_glue::PlatformFileErrorToWebFileError(result)); + callbacks->didFail(fileapi::PlatformFileErrorToWebFileError(result)); } } @@ -287,7 +288,7 @@ void BrowserFileSystem::DidReadDirectory( WebVector web_entries = web_entries_vector; callbacks->didReadDirectory(web_entries, has_more); } else { - callbacks->didFail(webkit_glue::PlatformFileErrorToWebFileError(result)); + callbacks->didFail(fileapi::PlatformFileErrorToWebFileError(result)); } } @@ -301,7 +302,7 @@ void BrowserFileSystem::DidOpenFileSystem( else callbacks->didOpenFileSystem(WebString::fromUTF8(name), root); } else { - callbacks->didFail(webkit_glue::PlatformFileErrorToWebFileError(result)); + callbacks->didFail(fileapi::PlatformFileErrorToWebFileError(result)); } } diff --git a/cef1/libcef/browser_impl_win.cc b/cef1/libcef/browser_impl_win.cc index 98660d21f..f86cac7ff 100644 --- a/cef1/libcef/browser_impl_win.cc +++ b/cef1/libcef/browser_impl_win.cc @@ -20,6 +20,7 @@ #include "skia/ext/vector_platform_device_emf_win.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebPrintParams.h" #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h" #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" @@ -525,7 +526,9 @@ void CefBrowserImpl::UIT_PrintPages(WebKit::WebFrame* frame) { settings.page_setup_pixels().content_area().height(), static_cast(params.dpi), params.desired_dpi)); - page_count = frame->printBegin(WebSize(canvas_size)); + WebKit::WebPrintParams printParams( + WebSize(canvas_size.width(), canvas_size.height())); + page_count = frame->printBegin(printParams); if (page_count) { bool old_state = MessageLoop::current()->NestableTasksAllowed(); diff --git a/cef1/libcef/browser_request_context.cc b/cef1/libcef/browser_request_context.cc index d7dc551bc..6e3d28308 100644 --- a/cef1/libcef/browser_request_context.cc +++ b/cef1/libcef/browser_request_context.cc @@ -17,6 +17,7 @@ #include "base/compiler_specific.h" #include "base/file_path.h" #include "base/file_util.h" +#include "base/thread_task_runner_handle.h" #include "base/threading/worker_pool.h" #include "build/build_config.h" #include "chrome/browser/net/sqlite_persistent_cookie_store.h" @@ -122,7 +123,7 @@ net::ProxyConfigService* CreateProxyConfigService() { #else // Use the system proxy settings. return net::ProxyService::CreateSystemProxyConfigService( - MessageLoop::current(), NULL); + base::ThreadTaskRunnerHandle::Get(), NULL); #endif } @@ -300,7 +301,8 @@ void BrowserRequestContext::SetCookieStoragePath(const FilePath& path) { new_path.clear(); } else { FilePath cookie_path = new_path.Append(FILE_PATH_LITERAL("Cookies")); - persistent_store = new SQLitePersistentCookieStore(cookie_path, false); + persistent_store = + new SQLitePersistentCookieStore(cookie_path, false, NULL); } } diff --git a/cef1/libcef/browser_webkit_init.cc b/cef1/libcef/browser_webkit_init.cc index e6d0afc60..7174a8720 100644 --- a/cef1/libcef/browser_webkit_init.cc +++ b/cef1/libcef/browser_webkit_init.cc @@ -259,15 +259,12 @@ string16 BrowserWebKitInit::GetLocalizedString(int message_id) { return _Context->GetLocalizedString(message_id); } -base::StringPiece BrowserWebKitInit::GetDataResource(int resource_id) { +base::StringPiece BrowserWebKitInit::GetDataResource( + int resource_id, + ui::ScaleFactor scale_factor) { return _Context->GetDataResource(resource_id); } -base::StringPiece BrowserWebKitInit::GetImageResource(int resource_id, - float scale_factor) { - return GetDataResource(resource_id); -} - webkit_glue::ResourceLoaderBridge* BrowserWebKitInit::CreateResourceLoader( const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) { return BrowserResourceLoaderBridge::Create(request_info); diff --git a/cef1/libcef/browser_webkit_init.h b/cef1/libcef/browser_webkit_init.h index 5d8cad3ac..3f0c1c439 100644 --- a/cef1/libcef/browser_webkit_init.h +++ b/cef1/libcef/browser_webkit_init.h @@ -78,9 +78,9 @@ class BrowserWebKitInit : public webkit_glue::WebKitPlatformSupportImpl { virtual WebKit::WebGraphicsContext3D* createOffscreenGraphicsContext3D( const WebKit::WebGraphicsContext3D::Attributes& attributes) OVERRIDE; virtual string16 GetLocalizedString(int message_id) OVERRIDE; - virtual base::StringPiece GetDataResource(int resource_id) OVERRIDE; - virtual base::StringPiece GetImageResource(int resource_id, - float scale_factor) OVERRIDE; + virtual base::StringPiece GetDataResource( + int resource_id, + ui::ScaleFactor scale_factor) OVERRIDE; virtual void GetPlugins(bool refresh, std::vector* plugins) OVERRIDE; virtual webkit_glue::ResourceLoaderBridge* CreateResourceLoader( diff --git a/cef1/libcef/cef_context.cc b/cef1/libcef/cef_context.cc index 4ac1a8daa..852f3749f 100644 --- a/cef1/libcef/cef_context.cc +++ b/cef1/libcef/cef_context.cc @@ -12,7 +12,6 @@ #include "base/path_service.h" #include "base/synchronization/waitable_event.h" #include "ui/base/resource/resource_bundle.h" -#include "ui/base/resource/resource_handle.h" #include "ui/base/ui_base_paths.h" #if defined(OS_MACOSX) || defined(OS_WIN) @@ -104,8 +103,9 @@ class CefResourceBundleDelegate : public ui::ResourceBundle::Delegate { void set_allow_pack_file_load(bool val) { allow_pack_file_load_ = val; } private: - virtual FilePath GetPathForResourcePack(const FilePath& pack_path, - float scale_factor) OVERRIDE { + virtual FilePath GetPathForResourcePack( + const FilePath& pack_path, + ui::ScaleFactor scale_factor) OVERRIDE { // Only allow the cef pack file to load. if (!context_->settings().pack_loading_disabled && allow_pack_file_load_) return pack_path; @@ -130,11 +130,13 @@ class CefResourceBundleDelegate : public ui::ResourceBundle::Delegate { } virtual base::RefCountedStaticMemory* LoadDataResourceBytes( - int resource_id) OVERRIDE { + int resource_id, + ui::ScaleFactor scale_factor) OVERRIDE { return NULL; } virtual bool GetRawDataResource(int resource_id, + ui::ScaleFactor scale_factor, base::StringPiece* value) OVERRIDE { return false; } @@ -421,7 +423,7 @@ void CefContext::InitializeResourceBundle() { if (file_util::PathExists(pak_file)) { resource_bundle_delegate_->set_allow_pack_file_load(true); ResourceBundle::GetSharedInstance().AddDataPack( - pak_file, ui::ResourceHandle::kScaleFactor100x); + pak_file, ui::SCALE_FACTOR_NONE); resource_bundle_delegate_->set_allow_pack_file_load(false); } else { NOTREACHED() << "Could not load chrome.pak"; @@ -523,8 +525,10 @@ base::StringPiece CefContext::GetDataResource(int resource_id) const { } #endif // defined(OS_MACOSX) - if (value.empty() && !settings_.pack_loading_disabled) - value = ResourceBundle::GetSharedInstance().GetRawDataResource(resource_id); + if (value.empty() && !settings_.pack_loading_disabled) { + value = ResourceBundle::GetSharedInstance().GetRawDataResource( + resource_id, ui::SCALE_FACTOR_NONE); + } if (value.empty()) LOG(ERROR) << "No data resource available for id " << resource_id; diff --git a/cef1/libcef/cef_process_ui_thread.cc b/cef1/libcef/cef_process_ui_thread.cc index 5b9e35e8f..ea23d1d01 100644 --- a/cef1/libcef/cef_process_ui_thread.cc +++ b/cef1/libcef/cef_process_ui_thread.cc @@ -167,8 +167,8 @@ void CefProcessUIThread::Init() { // Create a network change notifier before starting the IO & File threads. network_change_notifier_.reset(net::NetworkChangeNotifier::Create()); - // Add a listener for OnOnlineStateChanged to notify WebKit of changes. - net::NetworkChangeNotifier::AddOnlineStateObserver(this); + // Add a listener for OnConnectionTypeChanged to notify WebKit of changes. + net::NetworkChangeNotifier::AddConnectionTypeObserver(this); // Initialize WebKit with the current state. WebKit::WebNetworkStateNotifier::setOnLine( @@ -191,7 +191,7 @@ void CefProcessUIThread::CleanUp() { webkit_init_ = NULL; // Release the network change notifier after all other threads end. - net::NetworkChangeNotifier::RemoveOnlineStateObserver(this); + net::NetworkChangeNotifier::RemoveConnectionTypeObserver(this); network_change_notifier_.reset(); PlatformCleanUp(); @@ -199,8 +199,10 @@ void CefProcessUIThread::CleanUp() { _Context->CleanupResourceBundle(); } -void CefProcessUIThread::OnOnlineStateChanged(bool online) { +void CefProcessUIThread::OnConnectionTypeChanged( + net::NetworkChangeNotifier::ConnectionType type) { DCHECK(CefThread::CurrentlyOn(CefThread::UI)); - WebKit::WebNetworkStateNotifier::setOnLine(online); + WebKit::WebNetworkStateNotifier::setOnLine( + type != net::NetworkChangeNotifier::CONNECTION_NONE); } diff --git a/cef1/libcef/cef_process_ui_thread.h b/cef1/libcef/cef_process_ui_thread.h index 2c728bb92..a2d19621f 100644 --- a/cef1/libcef/cef_process_ui_thread.h +++ b/cef1/libcef/cef_process_ui_thread.h @@ -28,7 +28,7 @@ class StatsTable; // COM library functions other than CoGetMalloc and memory allocation // functions, so this class initializes COM for those users. class CefProcessUIThread - : public net::NetworkChangeNotifier::OnlineStateObserver, + : public net::NetworkChangeNotifier::ConnectionTypeObserver, public CefThread { public: CefProcessUIThread(); @@ -42,8 +42,9 @@ class CefProcessUIThread void PlatformInit(); void PlatformCleanUp(); - // From net::NetworkChangeNotifier::OnlineStateObserver - void OnOnlineStateChanged(bool online); + // From net::NetworkChangeNotifier::ConnectionTypeObserver + virtual void OnConnectionTypeChanged( + net::NetworkChangeNotifier::ConnectionType type); base::StatsTable* statstable_; diff --git a/cef1/libcef/cookie_manager_impl.cc b/cef1/libcef/cookie_manager_impl.cc index 4ab7b82e8..e872110c6 100644 --- a/cef1/libcef/cookie_manager_impl.cc +++ b/cef1/libcef/cookie_manager_impl.cc @@ -233,7 +233,8 @@ bool CefCookieManagerImpl::SetStoragePath(const CefString& path) { new_path.clear(); } else { FilePath cookie_path = new_path.Append(FILE_PATH_LITERAL("Cookies")); - persistent_store = new SQLitePersistentCookieStore(cookie_path, false); + persistent_store = + new SQLitePersistentCookieStore(cookie_path, false, NULL); } } diff --git a/cef1/patch/patches/base.patch b/cef1/patch/patches/base.patch index 50c749f8b..249de41f2 100644 --- a/cef1/patch/patches/base.patch +++ b/cef1/patch/patches/base.patch @@ -1,8 +1,8 @@ Index: message_loop.cc =================================================================== ---- message_loop.cc (revision 138235) +--- message_loop.cc (revision 140240) +++ message_loop.cc (working copy) -@@ -367,9 +367,13 @@ +@@ -369,9 +369,13 @@ } void MessageLoop::AssertIdle() const { @@ -19,7 +19,7 @@ Index: message_loop.cc bool MessageLoop::is_running() const { Index: message_loop.h =================================================================== ---- message_loop.h (revision 138235) +--- message_loop.h (revision 140240) +++ message_loop.h (working copy) @@ -347,6 +347,9 @@ // Asserts that the MessageLoop is "idle". diff --git a/cef1/patch/patches/tools_gyp.patch b/cef1/patch/patches/tools_gyp.patch index a56189f33..77beae74f 100644 --- a/cef1/patch/patches/tools_gyp.patch +++ b/cef1/patch/patches/tools_gyp.patch @@ -1,14 +1,14 @@ Index: pylib/gyp/input.py =================================================================== ---- pylib/gyp/input.py (revision 1386) +--- pylib/gyp/input.py (revision 1402) +++ pylib/gyp/input.py (working copy) -@@ -683,7 +683,8 @@ - # that don't load quickly, this can be faster than - #