From 116b6de654a09dcccc82e8f6861d3608dd0082eb Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Mon, 25 Feb 2013 23:44:37 +0000 Subject: [PATCH] Update to Chromium revision 181864. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1108 5089003a-bbd8-11dd-ad1f-f1f9622dbc98 --- cef1/CHROMIUM_BUILD_COMPATIBILITY.txt | 2 +- cef1/libcef/browser_appcache_system.cc | 48 ++++++++++--------- cef1/libcef/browser_appcache_system.h | 6 +-- cef1/libcef/browser_database_system.cc | 8 ++-- cef1/libcef/browser_database_system.h | 2 +- cef1/libcef/browser_devtools_callargs.h | 2 +- cef1/libcef/browser_devtools_client.cc | 2 +- .../libcef/browser_devtools_scheme_handler.cc | 2 +- cef1/libcef/browser_dom_storage_system.cc | 8 ++-- cef1/libcef/browser_drag_delegate_win.cc | 18 +++---- cef1/libcef/browser_drag_delegate_win.h | 8 ++-- cef1/libcef/browser_file_system.cc | 40 ++++++++-------- cef1/libcef/browser_file_system.h | 8 ++-- cef1/libcef/browser_file_writer.cc | 5 +- cef1/libcef/browser_file_writer.h | 1 + cef1/libcef/browser_impl.cc | 10 ++-- cef1/libcef/browser_impl_gtk.cc | 4 +- cef1/libcef/browser_impl_mac.mm | 4 +- cef1/libcef/browser_impl_win.cc | 4 +- cef1/libcef/browser_navigation_controller.h | 2 +- cef1/libcef/browser_network_delegate.cc | 5 +- cef1/libcef/browser_network_delegate.h | 2 +- cef1/libcef/browser_request_context.cc | 17 +++---- cef1/libcef/browser_request_context.h | 10 ++-- cef1/libcef/browser_resource_loader_bridge.cc | 3 +- cef1/libcef/browser_socket_stream_bridge.cc | 16 +++---- cef1/libcef/browser_webblobregistry_impl.cc | 4 +- cef1/libcef/browser_webblobregistry_impl.h | 2 +- cef1/libcef/browser_webcookiejar_impl.cc | 2 +- cef1/libcef/browser_webcookiejar_impl.h | 2 +- cef1/libcef/browser_webkit_glue.cc | 2 +- cef1/libcef/browser_webkit_glue.h | 2 +- cef1/libcef/browser_webkit_init.cc | 4 +- cef1/libcef/browser_webkit_init.h | 2 +- cef1/libcef/browser_webview_delegate.cc | 24 +++++----- cef1/libcef/browser_webview_delegate.h | 15 +++--- cef1/libcef/browser_webview_delegate_gtk.cc | 26 +++++----- cef1/libcef/browser_webview_delegate_mac.mm | 18 +++---- cef1/libcef/browser_webview_delegate_win.cc | 42 ++++++++-------- cef1/libcef/cef_context.cc | 36 +++++++------- cef1/libcef/cef_context.h | 6 +-- cef1/libcef/cef_process.cc | 31 ++---------- cef1/libcef/cef_process_io_thread.cc | 2 +- cef1/libcef/cef_process_ui_thread.cc | 6 +-- cef1/libcef/command_line_impl.cc | 2 +- cef1/libcef/cookie_manager_impl.cc | 6 +-- cef1/libcef/cookie_manager_impl.h | 2 +- cef1/libcef/dom_document_impl.cc | 4 +- cef1/libcef/dom_event_impl.cc | 2 +- cef1/libcef/dom_node_impl.cc | 2 +- cef1/libcef/download_util.cc | 28 ++++++----- cef1/libcef/download_util.h | 5 +- cef1/libcef/drag_download_file.cc | 2 +- cef1/libcef/drag_download_file.h | 8 ++-- cef1/libcef/drag_download_util.cc | 13 ++--- cef1/libcef/drag_download_util.h | 12 +++-- cef1/libcef/external_popup_menu_mac.mm | 2 +- cef1/libcef/geolocation_client.cc | 2 +- cef1/libcef/http_header_utils.h | 4 +- cef1/libcef/nplugin_impl.cc | 2 +- cef1/libcef/origin_whitelist_impl.cc | 4 +- cef1/libcef/request_impl.cc | 6 +-- cef1/libcef/request_impl.h | 2 +- cef1/libcef/response_impl.cc | 4 +- cef1/libcef/scheme_impl.cc | 2 +- cef1/libcef/web_drag_source_gtk.cc | 12 ++--- cef1/libcef/web_drag_source_gtk.h | 2 +- cef1/libcef/web_drag_source_mac.h | 2 +- cef1/libcef/web_drag_source_mac.mm | 23 ++++----- cef1/libcef/web_drag_source_win.cc | 2 +- cef1/libcef/web_drag_utils_mac.mm | 2 +- cef1/libcef/web_drop_target_gtk.cc | 8 ++-- cef1/libcef/web_drop_target_mac.mm | 6 +-- cef1/libcef/web_drop_target_win.cc | 6 +-- cef1/libcef/web_urlrequest_impl.cc | 8 ++-- cef1/libcef/webview_host_mac.mm | 2 +- cef1/libcef/webwidget_host.cc | 2 +- cef1/libcef/webwidget_host.h | 2 +- cef1/libcef/webwidget_host_gtk.cc | 2 +- cef1/libcef/webwidget_host_mac.mm | 2 +- cef1/libcef/webwidget_host_win.cc | 8 ++-- cef1/patch/patch.cfg | 5 ++ cef1/patch/patches/message_loop_443.patch | 13 +++++ 83 files changed, 356 insertions(+), 328 deletions(-) create mode 100644 cef1/patch/patches/message_loop_443.patch diff --git a/cef1/CHROMIUM_BUILD_COMPATIBILITY.txt b/cef1/CHROMIUM_BUILD_COMPATIBILITY.txt index 49fa2799c..e8a708410 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': '176706', + 'chromium_revision': '181864', } diff --git a/cef1/libcef/browser_appcache_system.cc b/cef1/libcef/browser_appcache_system.cc index 5d39cf6d0..9948bb82a 100644 --- a/cef1/libcef/browser_appcache_system.cc +++ b/cef1/libcef/browser_appcache_system.cc @@ -35,7 +35,7 @@ class BrowserFrontendProxy void clear_appcache_system() { system_ = NULL; } virtual void OnCacheSelected(int host_id, - const appcache::AppCacheInfo& info) { + const appcache::AppCacheInfo& info) OVERRIDE { if (!system_) return; if (system_->is_io_thread()) { @@ -51,7 +51,7 @@ class BrowserFrontendProxy } virtual void OnStatusChanged(const std::vector& host_ids, - appcache::Status status) { + appcache::Status status) OVERRIDE { if (!system_) return; if (system_->is_io_thread()) @@ -66,7 +66,7 @@ class BrowserFrontendProxy } virtual void OnEventRaised(const std::vector& host_ids, - appcache::EventID event_id) { + appcache::EventID event_id) OVERRIDE { if (!system_) return; if (system_->is_io_thread()) @@ -82,7 +82,7 @@ class BrowserFrontendProxy virtual void OnProgressEventRaised(const std::vector& host_ids, const GURL& url, - int num_total, int num_complete) { + int num_total, int num_complete) OVERRIDE { if (!system_) return; if (system_->is_io_thread()) @@ -98,7 +98,7 @@ class BrowserFrontendProxy } virtual void OnErrorEventRaised(const std::vector& host_ids, - const std::string& message) { + const std::string& message) OVERRIDE { if (!system_) return; if (system_->is_io_thread()) @@ -115,7 +115,7 @@ class BrowserFrontendProxy virtual void OnLogMessage(int host_id, appcache::LogLevel log_level, - const std::string& message) { + const std::string& message) OVERRIDE { if (!system_) return; if (system_->is_io_thread()) @@ -130,12 +130,13 @@ class BrowserFrontendProxy NOTREACHED(); } - virtual void OnContentBlocked(int host_id, const GURL& manifest_url) {} + virtual void OnContentBlocked(int host_id, + const GURL& manifest_url) OVERRIDE {} private: friend class base::RefCountedThreadSafe; - ~BrowserFrontendProxy() {} + virtual ~BrowserFrontendProxy() {} BrowserAppCacheSystem* system_; }; @@ -161,7 +162,7 @@ class BrowserBackendProxy base::Unretained(this)); } - virtual void RegisterHost(int host_id) { + virtual void RegisterHost(int host_id) OVERRIDE { if (system_->is_ui_thread()) { system_->io_message_loop()->PostTask( FROM_HERE, @@ -173,7 +174,7 @@ class BrowserBackendProxy } } - virtual void UnregisterHost(int host_id) { + virtual void UnregisterHost(int host_id) OVERRIDE { if (system_->is_ui_thread()) { system_->io_message_loop()->PostTask( FROM_HERE, @@ -185,7 +186,7 @@ class BrowserBackendProxy } } - virtual void SetSpawningHostId(int host_id, int spawning_host_id) { + virtual void SetSpawningHostId(int host_id, int spawning_host_id) OVERRIDE { if (system_->is_ui_thread()) { system_->io_message_loop()->PostTask( FROM_HERE, @@ -201,7 +202,7 @@ class BrowserBackendProxy virtual void SelectCache(int host_id, const GURL& document_url, const int64 cache_document_was_loaded_from, - const GURL& manifest_url) { + const GURL& manifest_url) OVERRIDE { if (system_->is_ui_thread()) { system_->io_message_loop()->PostTask( FROM_HERE, @@ -219,7 +220,7 @@ class BrowserBackendProxy virtual void GetResourceList( int host_id, - std::vector* resource_infos) { + std::vector* resource_infos) OVERRIDE { if (system_->is_ui_thread()) { system_->io_message_loop()->PostTask( FROM_HERE, @@ -235,18 +236,20 @@ class BrowserBackendProxy virtual void SelectCacheForWorker( int host_id, int parent_process_id, - int parent_host_id) { + int parent_host_id) OVERRIDE { NOTIMPLEMENTED(); // Workers are not supported in test_shell. } virtual void SelectCacheForSharedWorker( int host_id, - int64 appcache_id) { + int64 appcache_id) OVERRIDE { NOTIMPLEMENTED(); // Workers are not supported in test_shell. } - virtual void MarkAsForeignEntry(int host_id, const GURL& document_url, - int64 cache_document_was_loaded_from) { + virtual void MarkAsForeignEntry( + int host_id, + const GURL& document_url, + int64 cache_document_was_loaded_from) OVERRIDE { if (system_->is_ui_thread()) { system_->io_message_loop()->PostTask( FROM_HERE, @@ -261,7 +264,7 @@ class BrowserBackendProxy } } - virtual appcache::Status GetStatus(int host_id) { + virtual appcache::Status GetStatus(int host_id) OVERRIDE { if (system_->is_ui_thread()) { status_result_ = appcache::UNCACHED; event_.Reset(); @@ -279,7 +282,7 @@ class BrowserBackendProxy return status_result_; } - virtual bool StartUpdate(int host_id) { + virtual bool StartUpdate(int host_id) OVERRIDE { if (system_->is_ui_thread()) { bool_result_ = false; event_.Reset(); @@ -297,7 +300,7 @@ class BrowserBackendProxy return bool_result_; } - virtual bool SwapCache(int host_id) { + virtual bool SwapCache(int host_id) OVERRIDE { if (system_->is_ui_thread()) { bool_result_ = false; event_.Reset(); @@ -337,7 +340,7 @@ class BrowserBackendProxy private: friend class base::RefCountedThreadSafe; - ~BrowserBackendProxy() {} + virtual ~BrowserBackendProxy() {} BrowserAppCacheSystem* system_; base::WaitableEvent event_; @@ -387,7 +390,8 @@ BrowserAppCacheSystem::~BrowserAppCacheSystem() { } } -void BrowserAppCacheSystem::InitOnUIThread(const FilePath& cache_directory) { +void BrowserAppCacheSystem::InitOnUIThread( + const base::FilePath& cache_directory) { DCHECK(!ui_message_loop_); ui_message_loop_ = MessageLoop::current(); cache_directory_ = cache_directory; diff --git a/cef1/libcef/browser_appcache_system.h b/cef1/libcef/browser_appcache_system.h index cf2cbac04..585a3ba49 100644 --- a/cef1/libcef/browser_appcache_system.h +++ b/cef1/libcef/browser_appcache_system.h @@ -39,7 +39,7 @@ class BrowserAppCacheSystem { virtual ~BrowserAppCacheSystem(); // One-time main UI thread initialization. - static void InitializeOnUIThread(const FilePath& cache_directory) { + static void InitializeOnUIThread(const base::FilePath& cache_directory) { if (instance_) instance_->InitOnUIThread(cache_directory); } @@ -86,7 +86,7 @@ class BrowserAppCacheSystem { friend class BrowserFrontendProxy; // Instance methods called by our static public methods - void InitOnUIThread(const FilePath& cache_directory); + void InitOnUIThread(const base::FilePath& cache_directory); void InitOnIOThread(net::URLRequestContext* request_context); void CleanupIOThread(); WebKit::WebApplicationCacheHost* CreateCacheHostForWebKit( @@ -110,7 +110,7 @@ class BrowserAppCacheSystem { return ui_message_loop_ ? true : false; } - FilePath cache_directory_; + base::FilePath cache_directory_; MessageLoop* io_message_loop_; MessageLoop* ui_message_loop_; scoped_refptr backend_proxy_; diff --git a/cef1/libcef/browser_database_system.cc b/cef1/libcef/browser_database_system.cc index 3bfc0bfb4..078cca550 100644 --- a/cef1/libcef/browser_database_system.cc +++ b/cef1/libcef/browser_database_system.cc @@ -15,8 +15,8 @@ #include "base/threading/platform_thread.h" #include "base/utf_string_conversions.h" #include "third_party/sqlite/sqlite3.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDatabase.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" #include "webkit/database/database_util.h" #include "webkit/database/vfs_backend.h" @@ -223,7 +223,7 @@ void BrowserDatabaseSystem::VfsOpenFile( const string16& vfs_file_name, int desired_flags, base::PlatformFile* file_handle, base::WaitableEvent* done_event ) { DCHECK(db_thread_proxy_->BelongsToCurrentThread()); - FilePath file_name = GetFullFilePathForVfsFile(vfs_file_name); + base::FilePath file_name = GetFullFilePathForVfsFile(vfs_file_name); if (file_name.empty()) { VfsBackend::OpenTempFileInDirectory( db_tracker_->DatabaseDirectory(), desired_flags, file_handle); @@ -243,7 +243,7 @@ void BrowserDatabaseSystem::VfsDeleteFile( const int kNumDeleteRetries = 3; int num_retries = 0; *result = SQLITE_OK; - FilePath file_name = GetFullFilePathForVfsFile(vfs_file_name); + base::FilePath file_name = GetFullFilePathForVfsFile(vfs_file_name); do { *result = VfsBackend::DeleteFile(file_name, sync_dir); } while ((++num_retries < kNumDeleteRetries) && @@ -293,7 +293,7 @@ FilePath BrowserDatabaseSystem::GetFullFilePathForVfsFile( const string16& vfs_file_name) { DCHECK(db_thread_proxy_->BelongsToCurrentThread()); if (vfs_file_name.empty()) // temp file, used for vacuuming - return FilePath(); + return base::FilePath(); return DatabaseUtil::GetFullFilePathForVfsFile( db_tracker_.get(), vfs_file_name); } diff --git a/cef1/libcef/browser_database_system.h b/cef1/libcef/browser_database_system.h index 148da124a..ad58c2a1f 100644 --- a/cef1/libcef/browser_database_system.h +++ b/cef1/libcef/browser_database_system.h @@ -80,7 +80,7 @@ class BrowserDatabaseSystem : public webkit_database::DatabaseTracker::Observer, void VfsGetSpaceAvailable(const string16& origin_identifier, int64* result, base::WaitableEvent* done_event); - FilePath GetFullFilePathForVfsFile(const string16& vfs_file_name); + base::FilePath GetFullFilePathForVfsFile(const string16& vfs_file_name); void ResetTracker(); void ThreadCleanup(base::WaitableEvent* done_event); diff --git a/cef1/libcef/browser_devtools_callargs.h b/cef1/libcef/browser_devtools_callargs.h index b53de58df..4bccb5961 100644 --- a/cef1/libcef/browser_devtools_callargs.h +++ b/cef1/libcef/browser_devtools_callargs.h @@ -8,7 +8,7 @@ #include "base/basictypes.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" class BrowserDevToolsCallArgs { public: diff --git a/cef1/libcef/browser_devtools_client.cc b/cef1/libcef/browser_devtools_client.cc index 770df0312..766d4d406 100644 --- a/cef1/libcef/browser_devtools_client.cc +++ b/cef1/libcef/browser_devtools_client.cc @@ -8,10 +8,10 @@ #include "libcef/browser_impl.h" #include "libcef/cef_context.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsAgent.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsFrontend.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptSource.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" diff --git a/cef1/libcef/browser_devtools_scheme_handler.cc b/cef1/libcef/browser_devtools_scheme_handler.cc index 47645ed16..95df96e68 100644 --- a/cef1/libcef/browser_devtools_scheme_handler.cc +++ b/cef1/libcef/browser_devtools_scheme_handler.cc @@ -48,7 +48,7 @@ class DevToolsSchemeHandler : public CefSchemeHandler { response_length = size_; std::string mime_type = "text/plain"; - if (net::GetMimeTypeFromFile(FilePath(CefString(path_)), &mime_type)) + if (net::GetMimeTypeFromFile(base::FilePath(CefString(path_)), &mime_type)) response->SetMimeType(mime_type); response->SetStatus(200); diff --git a/cef1/libcef/browser_dom_storage_system.cc b/cef1/libcef/browser_dom_storage_system.cc index 3dd9b12ad..1c41cdfbc 100644 --- a/cef1/libcef/browser_dom_storage_system.cc +++ b/cef1/libcef/browser_dom_storage_system.cc @@ -9,7 +9,7 @@ #include "base/auto_reset.h" #include "base/path_service.h" #include "googleurl/src/gurl.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageArea.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageEventDispatcher.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageNamespace.h" @@ -201,8 +201,8 @@ BrowserDomStorageSystem::BrowserDomStorageSystem() : weak_factory_(this), area_being_processed_(NULL), next_connection_id_(1) { - FilePath local_storage_path; - FilePath cache_path(_Context->cache_path()); + base::FilePath local_storage_path; + base::FilePath cache_path(_Context->cache_path()); if (!cache_path.empty()) { local_storage_path = cache_path.Append(FILE_PATH_LITERAL("Local Storage")); if (!file_util::PathExists(local_storage_path) && @@ -214,7 +214,7 @@ BrowserDomStorageSystem::BrowserDomStorageSystem() base::SequencedWorkerPool* worker_pool = _Context->blocking_pool(); - context_ = new DomStorageContext(local_storage_path, FilePath(), NULL, + context_ = new DomStorageContext(local_storage_path, base::FilePath(), NULL, new DomStorageWorkerPoolTaskRunner( worker_pool, worker_pool->GetNamedSequenceToken("dom_storage_primary"), diff --git a/cef1/libcef/browser_drag_delegate_win.cc b/cef1/libcef/browser_drag_delegate_win.cc index d7a3b124a..437897a38 100644 --- a/cef1/libcef/browser_drag_delegate_win.cc +++ b/cef1/libcef/browser_drag_delegate_win.cc @@ -114,7 +114,7 @@ BrowserDragDelegate::~BrowserDragDelegate() { void BrowserDragDelegate::StartDragging(const WebDropData& drop_data, WebDragOperationsMask ops, - const SkBitmap& image, + const gfx::ImageSkia& image, const gfx::Vector2d& image_offset) { DCHECK(CefThread::CurrentlyOn(CefThread::UI)); @@ -174,7 +174,7 @@ void BrowserDragDelegate::StartBackgroundDragging( WebDragOperationsMask ops, const GURL& page_url, const std::string& page_encoding, - const SkBitmap& image, + const gfx::ImageSkia& image, const gfx::Vector2d& image_offset) { drag_drop_thread_id_ = base::PlatformThread::CurrentId(); @@ -191,7 +191,7 @@ void BrowserDragDelegate::PrepareDragForDownload( const std::string& page_encoding) { // Parse the download metadata. string16 mime_type; - FilePath file_name; + base::FilePath file_name; GURL download_url; if (!drag_download_util::ParseDownloadMetadata(drop_data.download_metadata, &mime_type, @@ -202,7 +202,7 @@ void BrowserDragDelegate::PrepareDragForDownload( // Generate the download filename. std::string content_disposition = "attachment; filename=" + UTF16ToUTF8(file_name.value()); - FilePath generated_file_name; + base::FilePath generated_file_name; download_util::GenerateFileName(download_url, content_disposition, std::string(), @@ -220,7 +220,7 @@ void BrowserDragDelegate::PrepareDragForDownload( page_url, page_encoding, view_); - ui::OSExchangeData::DownloadFileInfo file_download(FilePath(), + ui::OSExchangeData::DownloadFileInfo file_download(base::FilePath(), download_file.get()); data->SetDownloadFileInfo(file_download); @@ -231,17 +231,17 @@ void BrowserDragDelegate::PrepareDragForDownload( void BrowserDragDelegate::PrepareDragForFileContents( const WebDropData& drop_data, ui::OSExchangeData* data) { static const int kMaxFilenameLength = 255; // FAT and NTFS - FilePath file_name(drop_data.file_description_filename); + base::FilePath file_name(drop_data.file_description_filename); string16 extension = file_name.Extension(); file_name = file_name.BaseName().RemoveExtension(); // Images without ALT text will only have a file extension so we need to // synthesize one from the provided extension and URL. if (file_name.value().empty()) { // Retrieve the name from the URL. - file_name = FilePath( + file_name = base::FilePath( net::GetSuggestedFilename(drop_data.url, "", "", "", "", "")); if (file_name.value().size() + extension.size() > kMaxFilenameLength) { - file_name = FilePath(file_name.value().substr( + file_name = base::FilePath(file_name.value().substr( 0, kMaxFilenameLength - extension.size())); } } @@ -262,7 +262,7 @@ void BrowserDragDelegate::DoDragging(const WebDropData& drop_data, WebDragOperationsMask ops, const GURL& page_url, const std::string& page_encoding, - const SkBitmap& image, + const gfx::ImageSkia& image, const gfx::Vector2d& image_offset) { ui::OSExchangeData data; diff --git a/cef1/libcef/browser_drag_delegate_win.h b/cef1/libcef/browser_drag_delegate_win.h index b1ac0aab8..6166c7ecc 100644 --- a/cef1/libcef/browser_drag_delegate_win.h +++ b/cef1/libcef/browser_drag_delegate_win.h @@ -12,9 +12,9 @@ #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/threading/platform_thread.h" -#include "third_party/skia/include/core/SkBitmap.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDragOperation.h" #include "ui/base/dragdrop/os_exchange_data_provider_win.h" +#include "ui/gfx/image/image_skia.h" #include "ui/gfx/point.h" class BrowserWebViewDelegate; @@ -37,7 +37,7 @@ class BrowserDragDelegate // Called on UI thread. void StartDragging(const WebDropData& drop_data, WebKit::WebDragOperationsMask ops, - const SkBitmap& image, + const gfx::ImageSkia& image, const gfx::Vector2d& image_offset); void CancelDrag(); @@ -60,7 +60,7 @@ class BrowserDragDelegate WebKit::WebDragOperationsMask ops, const GURL& page_url, const std::string& page_encoding, - const SkBitmap& image, + const gfx::ImageSkia& image, const gfx::Vector2d& image_offset); // Called on drag-and-drop thread. @@ -68,7 +68,7 @@ class BrowserDragDelegate WebKit::WebDragOperationsMask ops, const GURL& page_url, const std::string& page_encoding, - const SkBitmap& image, + const gfx::ImageSkia& image, const gfx::Vector2d& image_offset); // Called on UI thread. void EndDragging(); diff --git a/cef1/libcef/browser_file_system.cc b/cef1/libcef/browser_file_system.cc index 1dc5f66d6..2826f7a79 100644 --- a/cef1/libcef/browser_file_system.cc +++ b/cef1/libcef/browser_file_system.cc @@ -15,16 +15,17 @@ #include "base/utf_string_conversions.h" #include "googleurl/src/gurl.h" #include "net/base/mime_util.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebVector.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileInfo.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystemCallbacks.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystemEntry.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h" #include "webkit/base/file_path_string_conversions.h" #include "webkit/blob/blob_storage_controller.h" +#include "webkit/fileapi/external_mount_points.h" #include "webkit/fileapi/file_system_task_runners.h" #include "webkit/fileapi/file_system_url.h" #include "webkit/fileapi/file_system_util.h" @@ -55,10 +56,10 @@ namespace { MessageLoop* g_io_thread; webkit_blob::BlobStorageController* g_blob_storage_controller; -void RegisterBlob(const GURL& blob_url, const FilePath& file_path) { +void RegisterBlob(const GURL& blob_url, const base::FilePath& file_path) { DCHECK(g_blob_storage_controller); - FilePath::StringType extension = file_path.Extension(); + base::FilePath::StringType extension = file_path.Extension(); if (!extension.empty()) extension = extension.substr(1); // Strip leading ".". @@ -89,6 +90,7 @@ void BrowserFileSystem::CreateContext() { CefThread::GetMessageLoopProxyForThread(CefThread::IO), CefThread::GetMessageLoopProxyForThread(CefThread::FILE), CefThread::GetMessageLoopProxyForThread(CefThread::FILE))), + fileapi::ExternalMountPoints::CreateRefCounted().get(), NULL /* special storage policy */, NULL /* quota manager */, _Context->cache_path(), @@ -133,8 +135,8 @@ void BrowserFileSystem::DeleteFileSystem( void BrowserFileSystem::move( const WebURL& src_path, const WebURL& dest_path, WebFileSystemCallbacks* callbacks) { - FileSystemURL src_url(src_path); - FileSystemURL dest_url(dest_path); + FileSystemURL src_url(file_system_context()->CrackURL(src_path)); + FileSystemURL dest_url(file_system_context()->CrackURL(dest_path)); if (!HasFilePermission(src_url, FILE_PERMISSION_WRITE) || !HasFilePermission(dest_url, FILE_PERMISSION_CREATE)) { callbacks->didFail(WebKit::WebFileErrorSecurity); @@ -147,8 +149,8 @@ void BrowserFileSystem::move( void BrowserFileSystem::copy( const WebURL& src_path, const WebURL& dest_path, WebFileSystemCallbacks* callbacks) { - FileSystemURL src_url(src_path); - FileSystemURL dest_url(dest_path); + FileSystemURL src_url(file_system_context()->CrackURL(src_path)); + FileSystemURL dest_url(file_system_context()->CrackURL(dest_path)); if (!HasFilePermission(src_url, FILE_PERMISSION_READ) || !HasFilePermission(dest_url, FILE_PERMISSION_CREATE)) { callbacks->didFail(WebKit::WebFileErrorSecurity); @@ -160,7 +162,7 @@ void BrowserFileSystem::copy( void BrowserFileSystem::remove( const WebURL& path, WebFileSystemCallbacks* callbacks) { - FileSystemURL url(path); + FileSystemURL url(file_system_context()->CrackURL(path)); if (!HasFilePermission(url, FILE_PERMISSION_WRITE)) { callbacks->didFail(WebKit::WebFileErrorSecurity); return; @@ -171,7 +173,7 @@ void BrowserFileSystem::remove( void BrowserFileSystem::removeRecursively( const WebURL& path, WebFileSystemCallbacks* callbacks) { - FileSystemURL url(path); + FileSystemURL url(file_system_context()->CrackURL(path)); if (!HasFilePermission(url, FILE_PERMISSION_WRITE)) { callbacks->didFail(WebKit::WebFileErrorSecurity); return; @@ -182,7 +184,7 @@ void BrowserFileSystem::removeRecursively( void BrowserFileSystem::readMetadata( const WebURL& path, WebFileSystemCallbacks* callbacks) { - FileSystemURL url(path); + FileSystemURL url(file_system_context()->CrackURL(path)); if (!HasFilePermission(url, FILE_PERMISSION_READ)) { callbacks->didFail(WebKit::WebFileErrorSecurity); return; @@ -192,7 +194,7 @@ void BrowserFileSystem::readMetadata( void BrowserFileSystem::createFile( const WebURL& path, bool exclusive, WebFileSystemCallbacks* callbacks) { - FileSystemURL url(path); + FileSystemURL url(file_system_context()->CrackURL(path)); if (!HasFilePermission(url, FILE_PERMISSION_CREATE)) { callbacks->didFail(WebKit::WebFileErrorSecurity); return; @@ -202,7 +204,7 @@ void BrowserFileSystem::createFile( void BrowserFileSystem::createDirectory( const WebURL& path, bool exclusive, WebFileSystemCallbacks* callbacks) { - FileSystemURL url(path); + FileSystemURL url(file_system_context()->CrackURL(path)); if (!HasFilePermission(url, FILE_PERMISSION_CREATE)) { callbacks->didFail(WebKit::WebFileErrorSecurity); return; @@ -213,7 +215,7 @@ void BrowserFileSystem::createDirectory( void BrowserFileSystem::fileExists( const WebURL& path, WebFileSystemCallbacks* callbacks) { - FileSystemURL url(path); + FileSystemURL url(file_system_context()->CrackURL(path)); if (!HasFilePermission(url, FILE_PERMISSION_READ)) { callbacks->didFail(WebKit::WebFileErrorSecurity); return; @@ -223,7 +225,7 @@ void BrowserFileSystem::fileExists( void BrowserFileSystem::directoryExists( const WebURL& path, WebFileSystemCallbacks* callbacks) { - FileSystemURL url(path); + FileSystemURL url(file_system_context()->CrackURL(path)); if (!HasFilePermission(url, FILE_PERMISSION_READ)) { callbacks->didFail(WebKit::WebFileErrorSecurity); return; @@ -233,7 +235,7 @@ void BrowserFileSystem::directoryExists( void BrowserFileSystem::readDirectory( const WebURL& path, WebFileSystemCallbacks* callbacks) { - FileSystemURL url(path); + FileSystemURL url(file_system_context()->CrackURL(path)); if (!HasFilePermission(url, FILE_PERMISSION_READ)) { callbacks->didFail(WebKit::WebFileErrorSecurity); return; @@ -250,7 +252,7 @@ void BrowserFileSystem::createSnapshotFileAndReadMetadata( const WebURL& blobURL, const WebURL& path, WebFileSystemCallbacks* callbacks) { - FileSystemURL url(path); + FileSystemURL url(file_system_context()->CrackURL(path)); if (!HasFilePermission(url, FILE_PERMISSION_READ)) { callbacks->didFail(WebKit::WebFileErrorSecurity); return; @@ -332,7 +334,7 @@ void BrowserFileSystem::DidFinish(WebFileSystemCallbacks* callbacks, void BrowserFileSystem::DidGetMetadata(WebFileSystemCallbacks* callbacks, base::PlatformFileError result, const base::PlatformFileInfo& info, - const FilePath& platform_path) { + const base::FilePath& platform_path) { if (result == base::PLATFORM_FILE_OK) { WebFileInfo web_file_info; web_file_info.length = info.size; @@ -396,7 +398,7 @@ void BrowserFileSystem::DidCreateSnapshotFile( WebFileSystemCallbacks* callbacks, base::PlatformFileError result, const base::PlatformFileInfo& info, - const FilePath& platform_path, + const base::FilePath& platform_path, const scoped_refptr& file_ref) { DCHECK(g_io_thread); if (result == base::PLATFORM_FILE_OK) { diff --git a/cef1/libcef/browser_file_system.h b/cef1/libcef/browser_file_system.h index 511860d0c..a4c9fabb4 100644 --- a/cef1/libcef/browser_file_system.h +++ b/cef1/libcef/browser_file_system.h @@ -8,10 +8,10 @@ #include -#include "base/file_util_proxy.h" +#include "base/files/file_util_proxy.h" #include "base/id_map.h" #include "base/memory/weak_ptr.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebFileSystem.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebFileSystem.h" #include "webkit/fileapi/file_system_context.h" #include "webkit/fileapi/file_system_operation.h" #include "webkit/fileapi/file_system_types.h" @@ -131,7 +131,7 @@ class BrowserFileSystem void DidGetMetadata(WebKit::WebFileSystemCallbacks* callbacks, base::PlatformFileError result, const base::PlatformFileInfo& info, - const FilePath& platform_path); + const base::FilePath& platform_path); void DidReadDirectory( WebKit::WebFileSystemCallbacks* callbacks, base::PlatformFileError result, @@ -147,7 +147,7 @@ class BrowserFileSystem WebKit::WebFileSystemCallbacks* callbacks, base::PlatformFileError result, const base::PlatformFileInfo& info, - const FilePath& platform_path, + const base::FilePath& platform_path, const scoped_refptr& file_ref); scoped_refptr file_system_context_; diff --git a/cef1/libcef/browser_file_writer.cc b/cef1/libcef/browser_file_writer.cc index 63d6e3ae9..0d19c94d4 100644 --- a/cef1/libcef/browser_file_writer.cc +++ b/cef1/libcef/browser_file_writer.cc @@ -180,6 +180,7 @@ BrowserFileWriter::BrowserFileWriter( WebFileWriterClient* client, FileSystemContext* file_system_context) : WebFileWriterBase(path, client), + file_system_context_(file_system_context), io_thread_proxy_(new IOThreadProxy(AsWeakPtr(), file_system_context)) { } @@ -187,13 +188,13 @@ BrowserFileWriter::~BrowserFileWriter() { } void BrowserFileWriter::DoTruncate(const GURL& path, int64 offset) { - FileSystemURL url(path); + FileSystemURL url(file_system_context_->CrackURL(path)); io_thread_proxy_->Truncate(url, offset); } void BrowserFileWriter::DoWrite( const GURL& path, const GURL& blob_url, int64 offset) { - FileSystemURL url(path); + FileSystemURL url(file_system_context_->CrackURL(path)); io_thread_proxy_->Write(url, blob_url, offset); } diff --git a/cef1/libcef/browser_file_writer.h b/cef1/libcef/browser_file_writer.h index 869301430..5ed9b0e7b 100644 --- a/cef1/libcef/browser_file_writer.h +++ b/cef1/libcef/browser_file_writer.h @@ -45,6 +45,7 @@ class BrowserFileWriter : public fileapi::WebFileWriterBase, private: class IOThreadProxy; + scoped_refptr file_system_context_; scoped_refptr io_thread_proxy_; static net::URLRequestContext* request_context_; }; diff --git a/cef1/libcef/browser_impl.cc b/cef1/libcef/browser_impl.cc index f829d939c..e082a209f 100644 --- a/cef1/libcef/browser_impl.cc +++ b/cef1/libcef/browser_impl.cc @@ -19,17 +19,17 @@ #include "base/stringprintf.h" #include "base/synchronization/waitable_event.h" #include "base/utf_string_conversions.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebHTTPBody.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebRect.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebURLRequest.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/platform/WebHTTPBody.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginDocument.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebRange.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptSource.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLRequest.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" #include "webkit/glue/glue_serialize.h" #include "webkit/plugins/npapi/webplugin_delegate.h" diff --git a/cef1/libcef/browser_impl_gtk.cc b/cef1/libcef/browser_impl_gtk.cc index 5544b53fb..1496e7100 100644 --- a/cef1/libcef/browser_impl_gtk.cc +++ b/cef1/libcef/browser_impl_gtk.cc @@ -9,9 +9,9 @@ #include "libcef/browser_impl.h" #include "libcef/browser_settings.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebRect.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.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" #include "webkit/glue/webpreferences.h" diff --git a/cef1/libcef/browser_impl_mac.mm b/cef1/libcef/browser_impl_mac.mm index 9b033bc24..bb5589fad 100644 --- a/cef1/libcef/browser_impl_mac.mm +++ b/cef1/libcef/browser_impl_mac.mm @@ -10,9 +10,9 @@ #include "libcef/browser_settings.h" #include "libcef/browser_webview_mac.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebRect.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.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" #include "webkit/glue/webpreferences.h" diff --git a/cef1/libcef/browser_impl_win.cc b/cef1/libcef/browser_impl_win.cc index 031a752cc..f05a18cdd 100644 --- a/cef1/libcef/browser_impl_win.cc +++ b/cef1/libcef/browser_impl_win.cc @@ -18,11 +18,11 @@ #include "printing/units.h" #include "skia/ext/vector_canvas.h" #include "skia/ext/vector_platform_device_emf_win.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebRect.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebSize.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" #include "ui/base/win/hwnd_util.h" #include "webkit/glue/webpreferences.h" diff --git a/cef1/libcef/browser_navigation_controller.h b/cef1/libcef/browser_navigation_controller.h index 6b42dedb3..85849fc59 100644 --- a/cef1/libcef/browser_navigation_controller.h +++ b/cef1/libcef/browser_navigation_controller.h @@ -14,8 +14,8 @@ #include "base/memory/ref_counted.h" #include "base/memory/scoped_vector.h" #include "googleurl/src/gurl.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebHTTPBody.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebHTTPBody.h" #include "include/cef_request.h" diff --git a/cef1/libcef/browser_network_delegate.cc b/cef1/libcef/browser_network_delegate.cc index 2f70d29aa..3bd3ba31f 100644 --- a/cef1/libcef/browser_network_delegate.cc +++ b/cef1/libcef/browser_network_delegate.cc @@ -100,8 +100,9 @@ bool BrowserNetworkDelegate::OnCanSetCookie( return rv == net::OK; } -bool BrowserNetworkDelegate::OnCanAccessFile(const net::URLRequest& request, - const FilePath& path) const { +bool BrowserNetworkDelegate::OnCanAccessFile( + const net::URLRequest& request, + const base::FilePath& path) const { return true; } diff --git a/cef1/libcef/browser_network_delegate.h b/cef1/libcef/browser_network_delegate.h index 76077816d..c497be50a 100644 --- a/cef1/libcef/browser_network_delegate.h +++ b/cef1/libcef/browser_network_delegate.h @@ -50,7 +50,7 @@ class BrowserNetworkDelegate : public net::NetworkDelegate { const std::string& cookie_line, net::CookieOptions* options) OVERRIDE; virtual bool OnCanAccessFile(const net::URLRequest& request, - const FilePath& path) const OVERRIDE; + const base::FilePath& path) const OVERRIDE; virtual bool OnCanThrottleRequest( const net::URLRequest& request) const OVERRIDE; virtual int OnBeforeSocketStreamConnect( diff --git a/cef1/libcef/browser_request_context.cc b/cef1/libcef/browser_request_context.cc index fcabe0ee9..58552bf19 100644 --- a/cef1/libcef/browser_request_context.cc +++ b/cef1/libcef/browser_request_context.cc @@ -101,10 +101,6 @@ class CefProxyResolver : public net::ProxyResolver { virtual net::LoadState GetLoadState(RequestHandle request) const OVERRIDE { return net::LOAD_STATE_IDLE; } - virtual net::LoadState GetLoadStateThreadSafe(RequestHandle request) const - OVERRIDE { - return net::LOAD_STATE_IDLE; - } virtual void CancelSetPacScript() OVERRIDE {} protected: @@ -154,11 +150,11 @@ class CefHttpUserAgentSettings : public net::HttpUserAgentSettings { BrowserRequestContext::BrowserRequestContext() : ALLOW_THIS_IN_INITIALIZER_LIST(storage_(this)) { - Init(FilePath(), net::HttpCache::NORMAL, false); + Init(base::FilePath(), net::HttpCache::NORMAL, false); } BrowserRequestContext::BrowserRequestContext( - const FilePath& cache_path, + const base::FilePath& cache_path, net::HttpCache::Mode cache_mode, bool no_proxy) : ALLOW_THIS_IN_INITIALIZER_LIST(storage_(this)) { @@ -166,7 +162,7 @@ BrowserRequestContext::BrowserRequestContext( } void BrowserRequestContext::Init( - const FilePath& cache_path, + const base::FilePath& cache_path, net::HttpCache::Mode cache_mode, bool no_proxy) { SetCookieStoragePath(cache_path); @@ -298,7 +294,7 @@ void BrowserRequestContext::Init( BrowserRequestContext::~BrowserRequestContext() { } -void BrowserRequestContext::SetCookieStoragePath(const FilePath& path) { +void BrowserRequestContext::SetCookieStoragePath(const base::FilePath& path) { REQUIRE_IOT(); if (cookie_store() && ((cookie_store_path_.empty() && path.empty()) || @@ -307,7 +303,7 @@ void BrowserRequestContext::SetCookieStoragePath(const FilePath& path) { return; } - FilePath new_path = path; + base::FilePath new_path = path; scoped_refptr persistent_store; if (!new_path.empty()) { @@ -316,7 +312,8 @@ void BrowserRequestContext::SetCookieStoragePath(const FilePath& path) { NOTREACHED() << "Failed to create cookie storage directory"; new_path.clear(); } else { - FilePath cookie_path = new_path.Append(FILE_PATH_LITERAL("Cookies")); + base::FilePath cookie_path = + new_path.Append(FILE_PATH_LITERAL("Cookies")); persistent_store = new SQLitePersistentCookieStore(cookie_path, false, NULL); } diff --git a/cef1/libcef/browser_request_context.h b/cef1/libcef/browser_request_context.h index 0c0bbba00..82a425590 100644 --- a/cef1/libcef/browser_request_context.h +++ b/cef1/libcef/browser_request_context.h @@ -15,7 +15,9 @@ #include "net/url_request/url_request_context.h" #include "net/url_request/url_request_context_storage.h" +namespace base { class FilePath; +} namespace webkit_blob { class BlobStorageController; @@ -30,28 +32,28 @@ class BrowserRequestContext : public net::URLRequestContext { // Use an on-disk cache at the specified location. Optionally, use the cache // in playback or record mode. - BrowserRequestContext(const FilePath& cache_path, + BrowserRequestContext(const base::FilePath& cache_path, net::HttpCache::Mode cache_mode, bool no_proxy); // Set the path used for cookie storage. If |path| is empty memory only // storage will be used. If the old cookie data is being stored on disk it // will be flushed and closed. - void SetCookieStoragePath(const FilePath& path); + void SetCookieStoragePath(const base::FilePath& path); webkit_blob::BlobStorageController* blob_storage_controller() const { return blob_storage_controller_.get(); } private: - void Init(const FilePath& cache_path, net::HttpCache::Mode cache_mode, + void Init(const base::FilePath& cache_path, net::HttpCache::Mode cache_mode, bool no_proxy); net::URLRequestContextStorage storage_; scoped_ptr blob_storage_controller_; scoped_ptr url_security_manager_; scoped_ptr url_request_interceptor_; - FilePath cookie_store_path_; + base::FilePath cookie_store_path_; }; #endif // CEF_LIBCEF_BROWSER_REQUEST_CONTEXT_H_ diff --git a/cef1/libcef/browser_resource_loader_bridge.cc b/cef1/libcef/browser_resource_loader_bridge.cc index 93a944911..a0301b293 100644 --- a/cef1/libcef/browser_resource_loader_bridge.cc +++ b/cef1/libcef/browser_resource_loader_bridge.cc @@ -458,6 +458,7 @@ class RequestProxy : public net::URLRequest::Delegate, upload_data_stream.reset( params->request_body->ResolveElementsAndCreateUploadDataStream( _Context->request_context()->blob_storage_controller(), + _Context->file_system()->file_system_context(), base::MessageLoopProxy::current())); } @@ -613,7 +614,7 @@ class RequestProxy : public net::URLRequest::Delegate, download_to_file_ = params->download_to_file; if (download_to_file_) { - FilePath path; + base::FilePath path; if (file_util::CreateTemporaryFile(&path)) { downloaded_file_ = ShareableFileReference::GetOrCreate( path, ShareableFileReference::DELETE_ON_FINAL_RELEASE, diff --git a/cef1/libcef/browser_socket_stream_bridge.cc b/cef1/libcef/browser_socket_stream_bridge.cc index 0d96d8ee1..bdce5c269 100644 --- a/cef1/libcef/browser_socket_stream_bridge.cc +++ b/cef1/libcef/browser_socket_stream_bridge.cc @@ -14,7 +14,7 @@ #include "net/socket_stream/socket_stream_job.h" #include "net/websockets/websocket_job.h" #include "net/url_request/url_request_context.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSocketStreamHandle.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebSocketStreamHandle.h" #include "webkit/glue/websocketstreamhandle_bridge.h" #include "webkit/glue/websocketstreamhandle_delegate.h" @@ -36,18 +36,18 @@ class WebSocketStreamHandleBridgeImpl webkit_glue::WebSocketStreamHandleDelegate* delegate); // WebSocketStreamHandleBridge methods. - virtual void Connect(const GURL& url); - virtual bool Send(const std::vector& data); - virtual void Close(); + virtual void Connect(const GURL& url) OVERRIDE; + virtual bool Send(const std::vector& data) OVERRIDE; + virtual void Close() OVERRIDE; // net::SocketStream::Delegate methods. virtual void OnConnected(net::SocketStream* req, - int max_pending_send_allowed); + int max_pending_send_allowed) OVERRIDE; virtual void OnSentData(net::SocketStream* req, - int amount_sent); + int amount_sent) OVERRIDE; virtual void OnReceivedData(net::SocketStream* req, - const char* data, int len); - virtual void OnClose(net::SocketStream* req); + const char* data, int len) OVERRIDE; + virtual void OnClose(net::SocketStream* req) OVERRIDE; private: virtual ~WebSocketStreamHandleBridgeImpl(); diff --git a/cef1/libcef/browser_webblobregistry_impl.cc b/cef1/libcef/browser_webblobregistry_impl.cc index 24fbaa4e0..1dd82b8d4 100644 --- a/cef1/libcef/browser_webblobregistry_impl.cc +++ b/cef1/libcef/browser_webblobregistry_impl.cc @@ -7,8 +7,8 @@ #include "base/bind.h" #include "base/message_loop.h" #include "googleurl/src/gurl.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebBlobData.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebBlobData.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h" #include "webkit/base/file_path_string_conversions.h" #include "webkit/blob/blob_data.h" #include "webkit/blob/blob_storage_controller.h" diff --git a/cef1/libcef/browser_webblobregistry_impl.h b/cef1/libcef/browser_webblobregistry_impl.h index 09f92bd6f..ee961d9f4 100644 --- a/cef1/libcef/browser_webblobregistry_impl.h +++ b/cef1/libcef/browser_webblobregistry_impl.h @@ -7,7 +7,7 @@ #pragma once #include "base/memory/ref_counted.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebBlobRegistry.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebBlobRegistry.h" class GURL; diff --git a/cef1/libcef/browser_webcookiejar_impl.cc b/cef1/libcef/browser_webcookiejar_impl.cc index 9a99fe1e3..8b470fdfb 100644 --- a/cef1/libcef/browser_webcookiejar_impl.cc +++ b/cef1/libcef/browser_webcookiejar_impl.cc @@ -15,7 +15,7 @@ #include "base/synchronization/waitable_event.h" #include "net/cookies/cookie_store.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h" using WebKit::WebString; using WebKit::WebURL; diff --git a/cef1/libcef/browser_webcookiejar_impl.h b/cef1/libcef/browser_webcookiejar_impl.h index 6508b465d..52d2b26a0 100644 --- a/cef1/libcef/browser_webcookiejar_impl.h +++ b/cef1/libcef/browser_webcookiejar_impl.h @@ -7,7 +7,7 @@ #define CEF_LIBCEF_BROWSER_WEBCOOKIEJAR_IMPL_H_ #pragma once -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCookieJar.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebCookieJar.h" namespace net { class CookieStore; diff --git a/cef1/libcef/browser_webkit_glue.cc b/cef1/libcef/browser_webkit_glue.cc index 585ff8ff3..e86acf4b7 100644 --- a/cef1/libcef/browser_webkit_glue.cc +++ b/cef1/libcef/browser_webkit_glue.cc @@ -20,9 +20,9 @@ MSVC_POP_WARNING(); #include "base/logging.h" #include "base/string_util.h" #include "net/base/mime_util.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" #include "webkit/glue/webkit_glue.h" #include "webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h" #include "webkit/gpu/webgraphicscontext3d_in_process_impl.h" diff --git a/cef1/libcef/browser_webkit_glue.h b/cef1/libcef/browser_webkit_glue.h index db90dcec8..08cfee567 100644 --- a/cef1/libcef/browser_webkit_glue.h +++ b/cef1/libcef/browser_webkit_glue.h @@ -11,7 +11,7 @@ #include "include/internal/cef_types.h" #include "base/compiler_specific.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebGraphicsContext3D.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3D.h" #include "v8/include/v8.h" #if defined(OS_WIN) diff --git a/cef1/libcef/browser_webkit_init.cc b/cef1/libcef/browser_webkit_init.cc index c503b99b1..180823dc1 100644 --- a/cef1/libcef/browser_webkit_init.cc +++ b/cef1/libcef/browser_webkit_init.cc @@ -56,8 +56,8 @@ BrowserWebKitInit::BrowserWebKitInit() prerendering_support_.reset(new BrowserPrerenderingSupport); WebKit::WebPrerenderingSupport::initialize(prerendering_support_.get()); - FilePath appcache_path; - FilePath cache_path = _Context->cache_path(); + base::FilePath appcache_path; + base::FilePath cache_path = _Context->cache_path(); if (!cache_path.empty()) { appcache_path = cache_path.Append(FILE_PATH_LITERAL("AppCache")); if (!file_util::PathExists(appcache_path) && diff --git a/cef1/libcef/browser_webkit_init.h b/cef1/libcef/browser_webkit_init.h index 2cccbfe6c..67b4fa0fa 100644 --- a/cef1/libcef/browser_webkit_init.h +++ b/cef1/libcef/browser_webkit_init.h @@ -17,7 +17,7 @@ #include "libcef/browser_webcookiejar_impl.h" #include "libcef/simple_clipboard_impl.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebGraphicsContext3D.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3D.h" #include "webkit/glue/simple_webmimeregistry_impl.h" #include "webkit/glue/webclipboard_impl.h" #include "webkit/glue/webfileutilities_impl.h" diff --git a/cef1/libcef/browser_webview_delegate.cc b/cef1/libcef/browser_webview_delegate.cc index 63d721f78..24c9ac7da 100644 --- a/cef1/libcef/browser_webview_delegate.cc +++ b/cef1/libcef/browser_webview_delegate.cc @@ -31,10 +31,17 @@ #include "base/string_util.h" #include "base/stringprintf.h" #include "net/base/net_errors.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebCString.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebData.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebPoint.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebURLError.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebURLRequest.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebURLResponse.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebVector.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCString.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebData.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileError.h" @@ -45,19 +52,13 @@ #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebNode.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPoint.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginParams.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebRange.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageNamespace.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLError.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLRequest.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLResponse.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebWindowFeatures.h" +#include "ui/base/window_open_disposition.h" #include "ui/gfx/native_widget_types.h" #include "ui/gfx/point.h" #include "webkit/appcache/web_application_cache_host_impl.h" @@ -65,7 +66,6 @@ #include "webkit/glue/glue_serialize.h" #include "webkit/glue/webpreferences.h" #include "webkit/glue/weburlrequest_extradata_impl.h" -#include "webkit/glue/window_open_disposition.h" #include "webkit/plugins/npapi/plugin_list.h" #include "webkit/plugins/npapi/webplugin_delegate_impl.h" #include "webkit/plugins/npapi/webplugin_impl.h" @@ -309,7 +309,7 @@ bool BrowserWebViewDelegate::runFileChooser( const WebFileChooserParams& params, WebKit::WebFileChooserCompletion* chooser_completion) { // Support file open dialog. - std::vector file_names; + std::vector file_names; std::vector mime_types; for (size_t i = 0; i < params.acceptTypes.size(); ++i) @@ -529,7 +529,7 @@ void BrowserWebViewDelegate::willAddPrerender(WebKit::WebPrerender* prerender) { // WebPluginPageDelegate ----------------------------------------------------- WebKit::WebPlugin* BrowserWebViewDelegate::CreatePluginReplacement( - const FilePath& file_path) { + const base::FilePath& file_path) { return NULL; } diff --git a/cef1/libcef/browser_webview_delegate.h b/cef1/libcef/browser_webview_delegate.h index f1aeaebcd..91f2a9d83 100644 --- a/cef1/libcef/browser_webview_delegate.h +++ b/cef1/libcef/browser_webview_delegate.h @@ -23,13 +23,13 @@ #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "build/build_config.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebFileSystem.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebRect.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileChooserParams.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebFileSystem.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrameClient.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebPermissionClient.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebPrerendererClient.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebViewClient.h" #include "webkit/glue/webcursor.h" #include "webkit/plugins/npapi/webplugin_page_delegate.h" @@ -56,7 +56,10 @@ class WebDropTarget; class CefBrowserImpl; class GURL; class WebWidgetHost; + +namespace base { class FilePath; +} class BrowserWebViewDelegate : public WebKit::WebViewClient, public WebKit::WebFrameClient, @@ -227,10 +230,10 @@ class BrowserWebViewDelegate : public WebKit::WebViewClient, // webkit_glue::WebPluginPageDelegate virtual webkit::npapi::WebPluginDelegate* CreatePluginDelegate( - const FilePath& file_path, + const base::FilePath& file_path, const std::string& mime_type) OVERRIDE; virtual WebKit::WebPlugin* CreatePluginReplacement( - const FilePath& file_path) OVERRIDE; + const base::FilePath& file_path) OVERRIDE; virtual void CreatedPluginWindow( gfx::PluginWindowHandle handle) OVERRIDE; virtual void WillDestroyPluginWindow( @@ -315,10 +318,10 @@ class BrowserWebViewDelegate : public WebKit::WebViewClient, CefString* result); // Called to show the file chooser dialog. - bool ShowFileChooser(std::vector& file_names, + bool ShowFileChooser(std::vector& file_names, bool multi_select, const WebKit::WebString& title, - const FilePath& default_file, + const base::FilePath& default_file, const std::vector& accept_mime_types); // Called to show status messages. diff --git a/cef1/libcef/browser_webview_delegate_gtk.cc b/cef1/libcef/browser_webview_delegate_gtk.cc index dfb95b5a7..30a83b0a7 100644 --- a/cef1/libcef/browser_webview_delegate_gtk.cc +++ b/cef1/libcef/browser_webview_delegate_gtk.cc @@ -12,23 +12,23 @@ #include "base/message_loop.h" #include "base/string_util.h" #include "net/base/net_errors.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebDragData.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebImage.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebPoint.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebRect.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenu.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebDragData.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebImage.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPoint.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" +#include "ui/base/window_open_disposition.h" #include "ui/gfx/native_widget_types.h" #include "ui/gfx/gtk_util.h" #include "ui/gfx/point.h" #include "webkit/glue/webdropdata.h" #include "webkit/glue/webpreferences.h" #include "webkit/glue/webkit_glue.h" -#include "webkit/glue/window_open_disposition.h" #include "webkit/plugins/npapi/plugin_list.h" #include "webkit/plugins/npapi/webplugin.h" #include "webkit/plugins/npapi/webplugin_delegate_impl.h" @@ -180,7 +180,7 @@ bool ShowJSPromptDialog(GtkWidget* window, return (result == GTK_RESPONSE_OK); } -bool ShowJSFileChooser(GtkWidget* window, FilePath* path) { +bool ShowJSFileChooser(GtkWidget* window, base::FilePath* path) { // Create the widgets. GtkWidget* dialog = gtk_file_chooser_dialog_new( "Open File", @@ -193,8 +193,10 @@ bool ShowJSFileChooser(GtkWidget* window, FilePath* path) { gtk_widget_show_all(dialog); int result = gtk_dialog_run(GTK_DIALOG(dialog)); - if (result == GTK_RESPONSE_ACCEPT) - *path = FilePath(gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog))); + if (result == GTK_RESPONSE_ACCEPT) { + *path = base::FilePath(gtk_file_chooser_get_filename( + GTK_FILE_CHOOSER(dialog))); + } gtk_widget_destroy(dialog); @@ -448,7 +450,7 @@ void BrowserWebViewDelegate::runModal() { // WebPluginPageDelegate ------------------------------------------------------ webkit::npapi::WebPluginDelegate* BrowserWebViewDelegate::CreatePluginDelegate( - const FilePath& path, + const base::FilePath& path, const std::string& mime_type) { return webkit::npapi::WebPluginDelegateImpl::Create(path, mime_type); } @@ -553,15 +555,15 @@ bool BrowserWebViewDelegate::ShowJavaScriptPrompt( } bool BrowserWebViewDelegate::ShowFileChooser( - std::vector& file_names, + std::vector& file_names, bool multi_select, const WebKit::WebString& title, - const FilePath& default_file, + const base::FilePath& default_file, const std::vector& accept_mime_types) { gfx::NativeView view = browser_->UIT_GetMainWndHandle(); GtkWidget* window = gtk_widget_get_toplevel(GTK_WIDGET(view)); - FilePath file_name; + base::FilePath file_name; bool resp = ShowJSFileChooser(window, &file_name); if (resp) file_names.push_back(file_name); diff --git a/cef1/libcef/browser_webview_delegate_mac.mm b/cef1/libcef/browser_webview_delegate_mac.mm index 200fee800..095e9cd14 100644 --- a/cef1/libcef/browser_webview_delegate_mac.mm +++ b/cef1/libcef/browser_webview_delegate_mac.mm @@ -16,13 +16,13 @@ #include "base/utf_string_conversions.h" #include "base/threading/thread_restrictions.h" #include "skia/ext/skia_utils_mac.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebDragData.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebImage.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebPoint.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebDragData.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebImage.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPoint.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenu.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" #include "ui/base/layout.h" @@ -440,7 +440,7 @@ void BrowserWebViewDelegate::runModal() { // WebPluginPageDelegate ------------------------------------------------------ webkit::npapi::WebPluginDelegate* BrowserWebViewDelegate::CreatePluginDelegate( - const FilePath& path, + const base::FilePath& path, const std::string& mime_type) { WebWidgetHost *host = GetWidgetHost(); if (!host) @@ -548,10 +548,10 @@ bool BrowserWebViewDelegate::ShowJavaScriptPrompt( // Called to show the file chooser dialog. bool BrowserWebViewDelegate::ShowFileChooser( - std::vector& file_names, + std::vector& file_names, bool multi_select, const WebKit::WebString& title, - const FilePath& default_file, + const base::FilePath& default_file, const std::vector& accept_mime_types) { NSOpenPanel* dialog = [NSOpenPanel openPanel]; if (!title.isNull()) @@ -598,8 +598,10 @@ bool BrowserWebViewDelegate::ShowFileChooser( int i, count = [urls count]; for (i=0; i ext; + std::vector ext; std::wstring ext_str; net::GetExtensionsForMimeType(ascii_type, &ext); if (ext.size() > 0) { @@ -499,7 +499,10 @@ void BrowserWebViewDelegate::startDragging( } drag_delegate_ = new BrowserDragDelegate(this); - drag_delegate_->StartDragging(drop_data, mask, image.getSkBitmap(), + gfx::ImageSkia image_skia = + gfx::ImageSkia(gfx::ImageSkiaRep(image.getSkBitmap(), + ui::SCALE_FACTOR_100P)); + drag_delegate_->StartDragging(drop_data, mask, image_skia, gfx::Point(image_offset).OffsetFromOrigin()); } @@ -559,7 +562,7 @@ void BrowserWebViewDelegate::runModal() { // WebPluginPageDelegate ------------------------------------------------------ webkit::npapi::WebPluginDelegate* BrowserWebViewDelegate::CreatePluginDelegate( - const FilePath& file_path, + const base::FilePath& file_path, const std::string& mime_type) { WebViewHost* host = browser_->UIT_GetWebViewHost(); if (!host) @@ -803,7 +806,7 @@ bool BrowserWebViewDelegate::ShowJavaScriptPrompt(WebFrame* webframe, const CefString& message, const CefString& default_value, CefString* result) { - FilePath file_path; + base::FilePath file_path; HMODULE hModule = NULL; // Try to load the dialog from the DLL. @@ -840,7 +843,8 @@ namespace { // from chrome/browser/views/shell_dialogs_win.cc -bool RunOpenFileDialog(const std::wstring& filter, HWND owner, FilePath* path) { +bool RunOpenFileDialog(const std::wstring& filter, HWND owner, + base::FilePath* path) { OPENFILENAME ofn; // We must do this otherwise the ofn's FlagsEx may be initialized to random @@ -864,12 +868,12 @@ bool RunOpenFileDialog(const std::wstring& filter, HWND owner, FilePath* path) { } bool success = !!GetOpenFileName(&ofn); if (success) - *path = FilePath(filename); + *path = base::FilePath(filename); return success; } bool RunOpenMultiFileDialog(const std::wstring& filter, HWND owner, - std::vector* paths) { + std::vector* paths) { OPENFILENAME ofn; // We must do this otherwise the ofn's FlagsEx may be initialized to random @@ -895,10 +899,10 @@ bool RunOpenMultiFileDialog(const std::wstring& filter, HWND owner, bool success = !!GetOpenFileName(&ofn); if (success) { - std::vector files; + std::vector files; const wchar_t* selection = ofn.lpstrFile; while (*selection) { // Empty string indicates end of list. - files.push_back(FilePath(selection)); + files.push_back(base::FilePath(selection)); // Skip over filename and null-terminator. selection += files.back().value().length() + 1; } @@ -910,8 +914,8 @@ bool RunOpenMultiFileDialog(const std::wstring& filter, HWND owner, } else { // Otherwise, the first string is the path, and the remainder are // filenames. - std::vector::iterator path = files.begin(); - for (std::vector::iterator file = path + 1; + std::vector::iterator path = files.begin(); + for (std::vector::iterator file = path + 1; file != files.end(); ++file) { paths->push_back(path->Append(*file)); } @@ -923,10 +927,10 @@ bool RunOpenMultiFileDialog(const std::wstring& filter, HWND owner, } // namespace bool BrowserWebViewDelegate::ShowFileChooser( - std::vector& file_names, + std::vector& file_names, bool multi_select, const WebKit::WebString& title, - const FilePath& default_file, + const base::FilePath& default_file, const std::vector& accept_mime_types) { bool result = false; const std::wstring& filter = @@ -936,7 +940,7 @@ bool BrowserWebViewDelegate::ShowFileChooser( result = RunOpenMultiFileDialog(filter, browser_->UIT_GetMainWndHandle(), &file_names); } else { - FilePath file_name; + base::FilePath file_name; result = RunOpenFileDialog(filter, browser_->UIT_GetMainWndHandle(), &file_name); if (result) diff --git a/cef1/libcef/cef_context.cc b/cef1/libcef/cef_context.cc index dcc2fafb4..27dcef815 100644 --- a/cef1/libcef/cef_context.cc +++ b/cef1/libcef/cef_context.cc @@ -75,20 +75,20 @@ 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, + virtual base::FilePath GetPathForResourcePack( + const base::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; - return FilePath(); + return base::FilePath(); } - virtual FilePath GetPathForLocalePack(const FilePath& pack_path, + virtual base::FilePath GetPathForLocalePack(const FilePath& pack_path, const std::string& locale) OVERRIDE { if (!context_->settings().pack_loading_disabled) return pack_path; - return FilePath(); + return base::FilePath(); } virtual gfx::Image GetImageNamed(int resource_id) OVERRIDE { @@ -253,7 +253,7 @@ bool CefContext::Initialize(const CefSettings& settings, settings_ = settings; application_ = application; - cache_path_ = FilePath(CefString(&settings.cache_path)); + cache_path_ = base::FilePath(CefString(&settings.cache_path)); if (!cache_path_.empty() && !file_util::PathExists(cache_path_) && !file_util::CreateDirectory(cache_path_)) { @@ -372,14 +372,14 @@ CefRefPtr CefContext::GetBrowserByID(int id) { void CefContext::InitializeResourceBundle() { #if !defined(OS_WIN) - FilePath chrome_pak_file; + base::FilePath chrome_pak_file; #endif - FilePath devtools_pak_file, locales_dir; + base::FilePath devtools_pak_file, locales_dir; if (!settings_.pack_loading_disabled) { - FilePath resources_dir_path; + base::FilePath resources_dir_path; if (settings_.resources_dir_path.length > 0) - resources_dir_path = FilePath(CefString(&settings_.resources_dir_path)); + resources_dir_path = base::FilePath(CefString(&settings_.resources_dir_path)); if (resources_dir_path.empty()) resources_dir_path = GetResourcesFilePath(); @@ -393,7 +393,7 @@ void CefContext::InitializeResourceBundle() { } if (settings_.locales_dir_path.length > 0) - locales_dir = FilePath(CefString(&settings_.locales_dir_path)); + locales_dir = base::FilePath(CefString(&settings_.locales_dir_path)); if (!locales_dir.empty()) PathService::Override(ui::DIR_LOCALES, locales_dir); @@ -476,7 +476,7 @@ base::StringPiece CefContext::GetDataResource(int resource_id) const { #if defined(OS_WIN) if (value.empty()) { - FilePath file_path; + base::FilePath file_path; HMODULE hModule = NULL; // Try to load the resource from the DLL. @@ -493,7 +493,7 @@ base::StringPiece CefContext::GetDataResource(int resource_id) const { // Use webkit's broken image icon (16x16) static std::string broken_image_data; if (broken_image_data.empty()) { - FilePath path = GetResourcesFilePath(); + base::FilePath path = GetResourcesFilePath(); // In order to match WebKit's colors for the missing image, we have to // use a PNG. The GIF doesn't have the color range needed to correctly // match the TIFF they use in Safari. @@ -510,7 +510,7 @@ base::StringPiece CefContext::GetDataResource(int resource_id) const { // Use webkit's text area resizer image. static std::string resize_corner_data; if (resize_corner_data.empty()) { - FilePath path = GetResourcesFilePath(); + base::FilePath path = GetResourcesFilePath(); path = path.AppendASCII("textAreaResizeCorner.png"); bool success = file_util::ReadFileToString(path, &resize_corner_data); if (!success) { @@ -536,20 +536,20 @@ base::StringPiece CefContext::GetDataResource(int resource_id) const { return value; } -FilePath CefContext::GetResourcesFilePath() const { +base::FilePath CefContext::GetResourcesFilePath() const { #if defined(OS_MACOSX) // Start out with the path to the running executable. - FilePath execPath; + base::FilePath execPath; PathService::Get(base::FILE_EXE, &execPath); // Get the main bundle path. - FilePath bundlePath = base::mac::GetAppBundlePath(execPath); + base::FilePath bundlePath = base::mac::GetAppBundlePath(execPath); // Go into the Contents/Resources directory. return bundlePath.Append(FILE_PATH_LITERAL("Contents")) .Append(FILE_PATH_LITERAL("Resources")); #else - FilePath pak_dir; + base::FilePath pak_dir; PathService::Get(base::DIR_MODULE, &pak_dir); return pak_dir; #endif diff --git a/cef1/libcef/cef_context.h b/cef1/libcef/cef_context.h index f6ab3e154..a0c69ca16 100644 --- a/cef1/libcef/cef_context.h +++ b/cef1/libcef/cef_context.h @@ -62,11 +62,11 @@ class CefContext : public CefBase { string16 GetLocalizedString(int message_id) const; base::StringPiece GetDataResource(int resource_id) const; - FilePath GetResourcesFilePath() const; + base::FilePath GetResourcesFilePath() const; // Retrieve the path at which cache data will be stored on disk. If empty, // cache data will be stored in-memory. - const FilePath& cache_path() const { return cache_path_; } + const base::FilePath& cache_path() const { return cache_path_; } const CefSettings& settings() const { return settings_; } CefRefPtr application() const { return application_; } @@ -122,7 +122,7 @@ class CefContext : public CefBase { CefSettings settings_; CefRefPtr application_; - FilePath cache_path_; + base::FilePath cache_path_; base::ScopedTempDir cache_temp_dir_; BrowserRequestContext* request_context_; diff --git a/cef1/libcef/cef_process.cc b/cef1/libcef/cef_process.cc index 86cd1f1d6..62b0c78e6 100644 --- a/cef1/libcef/cef_process.cc +++ b/cef1/libcef/cef_process.cc @@ -8,6 +8,7 @@ #include "libcef/cef_process_sub_thread.h" #include "libcef/cef_process_ui_thread.h" +#include "base/run_loop.h" #include "base/synchronization/waitable_event.h" #include "base/threading/thread.h" @@ -16,17 +17,8 @@ class CefMessageLoopForUI : public MessageLoopForUI { typedef MessageLoopForUI inherited; public: - CefMessageLoopForUI() - : is_iterating_(true) { + CefMessageLoopForUI() { } -#if defined(OS_MACOSX) - virtual ~CefMessageLoopForUI() { - // On Mac the MessageLoop::AutoRunState scope in Run() never exits so clear - // the run_loop_ variable to avoid an assertion in the MessageLoop - // destructor. - run_loop_ = NULL; - } -#endif // Returns the MessageLoopForUI of the current thread. static CefMessageLoopForUI* current() { @@ -35,30 +27,18 @@ class CefMessageLoopForUI : public MessageLoopForUI { return static_cast(loop); } - virtual bool DoIdleWork() { - bool valueToRet = inherited::DoIdleWork(); - if (is_iterating_) - pump_->Quit(); - return valueToRet; - } - // Do a single interation of the UI message loop. void DoMessageLoopIteration() { - Run(); + base::RunLoop run_loop; + run_loop.RunUntilIdle(); } // Run the UI message loop. void RunMessageLoop() { - is_iterating_ = false; - DoMessageLoopIteration(); + Run(); } - bool is_iterating() { return is_iterating_; } - private: - // True if the message loop is doing one iteration at a time. - bool is_iterating_; - DISALLOW_COPY_AND_ASSIGN(CefMessageLoopForUI); }; @@ -90,7 +70,6 @@ CefProcess::~CefProcess() { void CefProcess::DoMessageLoopIteration() { DCHECK(CalledOnValidThread() && ui_message_loop_.get() != NULL); - DCHECK(ui_message_loop_->is_iterating()); ui_message_loop_->DoMessageLoopIteration(); } diff --git a/cef1/libcef/cef_process_io_thread.cc b/cef1/libcef/cef_process_io_thread.cc index ef5ef5e2a..d6832fe00 100644 --- a/cef1/libcef/cef_process_io_thread.cc +++ b/cef1/libcef/cef_process_io_thread.cc @@ -36,7 +36,7 @@ CefProcessIOThread::~CefProcessIOThread() { void CefProcessIOThread::Init() { CefThread::Init(); - FilePath cache_path(_Context->cache_path()); + base::FilePath cache_path(_Context->cache_path()); request_context_.reset(new BrowserRequestContext(cache_path, net::HttpCache::NORMAL, false)); _Context->set_request_context(request_context_.get()); diff --git a/cef1/libcef/cef_process_ui_thread.cc b/cef1/libcef/cef_process_ui_thread.cc index db93dd246..552c3b8de 100644 --- a/cef1/libcef/cef_process_ui_thread.cc +++ b/cef1/libcef/cef_process_ui_thread.cc @@ -76,7 +76,7 @@ void CefProcessUIThread::Init() { logging::SetMinLogLevel(settings.log_severity); } - FilePath log_file = FilePath(CefString(&settings.log_file)); + base::FilePath log_file = FilePath(CefString(&settings.log_file)); logging::DcheckState dcheck_state = logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS; if (settings.release_dcheck_enabled) @@ -168,12 +168,12 @@ void CefProcessUIThread::Init() { cef_string_t str; memset(&str, 0, sizeof(str)); - FilePath path; + base::FilePath path; int size = cef_string_list_size(settings.extra_plugin_paths); for (int i = 0; i < size; ++i) { if (!cef_string_list_value(settings.extra_plugin_paths, i, &str)) continue; - path = FilePath(CefString(&str)); + path = base::FilePath(CefString(&str)); webkit::npapi::PluginList::Singleton()->AddExtraPluginPath(path); } } diff --git a/cef1/libcef/command_line_impl.cc b/cef1/libcef/command_line_impl.cc index 2cd304016..b020dcb8c 100644 --- a/cef1/libcef/command_line_impl.cc +++ b/cef1/libcef/command_line_impl.cc @@ -45,7 +45,7 @@ class CefCommandLineImpl : public CefCommandLine { virtual void SetProgram(const CefString& program) OVERRIDE { AutoLock lock_scope(this); - command_line_.SetProgram(FilePath(program)); + command_line_.SetProgram(base::FilePath(program)); } virtual bool HasSwitches() OVERRIDE { diff --git a/cef1/libcef/cookie_manager_impl.cc b/cef1/libcef/cookie_manager_impl.cc index 500e5005a..8897cd0f5 100644 --- a/cef1/libcef/cookie_manager_impl.cc +++ b/cef1/libcef/cookie_manager_impl.cc @@ -206,9 +206,9 @@ bool CefCookieManagerImpl::DeleteCookies(const CefString& url, bool CefCookieManagerImpl::SetStoragePath(const CefString& path) { if (CefThread::CurrentlyOn(CefThread::IO)) { - FilePath new_path; + base::FilePath new_path; if (!path.empty()) - new_path = FilePath(path); + new_path = base::FilePath(path); if (is_global_) { // Global path changes are handled by the request context. @@ -232,7 +232,7 @@ bool CefCookieManagerImpl::SetStoragePath(const CefString& path) { NOTREACHED() << "Failed to create cookie storage directory"; new_path.clear(); } else { - FilePath cookie_path = new_path.Append(FILE_PATH_LITERAL("Cookies")); + base::FilePath cookie_path = new_path.Append(FILE_PATH_LITERAL("Cookies")); persistent_store = new SQLitePersistentCookieStore(cookie_path, false, NULL); } diff --git a/cef1/libcef/cookie_manager_impl.h b/cef1/libcef/cookie_manager_impl.h index 643309610..b77b51bad 100644 --- a/cef1/libcef/cookie_manager_impl.h +++ b/cef1/libcef/cookie_manager_impl.h @@ -33,7 +33,7 @@ class CefCookieManagerImpl : public CefCookieManager { private: scoped_refptr cookie_monster_; bool is_global_; - FilePath storage_path_; + base::FilePath storage_path_; IMPLEMENT_REFCOUNTING(CefCookieManagerImpl); }; diff --git a/cef1/libcef/dom_document_impl.cc b/cef1/libcef/dom_document_impl.cc index 3b5095582..844a00fd2 100644 --- a/cef1/libcef/dom_document_impl.cc +++ b/cef1/libcef/dom_document_impl.cc @@ -7,13 +7,13 @@ #include "libcef/cef_thread.h" #include "base/logging.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebNode.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebRange.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" using WebKit::WebDocument; using WebKit::WebElement; diff --git a/cef1/libcef/dom_event_impl.cc b/cef1/libcef/dom_event_impl.cc index 8be8a6eb5..a2ce7e72d 100644 --- a/cef1/libcef/dom_event_impl.cc +++ b/cef1/libcef/dom_event_impl.cc @@ -7,8 +7,8 @@ #include "libcef/dom_document_impl.h" #include "base/logging.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDOMEvent.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" using WebKit::WebDOMEvent; using WebKit::WebString; diff --git a/cef1/libcef/dom_node_impl.cc b/cef1/libcef/dom_node_impl.cc index 562303d7a..4ce6b3f66 100644 --- a/cef1/libcef/dom_node_impl.cc +++ b/cef1/libcef/dom_node_impl.cc @@ -13,6 +13,7 @@ #include "base/string_util.h" #include "base/threading/non_thread_safe.h" #include "base/utf_string_conversions.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDOMEvent.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDOMEventListener.h" @@ -22,7 +23,6 @@ #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebNode.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebSelectElement.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" using WebKit::WebDocument; using WebKit::WebDOMEvent; diff --git a/cef1/libcef/download_util.cc b/cef1/libcef/download_util.cc index 28831ab92..2b8017189 100644 --- a/cef1/libcef/download_util.cc +++ b/cef1/libcef/download_util.cc @@ -89,9 +89,9 @@ bool IsReservedName(const string16& filename) { // Create an extension based on the file name and mime type. // From chrome/browser/download/download_util.cc -void GenerateExtension(const FilePath& file_name, +void GenerateExtension(const base::FilePath& file_name, const std::string& mime_type, - FilePath::StringType* generated_extension) { + base::FilePath::StringType* generated_extension) { // We're worried about two things here: // // 1) Usability. If the site fails to provide a file extension, we want to @@ -102,12 +102,12 @@ void GenerateExtension(const FilePath& file_name, // from integrating with the user's shell. // See if our file name already contains an extension. - FilePath::StringType extension = file_name.Extension(); + base::FilePath::StringType extension = file_name.Extension(); if (!extension.empty()) extension.erase(extension.begin()); // Erase preceding '.'. #if defined(OS_WIN) - static const FilePath::CharType default_extension[] = + static const base::FilePath::CharType default_extension[] = FILE_PATH_LITERAL("download"); // Rename shell-integrated extensions. @@ -130,21 +130,22 @@ void GenerateExtension(const FilePath& file_name, // download. |file_name| can either be just the file name or it can be a // full path to a file. // From chrome/browser/download/download_util.cc -void GenerateSafeFileName(const std::string& mime_type, FilePath* file_name) { +void GenerateSafeFileName(const std::string& mime_type, + base::FilePath* file_name) { // Make sure we get the right file extension - FilePath::StringType extension; + base::FilePath::StringType extension; GenerateExtension(*file_name, mime_type, &extension); *file_name = file_name->ReplaceExtension(extension); #if defined(OS_WIN) // Prepend "_" to the file name if it's a reserved name - FilePath::StringType leaf_name = file_name->BaseName().value(); + base::FilePath::StringType leaf_name = file_name->BaseName().value(); DCHECK(!leaf_name.empty()); if (IsReservedName(leaf_name)) { - leaf_name = FilePath::StringType(FILE_PATH_LITERAL("_")) + leaf_name; + leaf_name = base::FilePath::StringType(FILE_PATH_LITERAL("_")) + leaf_name; *file_name = file_name->DirName(); - if (file_name->value() == FilePath::kCurrentDirectory) { - *file_name = FilePath(leaf_name); + if (file_name->value() == base::FilePath::kCurrentDirectory) { + *file_name = base::FilePath(leaf_name); } else { *file_name = file_name->Append(leaf_name); } @@ -163,7 +164,7 @@ void GenerateFileName(const GURL& url, const std::string& referrer_charset, const std::string& mime_type, const std::string& suggested_name, - FilePath* generated_name) { + base::FilePath* generated_name) { string16 new_name = net::GetSuggestedFilename(GURL(url), content_disposition, referrer_charset, @@ -176,9 +177,10 @@ void GenerateFileName(const GURL& url, // However, I'm just shuffling wrong code around, at least not adding // to it. #if defined(OS_WIN) - *generated_name = FilePath(new_name); + *generated_name = base::FilePath(new_name); #else - *generated_name = FilePath(base::SysWideToNativeMB(UTF16ToWide(new_name))); + *generated_name = + base::FilePath(base::SysWideToNativeMB(UTF16ToWide(new_name))); #endif DCHECK(!generated_name->empty()); diff --git a/cef1/libcef/download_util.h b/cef1/libcef/download_util.h index c2d45afe5..98e71b4f4 100644 --- a/cef1/libcef/download_util.h +++ b/cef1/libcef/download_util.h @@ -10,7 +10,10 @@ #include class GURL; + +namespace base { class FilePath; +} namespace download_util { @@ -20,7 +23,7 @@ void GenerateFileName(const GURL& url, const std::string& referrer_charset, const std::string& mime_type, const std::string& suggested_name, - FilePath* generated_name); + base::FilePath* generated_name); } // namespace download_util diff --git a/cef1/libcef/drag_download_file.cc b/cef1/libcef/drag_download_file.cc index 96bbcea9a..876fb88f2 100644 --- a/cef1/libcef/drag_download_file.cc +++ b/cef1/libcef/drag_download_file.cc @@ -13,7 +13,7 @@ #include "net/base/file_stream.h" DragDownloadFile::DragDownloadFile( - const FilePath& file_name_or_path, + const base::FilePath& file_name_or_path, scoped_ptr file_stream, const GURL& url, const GURL& referrer, diff --git a/cef1/libcef/drag_download_file.h b/cef1/libcef/drag_download_file.h index 525d63bdb..87d73d4ae 100644 --- a/cef1/libcef/drag_download_file.h +++ b/cef1/libcef/drag_download_file.h @@ -33,7 +33,7 @@ class DragDownloadFile : public ui::DownloadFileProvider { // created. Only UI thread is involved. // The file path and file stream should be provided as the first two // parameters. - DragDownloadFile(const FilePath& file_name_or_path, + DragDownloadFile(const base::FilePath& file_name_or_path, scoped_ptr file_stream, const GURL& url, const GURL& referrer, @@ -64,15 +64,15 @@ class DragDownloadFile : public ui::DownloadFileProvider { // Initialized on drag-and-drop thread. Accessed on either thread after that // (Windows). // Accessed on UI thread (MacOSX). - FilePath file_path_; - FilePath file_name_; + base::FilePath file_path_; + base::FilePath file_name_; scoped_ptr file_stream_; GURL url_; GURL referrer_; std::string referrer_encoding_; BrowserWebViewDelegate* view_; MessageLoop* drag_message_loop_; - FilePath temp_dir_path_; + base::FilePath temp_dir_path_; // Accessed on drag-and-drop thread (Windows). // Accessed on UI thread (MacOSX). diff --git a/cef1/libcef/drag_download_util.cc b/cef1/libcef/drag_download_util.cc index f64872f86..2cb4c065e 100644 --- a/cef1/libcef/drag_download_util.cc +++ b/cef1/libcef/drag_download_util.cc @@ -22,7 +22,7 @@ namespace drag_download_util { bool ParseDownloadMetadata(const string16& metadata, string16* mime_type, - FilePath* file_name, + base::FilePath* file_name, GURL* url) { const char16 separator = L':'; @@ -44,9 +44,9 @@ bool ParseDownloadMetadata(const string16& metadata, string16 file_name_str = metadata.substr( mime_type_end_pos + 1, file_name_end_pos - mime_type_end_pos - 1); #if defined(OS_WIN) - *file_name = FilePath(file_name_str); + *file_name = base::FilePath(file_name_str); #else - *file_name = FilePath(UTF16ToUTF8(file_name_str)); + *file_name = base::FilePath(UTF16ToUTF8(file_name_str)); #endif } if (url) @@ -55,13 +55,13 @@ bool ParseDownloadMetadata(const string16& metadata, return true; } -FileStream* CreateFileStreamForDrop(FilePath* file_path) { +FileStream* CreateFileStreamForDrop(base::FilePath* file_path) { DCHECK(file_path && !file_path->empty()); scoped_ptr file_stream(new FileStream(NULL)); const int kMaxSeq = 99; for (int seq = 0; seq <= kMaxSeq; seq++) { - FilePath new_file_path; + base::FilePath new_file_path; if (seq == 0) { new_file_path = *file_path; } else { @@ -98,7 +98,8 @@ void PromiseFileFinalizer::Cleanup() { drag_file_downloader_ = NULL; } -void PromiseFileFinalizer::OnDownloadCompleted(const FilePath& file_path) { +void PromiseFileFinalizer::OnDownloadCompleted( + const base::FilePath& file_path) { CefThread::PostTask( CefThread::UI, FROM_HERE, base::Bind(&PromiseFileFinalizer::Cleanup, this)); diff --git a/cef1/libcef/drag_download_util.h b/cef1/libcef/drag_download_util.h index e698ffc09..7f480a2cf 100644 --- a/cef1/libcef/drag_download_util.h +++ b/cef1/libcef/drag_download_util.h @@ -13,8 +13,12 @@ #include "base/string16.h" #include "ui/base/dragdrop/download_file_interface.h" -class FilePath; class GURL; + +namespace base { +class FilePath; +} + namespace net { class FileStream; } @@ -32,13 +36,13 @@ namespace drag_download_util { // text/plain:example.txt:http://example.com/example.txt bool ParseDownloadMetadata(const string16& metadata, string16* mime_type, - FilePath* file_name, + base::FilePath* file_name, GURL* url); // Create a new file at the specified path. If the file already exists, try to // insert the sequential unifier to produce a new file, like foo-01.txt. // Return a FileStream if successful. -net::FileStream* CreateFileStreamForDrop(FilePath* file_path); +net::FileStream* CreateFileStreamForDrop(base::FilePath* file_path); // Implementation of DownloadFileObserver to finalize the download process. class PromiseFileFinalizer : public ui::DownloadFileObserver { @@ -47,7 +51,7 @@ class PromiseFileFinalizer : public ui::DownloadFileObserver { virtual ~PromiseFileFinalizer(); // DownloadFileObserver methods. - virtual void OnDownloadCompleted(const FilePath& file_path); + virtual void OnDownloadCompleted(const base::FilePath& file_path); virtual void OnDownloadAborted(); private: diff --git a/cef1/libcef/external_popup_menu_mac.mm b/cef1/libcef/external_popup_menu_mac.mm index b895598c9..757f2b25e 100644 --- a/cef1/libcef/external_popup_menu_mac.mm +++ b/cef1/libcef/external_popup_menu_mac.mm @@ -6,9 +6,9 @@ #include "libcef/external_popup_menu_mac.h" #include "libcef/browser_impl.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebRect.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebExternalPopupMenuClient.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenuInfo.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h" #include "webkit/glue/webmenurunner_mac.h" ExternalPopupMenu::ExternalPopupMenu( diff --git a/cef1/libcef/geolocation_client.cc b/cef1/libcef/geolocation_client.cc index 978f7b18b..5985347dc 100644 --- a/cef1/libcef/geolocation_client.cc +++ b/cef1/libcef/geolocation_client.cc @@ -19,13 +19,13 @@ #include "content/public/common/content_client.h" #include "content/public/common/content_switches.h" #include "net/url_request/url_request_context_getter.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebGeolocationPermissionRequest.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebGeolocationPermissionRequestManager.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebGeolocationClient.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebGeolocationPosition.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebGeolocationError.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" #include "webkit/user_agent/user_agent.h" using WebKit::WebGeolocationController; diff --git a/cef1/libcef/http_header_utils.h b/cef1/libcef/http_header_utils.h index c762d1347..ab381cff4 100644 --- a/cef1/libcef/http_header_utils.h +++ b/cef1/libcef/http_header_utils.h @@ -9,8 +9,8 @@ #include #include "include/cef_request.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebHTTPHeaderVisitor.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebHTTPHeaderVisitor.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" namespace HttpHeaderUtils { diff --git a/cef1/libcef/nplugin_impl.cc b/cef1/libcef/nplugin_impl.cc index 326e20089..c90710339 100644 --- a/cef1/libcef/nplugin_impl.cc +++ b/cef1/libcef/nplugin_impl.cc @@ -18,7 +18,7 @@ void UIT_RegisterPlugin(CefPluginInfo* plugin_info) { webkit::WebPluginInfo info; - info.path = FilePath(CefString(&plugin_info->unique_name)); + info.path = base::FilePath(CefString(&plugin_info->unique_name)); info.name = CefString(&plugin_info->display_name); info.version = CefString(&plugin_info->version); info.desc = CefString(&plugin_info->description); diff --git a/cef1/libcef/origin_whitelist_impl.cc b/cef1/libcef/origin_whitelist_impl.cc index 548a09d72..93db1b53a 100644 --- a/cef1/libcef/origin_whitelist_impl.cc +++ b/cef1/libcef/origin_whitelist_impl.cc @@ -7,9 +7,9 @@ #include "libcef/cef_thread.h" #include "base/bind.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" using WebKit::WebSecurityPolicy; using WebKit::WebString; diff --git a/cef1/libcef/request_impl.cc b/cef1/libcef/request_impl.cc index c379511cd..e6048abd6 100644 --- a/cef1/libcef/request_impl.cc +++ b/cef1/libcef/request_impl.cc @@ -18,7 +18,7 @@ #include "net/base/upload_file_element_reader.h" #include "net/http/http_request_headers.h" #include "net/url_request/url_request.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLRequest.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebURLRequest.h" using WebKit::WebHTTPBody; using WebKit::WebString; @@ -558,7 +558,7 @@ void CefPostDataElementImpl::Get(net::UploadElement& element) { if (type_ == PDE_TYPE_BYTES) { element.SetToBytes(static_cast(data_.bytes.bytes), data_.bytes.size); } else if (type_ == PDE_TYPE_FILE) { - FilePath path = FilePath(CefString(&data_.filename)); + base::FilePath path = FilePath(CefString(&data_.filename)); element.SetToFilePath(path); } else { NOTREACHED(); @@ -575,7 +575,7 @@ net::UploadElementReader* CefPostDataElementImpl::Get() { return new BytesElementReader(make_scoped_ptr(element)); } else if (type_ == PDE_TYPE_FILE) { net::UploadElement* element = new net::UploadElement(); - FilePath path = FilePath(CefString(&data_.filename)); + base::FilePath path = base::FilePath(CefString(&data_.filename)); element->SetToFilePath(path); return new FileElementReader(make_scoped_ptr(element)); } else { diff --git a/cef1/libcef/request_impl.h b/cef1/libcef/request_impl.h index f3f430a1f..0fd1514c8 100644 --- a/cef1/libcef/request_impl.h +++ b/cef1/libcef/request_impl.h @@ -7,7 +7,7 @@ #pragma once #include "include/cef_request.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebHTTPBody.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebHTTPBody.h" namespace net { class HttpRequestHeaders; diff --git a/cef1/libcef/response_impl.cc b/cef1/libcef/response_impl.cc index 0dc9c6807..02aa1b095 100644 --- a/cef1/libcef/response_impl.cc +++ b/cef1/libcef/response_impl.cc @@ -8,8 +8,8 @@ #include "base/logging.h" #include "base/stringprintf.h" #include "net/http/http_response_headers.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLResponse.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebURLResponse.h" CefResponseImpl::CefResponseImpl() : status_code_(0) { diff --git a/cef1/libcef/scheme_impl.cc b/cef1/libcef/scheme_impl.cc index 608df7817..7bdc49d1b 100644 --- a/cef1/libcef/scheme_impl.cc +++ b/cef1/libcef/scheme_impl.cc @@ -39,8 +39,8 @@ #include "net/url_request/url_request_http_job.h" #include "net/url_request/url_request_job.h" #include "net/url_request/url_request_job_factory.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" using net::URLRequestStatus; using WebKit::WebSecurityPolicy; diff --git a/cef1/libcef/web_drag_source_gtk.cc b/cef1/libcef/web_drag_source_gtk.cc index fd5208035..052e77263 100644 --- a/cef1/libcef/web_drag_source_gtk.cc +++ b/cef1/libcef/web_drag_source_gtk.cc @@ -22,20 +22,20 @@ #include "googleurl/src/gurl.h" #include "net/base/file_stream.h" #include "net/base/net_util.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebDragData.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebPoint.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebImage.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebDragData.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPoint.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebImage.h" #include "ui/base/clipboard/custom_data_helper.h" #include "ui/base/dragdrop/os_exchange_data.h" #include "ui/base/dragdrop/os_exchange_data_provider_gtk.h" #include "ui/base/dragdrop/gtk_dnd_util.h" #include "ui/base/gtk/gtk_screen_util.h" +#include "ui/base/window_open_disposition.h" #include "ui/gfx/gtk_util.h" #include "webkit/glue/webdropdata.h" -#include "webkit/glue/window_open_disposition.h" using WebKit::WebDragOperation; using WebKit::WebDragOperationsMask; @@ -257,7 +257,7 @@ void WebDragSource::OnDragDataGet(GtkWidget* sender, GURL file_url(std::string(reinterpret_cast(file_url_value), file_url_len)); g_free(file_url_value); - FilePath file_path; + base::FilePath file_path; if (net::FileURLToFilePath(file_url, &file_path)) { // Open the file as a stream. scoped_ptr file_stream( @@ -333,7 +333,7 @@ void WebDragSource::OnDragBegin(GtkWidget* sender, if (!download_url_.is_empty()) { // Generate the file name based on both mime type and proposed file name. std::string default_name = "download"; - FilePath generated_download_file_name = + base::FilePath generated_download_file_name = net::GenerateFileName(download_url_, std::string(), std::string(), diff --git a/cef1/libcef/web_drag_source_gtk.h b/cef1/libcef/web_drag_source_gtk.h index 157f6b598..53934a83e 100644 --- a/cef1/libcef/web_drag_source_gtk.h +++ b/cef1/libcef/web_drag_source_gtk.h @@ -91,7 +91,7 @@ class WebDragSource : public base::RefCounted, string16 wide_download_mime_type_; // The file name to be saved to for a drag-out download. - FilePath download_file_name_; + base::FilePath download_file_name_; // The URL to download from for a drag-out download. GURL download_url_; diff --git a/cef1/libcef/web_drag_source_mac.h b/cef1/libcef/web_drag_source_mac.h index 80809ba1b..96f140e1d 100644 --- a/cef1/libcef/web_drag_source_mac.h +++ b/cef1/libcef/web_drag_source_mac.h @@ -41,7 +41,7 @@ struct WebDropData; NSDragOperation dragOperationMask_; // The file name to be saved to for a drag-out download. - FilePath downloadFileName_; + base::FilePath downloadFileName_; // The URL to download from for a drag-out download. GURL downloadURL_; diff --git a/cef1/libcef/web_drag_source_mac.mm b/cef1/libcef/web_drag_source_mac.mm index e361a6e4b..7d8996704 100644 --- a/cef1/libcef/web_drag_source_mac.mm +++ b/cef1/libcef/web_drag_source_mac.mm @@ -21,9 +21,9 @@ #include "net/base/file_stream.h" #include "net/base/net_util.h" #import "third_party/mozilla/NSPasteboard+Utils.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebPoint.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/platform/WebPoint.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" #include "ui/gfx/mac/nsimage_cache.h" #include "webkit/glue/webdropdata.h" @@ -44,19 +44,20 @@ NSString* const kNSURLTitlePboardType = @"public.url-name"; // Converts a string16 into a FilePath. Use this method instead of // -[NSString fileSystemRepresentation] to prevent exceptions from being thrown. // See http://crbug.com/78782 for more info. -FilePath FilePathFromFilename(const string16& filename) { +base::FilePath FilePathFromFilename(const string16& filename) { NSString* str = SysUTF16ToNSString(filename); char buf[MAXPATHLEN]; if (![str getFileSystemRepresentation:buf maxLength:sizeof(buf)]) - return FilePath(); - return FilePath(buf); + return base::FilePath(); + return base::FilePath(buf); } // Returns a filename appropriate for the drop data // TODO(viettrungluu): Refactor to make it common across platforms, // and move it somewhere sensible. -FilePath GetFileNameFromDragData(const WebDropData& drop_data) { - FilePath file_name(FilePathFromFilename(drop_data.file_description_filename)); +base::FilePath GetFileNameFromDragData(const WebDropData& drop_data) { + base::FilePath file_name( + FilePathFromFilename(drop_data.file_description_filename)); std::string extension = file_name.Extension(); file_name = file_name.BaseName().RemoveExtension(); @@ -109,7 +110,7 @@ void PromiseWriterHelper(const WebDropData& drop_data, if (image == nil) { // No drag image was provided so create one. - FilePath path = _Context->GetResourcesFilePath(); + base::FilePath path = _Context->GetResourcesFilePath(); path = path.AppendASCII("urlIcon.png"); image = [[NSImage alloc] initWithContentsOfFile:SysUTF8ToNSString(path.value())]; @@ -303,10 +304,10 @@ void PromiseWriterHelper(const WebDropData& drop_data, return nil; } - FilePath fileName = downloadFileName_.empty() ? + base::FilePath fileName = downloadFileName_.empty() ? GetFileNameFromDragData(*dropData_) : downloadFileName_; - FilePath filePath(SysNSStringToUTF8(path)); - filePath = filePath.Append(fileName); + base::FilePath filePath(SysNSStringToUTF8(path)); + base::filePath = filePath.Append(fileName); // CreateFileStreamForDrop() will call file_util::PathExists(), // which is blocking. Since this operation is already blocking the @@ -377,7 +378,7 @@ void PromiseWriterHelper(const WebDropData& drop_data, fileExtension = GetFileNameFromDragData(*dropData_).Extension(); } else { string16 mimeType; - FilePath fileName; + base::FilePath fileName; if (drag_download_util::ParseDownloadMetadata( dropData_->download_metadata, &mimeType, diff --git a/cef1/libcef/web_drag_source_win.cc b/cef1/libcef/web_drag_source_win.cc index af307c978..9ae3787a7 100644 --- a/cef1/libcef/web_drag_source_win.cc +++ b/cef1/libcef/web_drag_source_win.cc @@ -8,7 +8,7 @@ #include "libcef/cef_thread.h" #include "base/bind.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPoint.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebPoint.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" using WebKit::WebDragOperationNone; diff --git a/cef1/libcef/web_drag_utils_mac.mm b/cef1/libcef/web_drag_utils_mac.mm index 9570df418..7701a7321 100644 --- a/cef1/libcef/web_drag_utils_mac.mm +++ b/cef1/libcef/web_drag_utils_mac.mm @@ -66,7 +66,7 @@ GURL GetFileURLFromDropData(id info) { } static BOOL IsSupportedFileURL(const GURL& url) { - FilePath full_path; + base::FilePath full_path; net::FileURLToFilePath(url, &full_path); std::string mime_type; diff --git a/cef1/libcef/web_drop_target_gtk.cc b/cef1/libcef/web_drop_target_gtk.cc index 15e66bc71..8ec7141ac 100644 --- a/cef1/libcef/web_drop_target_gtk.cc +++ b/cef1/libcef/web_drop_target_gtk.cc @@ -17,16 +17,16 @@ #include "base/bind.h" #include "googleurl/src/gurl.h" #include "net/base/net_util.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebDragData.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPoint.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebDragData.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebPoint.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" #include "ui/base/clipboard/custom_data_helper.h" #include "ui/base/dragdrop/os_exchange_data.h" #include "ui/base/dragdrop/os_exchange_data_provider_gtk.h" #include "ui/base/dragdrop/gtk_dnd_util.h" +#include "ui/base/window_open_disposition.h" #include "ui/base/gtk/gtk_screen_util.h" #include "webkit/glue/webdropdata.h" -#include "webkit/glue/window_open_disposition.h" using WebKit::WebDragOperation; using WebKit::WebDragOperationNone; @@ -193,7 +193,7 @@ void WebDropTarget::OnDragDataReceived( // file URLs are never set as the URL content for the drop. // TODO(estade): Can the filenames have a non-UTF8 encoding? GURL url(*uri_iter); - FilePath file_path; + base::FilePath file_path; if (url.SchemeIs("file") && net::FileURLToFilePath(url, &file_path)) { drop_data_->filenames.push_back( diff --git a/cef1/libcef/web_drop_target_mac.mm b/cef1/libcef/web_drop_target_mac.mm index 64145a787..323f2ea85 100644 --- a/cef1/libcef/web_drop_target_mac.mm +++ b/cef1/libcef/web_drop_target_mac.mm @@ -13,12 +13,12 @@ #include "base/logging.h" #include "base/sys_string_conversions.h" #import "third_party/mozilla/NSPasteboard+Utils.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebDragData.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebDragData.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebPoint.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDragOperation.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPoint.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" +#include "ui/base/window_open_disposition.h" #include "webkit/glue/webdropdata.h" -#include "webkit/glue/window_open_disposition.h" using WebKit::WebDragOperation; using WebKit::WebDragOperationsMask; diff --git a/cef1/libcef/web_drop_target_win.cc b/cef1/libcef/web_drop_target_win.cc index 0a240871b..4c4bdb58a 100644 --- a/cef1/libcef/web_drop_target_win.cc +++ b/cef1/libcef/web_drop_target_win.cc @@ -15,14 +15,14 @@ #include "googleurl/src/gurl.h" #include "net/base/net_util.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebDragData.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPoint.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebDragData.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebPoint.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" #include "ui/base/clipboard/clipboard_util_win.h" #include "ui/base/dragdrop/os_exchange_data.h" #include "ui/base/dragdrop/os_exchange_data_provider_win.h" +#include "ui/base/window_open_disposition.h" #include "webkit/glue/webdropdata.h" -#include "webkit/glue/window_open_disposition.h" using WebKit::WebDragOperation; using WebKit::WebDragOperationNone; diff --git a/cef1/libcef/web_urlrequest_impl.cc b/cef1/libcef/web_urlrequest_impl.cc index 16c8a30d1..bac96394c 100644 --- a/cef1/libcef/web_urlrequest_impl.cc +++ b/cef1/libcef/web_urlrequest_impl.cc @@ -12,10 +12,10 @@ #include "base/logging.h" #include "base/memory/scoped_ptr.h" #include "googleurl/src/gurl.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLError.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLLoaderClient.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLRequest.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLResponse.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebURLError.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebURLLoaderClient.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebURLRequest.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebURLResponse.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" #include "webkit/glue/weburlloader_impl.h" diff --git a/cef1/libcef/webview_host_mac.mm b/cef1/libcef/webview_host_mac.mm index cb4e93127..078bc3d28 100644 --- a/cef1/libcef/webview_host_mac.mm +++ b/cef1/libcef/webview_host_mac.mm @@ -10,9 +10,9 @@ #include "libcef/cef_context.h" #include "skia/ext/platform_canvas.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h" #include "third_party/WebKit/Source/WebKit/chromium/public/mac/WebInputEventFactory.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" #include "ui/gfx/rect.h" #include "ui/gfx/size.h" diff --git a/cef1/libcef/webwidget_host.cc b/cef1/libcef/webwidget_host.cc index 0f08d15d8..1fd675ff4 100644 --- a/cef1/libcef/webwidget_host.cc +++ b/cef1/libcef/webwidget_host.cc @@ -8,7 +8,7 @@ #include "base/bind.h" #include "base/logging.h" #include "base/message_loop.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebWidget.h" #include "webkit/glue/webkit_glue.h" diff --git a/cef1/libcef/webwidget_host.h b/cef1/libcef/webwidget_host.h index 9934660da..af7623335 100644 --- a/cef1/libcef/webwidget_host.h +++ b/cef1/libcef/webwidget_host.h @@ -18,8 +18,8 @@ #include "base/time.h" #include "base/timer.h" #include "skia/ext/platform_canvas.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebRect.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextInputType.h" #include "third_party/skia/include/core/SkRegion.h" #include "ui/gfx/native_widget_types.h" diff --git a/cef1/libcef/webwidget_host_gtk.cc b/cef1/libcef/webwidget_host_gtk.cc index 7b90dc1a0..d79434e8e 100644 --- a/cef1/libcef/webwidget_host_gtk.cc +++ b/cef1/libcef/webwidget_host_gtk.cc @@ -13,12 +13,12 @@ #include "skia/ext/bitmap_platform_device.h" #include "skia/ext/platform_canvas.h" #include "skia/ext/platform_device.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h" #include "third_party/WebKit/Source/WebKit/chromium/public/gtk/WebInputEventFactory.h" #include "third_party/WebKit/Source/WebKit/chromium/public/x11/WebScreenInfoFactory.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenu.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h" using WebKit::WebInputEventFactory; using WebKit::WebKeyboardEvent; diff --git a/cef1/libcef/webwidget_host_mac.mm b/cef1/libcef/webwidget_host_mac.mm index 243b19fcc..66d235e90 100644 --- a/cef1/libcef/webwidget_host_mac.mm +++ b/cef1/libcef/webwidget_host_mac.mm @@ -17,12 +17,12 @@ MSVC_POP_WARNING(); #include "base/bind.h" #import "base/logging.h" #import "skia/ext/platform_canvas.h" +#import "third_party/WebKit/Source/Platform/chromium/public/WebSize.h" #import "third_party/WebKit/Source/WebKit/chromium/public/mac/WebInputEventFactory.h" #import "third_party/WebKit/Source/WebKit/chromium/public/mac/WebScreenInfoFactory.h" #import "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" #import "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenu.h" #import "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" -#import "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h" #import "third_party/skia/include/core/SkRegion.h" #import "ui/gfx/rect.h" #import "ui/gfx/size.h" diff --git a/cef1/libcef/webwidget_host_win.cc b/cef1/libcef/webwidget_host_win.cc index 6eb04686b..609457a44 100644 --- a/cef1/libcef/webwidget_host_win.cc +++ b/cef1/libcef/webwidget_host_win.cc @@ -12,14 +12,14 @@ #include "base/bind.h" #include "base/logging.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebRect.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebVector.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderline.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenu.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h" #include "third_party/WebKit/Source/WebKit/chromium/public/win/WebInputEventFactory.h" #include "third_party/WebKit/Source/WebKit/chromium/public/win/WebScreenInfoFactory.h" #include "third_party/skia/include/core/SkRegion.h" diff --git a/cef1/patch/patch.cfg b/cef1/patch/patch.cfg index 7f0711026..0ef2d8a1d 100644 --- a/cef1/patch/patch.cfg +++ b/cef1/patch/patch.cfg @@ -21,6 +21,11 @@ patches = [ 'name': 'zlib', 'path': '../third_party/zlib/', }, + { + # http://code.google.com/p/gyp/issues/detail?id=443 + 'name': 'message_loop_443', + 'path': '../base/', + }, { # http://code.google.com/p/chromiumembedded/issues/detail?id=364 'name': 'spi_webcore_364', diff --git a/cef1/patch/patches/message_loop_443.patch b/cef1/patch/patches/message_loop_443.patch new file mode 100644 index 000000000..6448d9b4e --- /dev/null +++ b/cef1/patch/patches/message_loop_443.patch @@ -0,0 +1,13 @@ +Index: message_loop.cc +=================================================================== +--- message_loop.cc (revision 181864) ++++ message_loop.cc (working copy) +@@ -193,7 +193,7 @@ + MessageLoop::~MessageLoop() { + DCHECK_EQ(this, current()); + +- DCHECK(!run_loop_); ++ //DCHECK(!run_loop_); + + // Clean up any unprocessed tasks, but take care: deleting a task could + // result in the addition of more tasks (e.g., via DeleteSoon). We set a