Update to Chromium revision 181864.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1108 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2013-02-25 23:44:37 +00:00
parent 83f568d071
commit 116b6de654
83 changed files with 356 additions and 328 deletions

View File

@ -17,5 +17,5 @@
{ {
'chromium_url': 'http://src.chromium.org/svn/trunk/src', 'chromium_url': 'http://src.chromium.org/svn/trunk/src',
'chromium_revision': '176706', 'chromium_revision': '181864',
} }

View File

@ -35,7 +35,7 @@ class BrowserFrontendProxy
void clear_appcache_system() { system_ = NULL; } void clear_appcache_system() { system_ = NULL; }
virtual void OnCacheSelected(int host_id, virtual void OnCacheSelected(int host_id,
const appcache::AppCacheInfo& info) { const appcache::AppCacheInfo& info) OVERRIDE {
if (!system_) if (!system_)
return; return;
if (system_->is_io_thread()) { if (system_->is_io_thread()) {
@ -51,7 +51,7 @@ class BrowserFrontendProxy
} }
virtual void OnStatusChanged(const std::vector<int>& host_ids, virtual void OnStatusChanged(const std::vector<int>& host_ids,
appcache::Status status) { appcache::Status status) OVERRIDE {
if (!system_) if (!system_)
return; return;
if (system_->is_io_thread()) if (system_->is_io_thread())
@ -66,7 +66,7 @@ class BrowserFrontendProxy
} }
virtual void OnEventRaised(const std::vector<int>& host_ids, virtual void OnEventRaised(const std::vector<int>& host_ids,
appcache::EventID event_id) { appcache::EventID event_id) OVERRIDE {
if (!system_) if (!system_)
return; return;
if (system_->is_io_thread()) if (system_->is_io_thread())
@ -82,7 +82,7 @@ class BrowserFrontendProxy
virtual void OnProgressEventRaised(const std::vector<int>& host_ids, virtual void OnProgressEventRaised(const std::vector<int>& host_ids,
const GURL& url, const GURL& url,
int num_total, int num_complete) { int num_total, int num_complete) OVERRIDE {
if (!system_) if (!system_)
return; return;
if (system_->is_io_thread()) if (system_->is_io_thread())
@ -98,7 +98,7 @@ class BrowserFrontendProxy
} }
virtual void OnErrorEventRaised(const std::vector<int>& host_ids, virtual void OnErrorEventRaised(const std::vector<int>& host_ids,
const std::string& message) { const std::string& message) OVERRIDE {
if (!system_) if (!system_)
return; return;
if (system_->is_io_thread()) if (system_->is_io_thread())
@ -115,7 +115,7 @@ class BrowserFrontendProxy
virtual void OnLogMessage(int host_id, virtual void OnLogMessage(int host_id,
appcache::LogLevel log_level, appcache::LogLevel log_level,
const std::string& message) { const std::string& message) OVERRIDE {
if (!system_) if (!system_)
return; return;
if (system_->is_io_thread()) if (system_->is_io_thread())
@ -130,12 +130,13 @@ class BrowserFrontendProxy
NOTREACHED(); NOTREACHED();
} }
virtual void OnContentBlocked(int host_id, const GURL& manifest_url) {} virtual void OnContentBlocked(int host_id,
const GURL& manifest_url) OVERRIDE {}
private: private:
friend class base::RefCountedThreadSafe<BrowserFrontendProxy>; friend class base::RefCountedThreadSafe<BrowserFrontendProxy>;
~BrowserFrontendProxy() {} virtual ~BrowserFrontendProxy() {}
BrowserAppCacheSystem* system_; BrowserAppCacheSystem* system_;
}; };
@ -161,7 +162,7 @@ class BrowserBackendProxy
base::Unretained(this)); base::Unretained(this));
} }
virtual void RegisterHost(int host_id) { virtual void RegisterHost(int host_id) OVERRIDE {
if (system_->is_ui_thread()) { if (system_->is_ui_thread()) {
system_->io_message_loop()->PostTask( system_->io_message_loop()->PostTask(
FROM_HERE, 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()) { if (system_->is_ui_thread()) {
system_->io_message_loop()->PostTask( system_->io_message_loop()->PostTask(
FROM_HERE, 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()) { if (system_->is_ui_thread()) {
system_->io_message_loop()->PostTask( system_->io_message_loop()->PostTask(
FROM_HERE, FROM_HERE,
@ -201,7 +202,7 @@ class BrowserBackendProxy
virtual void SelectCache(int host_id, virtual void SelectCache(int host_id,
const GURL& document_url, const GURL& document_url,
const int64 cache_document_was_loaded_from, const int64 cache_document_was_loaded_from,
const GURL& manifest_url) { const GURL& manifest_url) OVERRIDE {
if (system_->is_ui_thread()) { if (system_->is_ui_thread()) {
system_->io_message_loop()->PostTask( system_->io_message_loop()->PostTask(
FROM_HERE, FROM_HERE,
@ -219,7 +220,7 @@ class BrowserBackendProxy
virtual void GetResourceList( virtual void GetResourceList(
int host_id, int host_id,
std::vector<appcache::AppCacheResourceInfo>* resource_infos) { std::vector<appcache::AppCacheResourceInfo>* resource_infos) OVERRIDE {
if (system_->is_ui_thread()) { if (system_->is_ui_thread()) {
system_->io_message_loop()->PostTask( system_->io_message_loop()->PostTask(
FROM_HERE, FROM_HERE,
@ -235,18 +236,20 @@ class BrowserBackendProxy
virtual void SelectCacheForWorker( virtual void SelectCacheForWorker(
int host_id, int host_id,
int parent_process_id, int parent_process_id,
int parent_host_id) { int parent_host_id) OVERRIDE {
NOTIMPLEMENTED(); // Workers are not supported in test_shell. NOTIMPLEMENTED(); // Workers are not supported in test_shell.
} }
virtual void SelectCacheForSharedWorker( virtual void SelectCacheForSharedWorker(
int host_id, int host_id,
int64 appcache_id) { int64 appcache_id) OVERRIDE {
NOTIMPLEMENTED(); // Workers are not supported in test_shell. NOTIMPLEMENTED(); // Workers are not supported in test_shell.
} }
virtual void MarkAsForeignEntry(int host_id, const GURL& document_url, virtual void MarkAsForeignEntry(
int64 cache_document_was_loaded_from) { int host_id,
const GURL& document_url,
int64 cache_document_was_loaded_from) OVERRIDE {
if (system_->is_ui_thread()) { if (system_->is_ui_thread()) {
system_->io_message_loop()->PostTask( system_->io_message_loop()->PostTask(
FROM_HERE, 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()) { if (system_->is_ui_thread()) {
status_result_ = appcache::UNCACHED; status_result_ = appcache::UNCACHED;
event_.Reset(); event_.Reset();
@ -279,7 +282,7 @@ class BrowserBackendProxy
return status_result_; return status_result_;
} }
virtual bool StartUpdate(int host_id) { virtual bool StartUpdate(int host_id) OVERRIDE {
if (system_->is_ui_thread()) { if (system_->is_ui_thread()) {
bool_result_ = false; bool_result_ = false;
event_.Reset(); event_.Reset();
@ -297,7 +300,7 @@ class BrowserBackendProxy
return bool_result_; return bool_result_;
} }
virtual bool SwapCache(int host_id) { virtual bool SwapCache(int host_id) OVERRIDE {
if (system_->is_ui_thread()) { if (system_->is_ui_thread()) {
bool_result_ = false; bool_result_ = false;
event_.Reset(); event_.Reset();
@ -337,7 +340,7 @@ class BrowserBackendProxy
private: private:
friend class base::RefCountedThreadSafe<BrowserBackendProxy>; friend class base::RefCountedThreadSafe<BrowserBackendProxy>;
~BrowserBackendProxy() {} virtual ~BrowserBackendProxy() {}
BrowserAppCacheSystem* system_; BrowserAppCacheSystem* system_;
base::WaitableEvent event_; 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_); DCHECK(!ui_message_loop_);
ui_message_loop_ = MessageLoop::current(); ui_message_loop_ = MessageLoop::current();
cache_directory_ = cache_directory; cache_directory_ = cache_directory;

View File

@ -39,7 +39,7 @@ class BrowserAppCacheSystem {
virtual ~BrowserAppCacheSystem(); virtual ~BrowserAppCacheSystem();
// One-time main UI thread initialization. // One-time main UI thread initialization.
static void InitializeOnUIThread(const FilePath& cache_directory) { static void InitializeOnUIThread(const base::FilePath& cache_directory) {
if (instance_) if (instance_)
instance_->InitOnUIThread(cache_directory); instance_->InitOnUIThread(cache_directory);
} }
@ -86,7 +86,7 @@ class BrowserAppCacheSystem {
friend class BrowserFrontendProxy; friend class BrowserFrontendProxy;
// Instance methods called by our static public methods // 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 InitOnIOThread(net::URLRequestContext* request_context);
void CleanupIOThread(); void CleanupIOThread();
WebKit::WebApplicationCacheHost* CreateCacheHostForWebKit( WebKit::WebApplicationCacheHost* CreateCacheHostForWebKit(
@ -110,7 +110,7 @@ class BrowserAppCacheSystem {
return ui_message_loop_ ? true : false; return ui_message_loop_ ? true : false;
} }
FilePath cache_directory_; base::FilePath cache_directory_;
MessageLoop* io_message_loop_; MessageLoop* io_message_loop_;
MessageLoop* ui_message_loop_; MessageLoop* ui_message_loop_;
scoped_refptr<BrowserBackendProxy> backend_proxy_; scoped_refptr<BrowserBackendProxy> backend_proxy_;

View File

@ -15,8 +15,8 @@
#include "base/threading/platform_thread.h" #include "base/threading/platform_thread.h"
#include "base/utf_string_conversions.h" #include "base/utf_string_conversions.h"
#include "third_party/sqlite/sqlite3.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/WebDatabase.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
#include "webkit/database/database_util.h" #include "webkit/database/database_util.h"
#include "webkit/database/vfs_backend.h" #include "webkit/database/vfs_backend.h"
@ -223,7 +223,7 @@ void BrowserDatabaseSystem::VfsOpenFile(
const string16& vfs_file_name, int desired_flags, const string16& vfs_file_name, int desired_flags,
base::PlatformFile* file_handle, base::WaitableEvent* done_event ) { base::PlatformFile* file_handle, base::WaitableEvent* done_event ) {
DCHECK(db_thread_proxy_->BelongsToCurrentThread()); DCHECK(db_thread_proxy_->BelongsToCurrentThread());
FilePath file_name = GetFullFilePathForVfsFile(vfs_file_name); base::FilePath file_name = GetFullFilePathForVfsFile(vfs_file_name);
if (file_name.empty()) { if (file_name.empty()) {
VfsBackend::OpenTempFileInDirectory( VfsBackend::OpenTempFileInDirectory(
db_tracker_->DatabaseDirectory(), desired_flags, file_handle); db_tracker_->DatabaseDirectory(), desired_flags, file_handle);
@ -243,7 +243,7 @@ void BrowserDatabaseSystem::VfsDeleteFile(
const int kNumDeleteRetries = 3; const int kNumDeleteRetries = 3;
int num_retries = 0; int num_retries = 0;
*result = SQLITE_OK; *result = SQLITE_OK;
FilePath file_name = GetFullFilePathForVfsFile(vfs_file_name); base::FilePath file_name = GetFullFilePathForVfsFile(vfs_file_name);
do { do {
*result = VfsBackend::DeleteFile(file_name, sync_dir); *result = VfsBackend::DeleteFile(file_name, sync_dir);
} while ((++num_retries < kNumDeleteRetries) && } while ((++num_retries < kNumDeleteRetries) &&
@ -293,7 +293,7 @@ FilePath BrowserDatabaseSystem::GetFullFilePathForVfsFile(
const string16& vfs_file_name) { const string16& vfs_file_name) {
DCHECK(db_thread_proxy_->BelongsToCurrentThread()); DCHECK(db_thread_proxy_->BelongsToCurrentThread());
if (vfs_file_name.empty()) // temp file, used for vacuuming if (vfs_file_name.empty()) // temp file, used for vacuuming
return FilePath(); return base::FilePath();
return DatabaseUtil::GetFullFilePathForVfsFile( return DatabaseUtil::GetFullFilePathForVfsFile(
db_tracker_.get(), vfs_file_name); db_tracker_.get(), vfs_file_name);
} }

View File

@ -80,7 +80,7 @@ class BrowserDatabaseSystem : public webkit_database::DatabaseTracker::Observer,
void VfsGetSpaceAvailable(const string16& origin_identifier, void VfsGetSpaceAvailable(const string16& origin_identifier,
int64* result, base::WaitableEvent* done_event); int64* result, base::WaitableEvent* done_event);
FilePath GetFullFilePathForVfsFile(const string16& vfs_file_name); base::FilePath GetFullFilePathForVfsFile(const string16& vfs_file_name);
void ResetTracker(); void ResetTracker();
void ThreadCleanup(base::WaitableEvent* done_event); void ThreadCleanup(base::WaitableEvent* done_event);

View File

@ -8,7 +8,7 @@
#include "base/basictypes.h" #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 { class BrowserDevToolsCallArgs {
public: public:

View File

@ -8,10 +8,10 @@
#include "libcef/browser_impl.h" #include "libcef/browser_impl.h"
#include "libcef/cef_context.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/WebDevToolsAgent.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsFrontend.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/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/WebScriptSource.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"

View File

@ -48,7 +48,7 @@ class DevToolsSchemeHandler : public CefSchemeHandler {
response_length = size_; response_length = size_;
std::string mime_type = "text/plain"; 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->SetMimeType(mime_type);
response->SetStatus(200); response->SetStatus(200);

View File

@ -9,7 +9,7 @@
#include "base/auto_reset.h" #include "base/auto_reset.h"
#include "base/path_service.h" #include "base/path_service.h"
#include "googleurl/src/gurl.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/WebStorageArea.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageEventDispatcher.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageEventDispatcher.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageNamespace.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageNamespace.h"
@ -201,8 +201,8 @@ BrowserDomStorageSystem::BrowserDomStorageSystem()
: weak_factory_(this), : weak_factory_(this),
area_being_processed_(NULL), area_being_processed_(NULL),
next_connection_id_(1) { next_connection_id_(1) {
FilePath local_storage_path; base::FilePath local_storage_path;
FilePath cache_path(_Context->cache_path()); base::FilePath cache_path(_Context->cache_path());
if (!cache_path.empty()) { if (!cache_path.empty()) {
local_storage_path = cache_path.Append(FILE_PATH_LITERAL("Local Storage")); local_storage_path = cache_path.Append(FILE_PATH_LITERAL("Local Storage"));
if (!file_util::PathExists(local_storage_path) && if (!file_util::PathExists(local_storage_path) &&
@ -214,7 +214,7 @@ BrowserDomStorageSystem::BrowserDomStorageSystem()
base::SequencedWorkerPool* worker_pool = _Context->blocking_pool(); 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( new DomStorageWorkerPoolTaskRunner(
worker_pool, worker_pool,
worker_pool->GetNamedSequenceToken("dom_storage_primary"), worker_pool->GetNamedSequenceToken("dom_storage_primary"),

View File

@ -114,7 +114,7 @@ BrowserDragDelegate::~BrowserDragDelegate() {
void BrowserDragDelegate::StartDragging(const WebDropData& drop_data, void BrowserDragDelegate::StartDragging(const WebDropData& drop_data,
WebDragOperationsMask ops, WebDragOperationsMask ops,
const SkBitmap& image, const gfx::ImageSkia& image,
const gfx::Vector2d& image_offset) { const gfx::Vector2d& image_offset) {
DCHECK(CefThread::CurrentlyOn(CefThread::UI)); DCHECK(CefThread::CurrentlyOn(CefThread::UI));
@ -174,7 +174,7 @@ void BrowserDragDelegate::StartBackgroundDragging(
WebDragOperationsMask ops, WebDragOperationsMask ops,
const GURL& page_url, const GURL& page_url,
const std::string& page_encoding, const std::string& page_encoding,
const SkBitmap& image, const gfx::ImageSkia& image,
const gfx::Vector2d& image_offset) { const gfx::Vector2d& image_offset) {
drag_drop_thread_id_ = base::PlatformThread::CurrentId(); drag_drop_thread_id_ = base::PlatformThread::CurrentId();
@ -191,7 +191,7 @@ void BrowserDragDelegate::PrepareDragForDownload(
const std::string& page_encoding) { const std::string& page_encoding) {
// Parse the download metadata. // Parse the download metadata.
string16 mime_type; string16 mime_type;
FilePath file_name; base::FilePath file_name;
GURL download_url; GURL download_url;
if (!drag_download_util::ParseDownloadMetadata(drop_data.download_metadata, if (!drag_download_util::ParseDownloadMetadata(drop_data.download_metadata,
&mime_type, &mime_type,
@ -202,7 +202,7 @@ void BrowserDragDelegate::PrepareDragForDownload(
// Generate the download filename. // Generate the download filename.
std::string content_disposition = std::string content_disposition =
"attachment; filename=" + UTF16ToUTF8(file_name.value()); "attachment; filename=" + UTF16ToUTF8(file_name.value());
FilePath generated_file_name; base::FilePath generated_file_name;
download_util::GenerateFileName(download_url, download_util::GenerateFileName(download_url,
content_disposition, content_disposition,
std::string(), std::string(),
@ -220,7 +220,7 @@ void BrowserDragDelegate::PrepareDragForDownload(
page_url, page_url,
page_encoding, page_encoding,
view_); view_);
ui::OSExchangeData::DownloadFileInfo file_download(FilePath(), ui::OSExchangeData::DownloadFileInfo file_download(base::FilePath(),
download_file.get()); download_file.get());
data->SetDownloadFileInfo(file_download); data->SetDownloadFileInfo(file_download);
@ -231,17 +231,17 @@ void BrowserDragDelegate::PrepareDragForDownload(
void BrowserDragDelegate::PrepareDragForFileContents( void BrowserDragDelegate::PrepareDragForFileContents(
const WebDropData& drop_data, ui::OSExchangeData* data) { const WebDropData& drop_data, ui::OSExchangeData* data) {
static const int kMaxFilenameLength = 255; // FAT and NTFS 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(); string16 extension = file_name.Extension();
file_name = file_name.BaseName().RemoveExtension(); file_name = file_name.BaseName().RemoveExtension();
// Images without ALT text will only have a file extension so we need to // Images without ALT text will only have a file extension so we need to
// synthesize one from the provided extension and URL. // synthesize one from the provided extension and URL.
if (file_name.value().empty()) { if (file_name.value().empty()) {
// Retrieve the name from the URL. // Retrieve the name from the URL.
file_name = FilePath( file_name = base::FilePath(
net::GetSuggestedFilename(drop_data.url, "", "", "", "", "")); net::GetSuggestedFilename(drop_data.url, "", "", "", "", ""));
if (file_name.value().size() + extension.size() > kMaxFilenameLength) { 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())); 0, kMaxFilenameLength - extension.size()));
} }
} }
@ -262,7 +262,7 @@ void BrowserDragDelegate::DoDragging(const WebDropData& drop_data,
WebDragOperationsMask ops, WebDragOperationsMask ops,
const GURL& page_url, const GURL& page_url,
const std::string& page_encoding, const std::string& page_encoding,
const SkBitmap& image, const gfx::ImageSkia& image,
const gfx::Vector2d& image_offset) { const gfx::Vector2d& image_offset) {
ui::OSExchangeData data; ui::OSExchangeData data;

View File

@ -12,9 +12,9 @@
#include "base/memory/ref_counted.h" #include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h" #include "base/memory/scoped_ptr.h"
#include "base/threading/platform_thread.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 "third_party/WebKit/Source/WebKit/chromium/public/WebDragOperation.h"
#include "ui/base/dragdrop/os_exchange_data_provider_win.h" #include "ui/base/dragdrop/os_exchange_data_provider_win.h"
#include "ui/gfx/image/image_skia.h"
#include "ui/gfx/point.h" #include "ui/gfx/point.h"
class BrowserWebViewDelegate; class BrowserWebViewDelegate;
@ -37,7 +37,7 @@ class BrowserDragDelegate
// Called on UI thread. // Called on UI thread.
void StartDragging(const WebDropData& drop_data, void StartDragging(const WebDropData& drop_data,
WebKit::WebDragOperationsMask ops, WebKit::WebDragOperationsMask ops,
const SkBitmap& image, const gfx::ImageSkia& image,
const gfx::Vector2d& image_offset); const gfx::Vector2d& image_offset);
void CancelDrag(); void CancelDrag();
@ -60,7 +60,7 @@ class BrowserDragDelegate
WebKit::WebDragOperationsMask ops, WebKit::WebDragOperationsMask ops,
const GURL& page_url, const GURL& page_url,
const std::string& page_encoding, const std::string& page_encoding,
const SkBitmap& image, const gfx::ImageSkia& image,
const gfx::Vector2d& image_offset); const gfx::Vector2d& image_offset);
// Called on drag-and-drop thread. // Called on drag-and-drop thread.
@ -68,7 +68,7 @@ class BrowserDragDelegate
WebKit::WebDragOperationsMask ops, WebKit::WebDragOperationsMask ops,
const GURL& page_url, const GURL& page_url,
const std::string& page_encoding, const std::string& page_encoding,
const SkBitmap& image, const gfx::ImageSkia& image,
const gfx::Vector2d& image_offset); const gfx::Vector2d& image_offset);
// Called on UI thread. // Called on UI thread.
void EndDragging(); void EndDragging();

View File

@ -15,16 +15,17 @@
#include "base/utf_string_conversions.h" #include "base/utf_string_conversions.h"
#include "googleurl/src/gurl.h" #include "googleurl/src/gurl.h"
#include "net/base/mime_util.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/WebDocument.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileInfo.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/WebFileSystemCallbacks.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystemEntry.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/WebFrame.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.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/base/file_path_string_conversions.h"
#include "webkit/blob/blob_storage_controller.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_task_runners.h"
#include "webkit/fileapi/file_system_url.h" #include "webkit/fileapi/file_system_url.h"
#include "webkit/fileapi/file_system_util.h" #include "webkit/fileapi/file_system_util.h"
@ -55,10 +56,10 @@ namespace {
MessageLoop* g_io_thread; MessageLoop* g_io_thread;
webkit_blob::BlobStorageController* g_blob_storage_controller; 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); DCHECK(g_blob_storage_controller);
FilePath::StringType extension = file_path.Extension(); base::FilePath::StringType extension = file_path.Extension();
if (!extension.empty()) if (!extension.empty())
extension = extension.substr(1); // Strip leading ".". extension = extension.substr(1); // Strip leading ".".
@ -89,6 +90,7 @@ void BrowserFileSystem::CreateContext() {
CefThread::GetMessageLoopProxyForThread(CefThread::IO), CefThread::GetMessageLoopProxyForThread(CefThread::IO),
CefThread::GetMessageLoopProxyForThread(CefThread::FILE), CefThread::GetMessageLoopProxyForThread(CefThread::FILE),
CefThread::GetMessageLoopProxyForThread(CefThread::FILE))), CefThread::GetMessageLoopProxyForThread(CefThread::FILE))),
fileapi::ExternalMountPoints::CreateRefCounted().get(),
NULL /* special storage policy */, NULL /* special storage policy */,
NULL /* quota manager */, NULL /* quota manager */,
_Context->cache_path(), _Context->cache_path(),
@ -133,8 +135,8 @@ void BrowserFileSystem::DeleteFileSystem(
void BrowserFileSystem::move( void BrowserFileSystem::move(
const WebURL& src_path, const WebURL& src_path,
const WebURL& dest_path, WebFileSystemCallbacks* callbacks) { const WebURL& dest_path, WebFileSystemCallbacks* callbacks) {
FileSystemURL src_url(src_path); FileSystemURL src_url(file_system_context()->CrackURL(src_path));
FileSystemURL dest_url(dest_path); FileSystemURL dest_url(file_system_context()->CrackURL(dest_path));
if (!HasFilePermission(src_url, FILE_PERMISSION_WRITE) || if (!HasFilePermission(src_url, FILE_PERMISSION_WRITE) ||
!HasFilePermission(dest_url, FILE_PERMISSION_CREATE)) { !HasFilePermission(dest_url, FILE_PERMISSION_CREATE)) {
callbacks->didFail(WebKit::WebFileErrorSecurity); callbacks->didFail(WebKit::WebFileErrorSecurity);
@ -147,8 +149,8 @@ void BrowserFileSystem::move(
void BrowserFileSystem::copy( void BrowserFileSystem::copy(
const WebURL& src_path, const WebURL& dest_path, const WebURL& src_path, const WebURL& dest_path,
WebFileSystemCallbacks* callbacks) { WebFileSystemCallbacks* callbacks) {
FileSystemURL src_url(src_path); FileSystemURL src_url(file_system_context()->CrackURL(src_path));
FileSystemURL dest_url(dest_path); FileSystemURL dest_url(file_system_context()->CrackURL(dest_path));
if (!HasFilePermission(src_url, FILE_PERMISSION_READ) || if (!HasFilePermission(src_url, FILE_PERMISSION_READ) ||
!HasFilePermission(dest_url, FILE_PERMISSION_CREATE)) { !HasFilePermission(dest_url, FILE_PERMISSION_CREATE)) {
callbacks->didFail(WebKit::WebFileErrorSecurity); callbacks->didFail(WebKit::WebFileErrorSecurity);
@ -160,7 +162,7 @@ void BrowserFileSystem::copy(
void BrowserFileSystem::remove( void BrowserFileSystem::remove(
const WebURL& path, WebFileSystemCallbacks* callbacks) { const WebURL& path, WebFileSystemCallbacks* callbacks) {
FileSystemURL url(path); FileSystemURL url(file_system_context()->CrackURL(path));
if (!HasFilePermission(url, FILE_PERMISSION_WRITE)) { if (!HasFilePermission(url, FILE_PERMISSION_WRITE)) {
callbacks->didFail(WebKit::WebFileErrorSecurity); callbacks->didFail(WebKit::WebFileErrorSecurity);
return; return;
@ -171,7 +173,7 @@ void BrowserFileSystem::remove(
void BrowserFileSystem::removeRecursively( void BrowserFileSystem::removeRecursively(
const WebURL& path, WebFileSystemCallbacks* callbacks) { const WebURL& path, WebFileSystemCallbacks* callbacks) {
FileSystemURL url(path); FileSystemURL url(file_system_context()->CrackURL(path));
if (!HasFilePermission(url, FILE_PERMISSION_WRITE)) { if (!HasFilePermission(url, FILE_PERMISSION_WRITE)) {
callbacks->didFail(WebKit::WebFileErrorSecurity); callbacks->didFail(WebKit::WebFileErrorSecurity);
return; return;
@ -182,7 +184,7 @@ void BrowserFileSystem::removeRecursively(
void BrowserFileSystem::readMetadata( void BrowserFileSystem::readMetadata(
const WebURL& path, WebFileSystemCallbacks* callbacks) { const WebURL& path, WebFileSystemCallbacks* callbacks) {
FileSystemURL url(path); FileSystemURL url(file_system_context()->CrackURL(path));
if (!HasFilePermission(url, FILE_PERMISSION_READ)) { if (!HasFilePermission(url, FILE_PERMISSION_READ)) {
callbacks->didFail(WebKit::WebFileErrorSecurity); callbacks->didFail(WebKit::WebFileErrorSecurity);
return; return;
@ -192,7 +194,7 @@ void BrowserFileSystem::readMetadata(
void BrowserFileSystem::createFile( void BrowserFileSystem::createFile(
const WebURL& path, bool exclusive, WebFileSystemCallbacks* callbacks) { const WebURL& path, bool exclusive, WebFileSystemCallbacks* callbacks) {
FileSystemURL url(path); FileSystemURL url(file_system_context()->CrackURL(path));
if (!HasFilePermission(url, FILE_PERMISSION_CREATE)) { if (!HasFilePermission(url, FILE_PERMISSION_CREATE)) {
callbacks->didFail(WebKit::WebFileErrorSecurity); callbacks->didFail(WebKit::WebFileErrorSecurity);
return; return;
@ -202,7 +204,7 @@ void BrowserFileSystem::createFile(
void BrowserFileSystem::createDirectory( void BrowserFileSystem::createDirectory(
const WebURL& path, bool exclusive, WebFileSystemCallbacks* callbacks) { const WebURL& path, bool exclusive, WebFileSystemCallbacks* callbacks) {
FileSystemURL url(path); FileSystemURL url(file_system_context()->CrackURL(path));
if (!HasFilePermission(url, FILE_PERMISSION_CREATE)) { if (!HasFilePermission(url, FILE_PERMISSION_CREATE)) {
callbacks->didFail(WebKit::WebFileErrorSecurity); callbacks->didFail(WebKit::WebFileErrorSecurity);
return; return;
@ -213,7 +215,7 @@ void BrowserFileSystem::createDirectory(
void BrowserFileSystem::fileExists( void BrowserFileSystem::fileExists(
const WebURL& path, WebFileSystemCallbacks* callbacks) { const WebURL& path, WebFileSystemCallbacks* callbacks) {
FileSystemURL url(path); FileSystemURL url(file_system_context()->CrackURL(path));
if (!HasFilePermission(url, FILE_PERMISSION_READ)) { if (!HasFilePermission(url, FILE_PERMISSION_READ)) {
callbacks->didFail(WebKit::WebFileErrorSecurity); callbacks->didFail(WebKit::WebFileErrorSecurity);
return; return;
@ -223,7 +225,7 @@ void BrowserFileSystem::fileExists(
void BrowserFileSystem::directoryExists( void BrowserFileSystem::directoryExists(
const WebURL& path, WebFileSystemCallbacks* callbacks) { const WebURL& path, WebFileSystemCallbacks* callbacks) {
FileSystemURL url(path); FileSystemURL url(file_system_context()->CrackURL(path));
if (!HasFilePermission(url, FILE_PERMISSION_READ)) { if (!HasFilePermission(url, FILE_PERMISSION_READ)) {
callbacks->didFail(WebKit::WebFileErrorSecurity); callbacks->didFail(WebKit::WebFileErrorSecurity);
return; return;
@ -233,7 +235,7 @@ void BrowserFileSystem::directoryExists(
void BrowserFileSystem::readDirectory( void BrowserFileSystem::readDirectory(
const WebURL& path, WebFileSystemCallbacks* callbacks) { const WebURL& path, WebFileSystemCallbacks* callbacks) {
FileSystemURL url(path); FileSystemURL url(file_system_context()->CrackURL(path));
if (!HasFilePermission(url, FILE_PERMISSION_READ)) { if (!HasFilePermission(url, FILE_PERMISSION_READ)) {
callbacks->didFail(WebKit::WebFileErrorSecurity); callbacks->didFail(WebKit::WebFileErrorSecurity);
return; return;
@ -250,7 +252,7 @@ void BrowserFileSystem::createSnapshotFileAndReadMetadata(
const WebURL& blobURL, const WebURL& blobURL,
const WebURL& path, const WebURL& path,
WebFileSystemCallbacks* callbacks) { WebFileSystemCallbacks* callbacks) {
FileSystemURL url(path); FileSystemURL url(file_system_context()->CrackURL(path));
if (!HasFilePermission(url, FILE_PERMISSION_READ)) { if (!HasFilePermission(url, FILE_PERMISSION_READ)) {
callbacks->didFail(WebKit::WebFileErrorSecurity); callbacks->didFail(WebKit::WebFileErrorSecurity);
return; return;
@ -332,7 +334,7 @@ void BrowserFileSystem::DidFinish(WebFileSystemCallbacks* callbacks,
void BrowserFileSystem::DidGetMetadata(WebFileSystemCallbacks* callbacks, void BrowserFileSystem::DidGetMetadata(WebFileSystemCallbacks* callbacks,
base::PlatformFileError result, base::PlatformFileError result,
const base::PlatformFileInfo& info, const base::PlatformFileInfo& info,
const FilePath& platform_path) { const base::FilePath& platform_path) {
if (result == base::PLATFORM_FILE_OK) { if (result == base::PLATFORM_FILE_OK) {
WebFileInfo web_file_info; WebFileInfo web_file_info;
web_file_info.length = info.size; web_file_info.length = info.size;
@ -396,7 +398,7 @@ void BrowserFileSystem::DidCreateSnapshotFile(
WebFileSystemCallbacks* callbacks, WebFileSystemCallbacks* callbacks,
base::PlatformFileError result, base::PlatformFileError result,
const base::PlatformFileInfo& info, const base::PlatformFileInfo& info,
const FilePath& platform_path, const base::FilePath& platform_path,
const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref) { const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref) {
DCHECK(g_io_thread); DCHECK(g_io_thread);
if (result == base::PLATFORM_FILE_OK) { if (result == base::PLATFORM_FILE_OK) {

View File

@ -8,10 +8,10 @@
#include <vector> #include <vector>
#include "base/file_util_proxy.h" #include "base/files/file_util_proxy.h"
#include "base/id_map.h" #include "base/id_map.h"
#include "base/memory/weak_ptr.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_context.h"
#include "webkit/fileapi/file_system_operation.h" #include "webkit/fileapi/file_system_operation.h"
#include "webkit/fileapi/file_system_types.h" #include "webkit/fileapi/file_system_types.h"
@ -131,7 +131,7 @@ class BrowserFileSystem
void DidGetMetadata(WebKit::WebFileSystemCallbacks* callbacks, void DidGetMetadata(WebKit::WebFileSystemCallbacks* callbacks,
base::PlatformFileError result, base::PlatformFileError result,
const base::PlatformFileInfo& info, const base::PlatformFileInfo& info,
const FilePath& platform_path); const base::FilePath& platform_path);
void DidReadDirectory( void DidReadDirectory(
WebKit::WebFileSystemCallbacks* callbacks, WebKit::WebFileSystemCallbacks* callbacks,
base::PlatformFileError result, base::PlatformFileError result,
@ -147,7 +147,7 @@ class BrowserFileSystem
WebKit::WebFileSystemCallbacks* callbacks, WebKit::WebFileSystemCallbacks* callbacks,
base::PlatformFileError result, base::PlatformFileError result,
const base::PlatformFileInfo& info, const base::PlatformFileInfo& info,
const FilePath& platform_path, const base::FilePath& platform_path,
const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref); const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref);
scoped_refptr<fileapi::FileSystemContext> file_system_context_; scoped_refptr<fileapi::FileSystemContext> file_system_context_;

View File

@ -180,6 +180,7 @@ BrowserFileWriter::BrowserFileWriter(
WebFileWriterClient* client, WebFileWriterClient* client,
FileSystemContext* file_system_context) FileSystemContext* file_system_context)
: WebFileWriterBase(path, client), : WebFileWriterBase(path, client),
file_system_context_(file_system_context),
io_thread_proxy_(new IOThreadProxy(AsWeakPtr(), 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) { void BrowserFileWriter::DoTruncate(const GURL& path, int64 offset) {
FileSystemURL url(path); FileSystemURL url(file_system_context_->CrackURL(path));
io_thread_proxy_->Truncate(url, offset); io_thread_proxy_->Truncate(url, offset);
} }
void BrowserFileWriter::DoWrite( void BrowserFileWriter::DoWrite(
const GURL& path, const GURL& blob_url, int64 offset) { 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); io_thread_proxy_->Write(url, blob_url, offset);
} }

View File

@ -45,6 +45,7 @@ class BrowserFileWriter : public fileapi::WebFileWriterBase,
private: private:
class IOThreadProxy; class IOThreadProxy;
scoped_refptr<fileapi::FileSystemContext> file_system_context_;
scoped_refptr<IOThreadProxy> io_thread_proxy_; scoped_refptr<IOThreadProxy> io_thread_proxy_;
static net::URLRequestContext* request_context_; static net::URLRequestContext* request_context_;
}; };

View File

@ -19,17 +19,17 @@
#include "base/stringprintf.h" #include "base/stringprintf.h"
#include "base/synchronization/waitable_event.h" #include "base/synchronization/waitable_event.h"
#include "base/utf_string_conversions.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/WebDocument.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.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/WebPlugin.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginDocument.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/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/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 "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#include "webkit/glue/glue_serialize.h" #include "webkit/glue/glue_serialize.h"
#include "webkit/plugins/npapi/webplugin_delegate.h" #include "webkit/plugins/npapi/webplugin_delegate.h"

View File

@ -9,9 +9,9 @@
#include "libcef/browser_impl.h" #include "libcef/browser_impl.h"
#include "libcef/browser_settings.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/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 "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#include "webkit/glue/webpreferences.h" #include "webkit/glue/webpreferences.h"

View File

@ -10,9 +10,9 @@
#include "libcef/browser_settings.h" #include "libcef/browser_settings.h"
#include "libcef/browser_webview_mac.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/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 "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#include "webkit/glue/webpreferences.h" #include "webkit/glue/webpreferences.h"

View File

@ -18,11 +18,11 @@
#include "printing/units.h" #include "printing/units.h"
#include "skia/ext/vector_canvas.h" #include "skia/ext/vector_canvas.h"
#include "skia/ext/vector_platform_device_emf_win.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/WebDocument.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.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/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 "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#include "ui/base/win/hwnd_util.h" #include "ui/base/win/hwnd_util.h"
#include "webkit/glue/webpreferences.h" #include "webkit/glue/webpreferences.h"

View File

@ -14,8 +14,8 @@
#include "base/memory/ref_counted.h" #include "base/memory/ref_counted.h"
#include "base/memory/scoped_vector.h" #include "base/memory/scoped_vector.h"
#include "googleurl/src/gurl.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/WebDataSource.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebHTTPBody.h"
#include "include/cef_request.h" #include "include/cef_request.h"

View File

@ -100,8 +100,9 @@ bool BrowserNetworkDelegate::OnCanSetCookie(
return rv == net::OK; return rv == net::OK;
} }
bool BrowserNetworkDelegate::OnCanAccessFile(const net::URLRequest& request, bool BrowserNetworkDelegate::OnCanAccessFile(
const FilePath& path) const { const net::URLRequest& request,
const base::FilePath& path) const {
return true; return true;
} }

View File

@ -50,7 +50,7 @@ class BrowserNetworkDelegate : public net::NetworkDelegate {
const std::string& cookie_line, const std::string& cookie_line,
net::CookieOptions* options) OVERRIDE; net::CookieOptions* options) OVERRIDE;
virtual bool OnCanAccessFile(const net::URLRequest& request, virtual bool OnCanAccessFile(const net::URLRequest& request,
const FilePath& path) const OVERRIDE; const base::FilePath& path) const OVERRIDE;
virtual bool OnCanThrottleRequest( virtual bool OnCanThrottleRequest(
const net::URLRequest& request) const OVERRIDE; const net::URLRequest& request) const OVERRIDE;
virtual int OnBeforeSocketStreamConnect( virtual int OnBeforeSocketStreamConnect(

View File

@ -101,10 +101,6 @@ class CefProxyResolver : public net::ProxyResolver {
virtual net::LoadState GetLoadState(RequestHandle request) const OVERRIDE { virtual net::LoadState GetLoadState(RequestHandle request) const OVERRIDE {
return net::LOAD_STATE_IDLE; return net::LOAD_STATE_IDLE;
} }
virtual net::LoadState GetLoadStateThreadSafe(RequestHandle request) const
OVERRIDE {
return net::LOAD_STATE_IDLE;
}
virtual void CancelSetPacScript() OVERRIDE {} virtual void CancelSetPacScript() OVERRIDE {}
protected: protected:
@ -154,11 +150,11 @@ class CefHttpUserAgentSettings : public net::HttpUserAgentSettings {
BrowserRequestContext::BrowserRequestContext() BrowserRequestContext::BrowserRequestContext()
: ALLOW_THIS_IN_INITIALIZER_LIST(storage_(this)) { : ALLOW_THIS_IN_INITIALIZER_LIST(storage_(this)) {
Init(FilePath(), net::HttpCache::NORMAL, false); Init(base::FilePath(), net::HttpCache::NORMAL, false);
} }
BrowserRequestContext::BrowserRequestContext( BrowserRequestContext::BrowserRequestContext(
const FilePath& cache_path, const base::FilePath& cache_path,
net::HttpCache::Mode cache_mode, net::HttpCache::Mode cache_mode,
bool no_proxy) bool no_proxy)
: ALLOW_THIS_IN_INITIALIZER_LIST(storage_(this)) { : ALLOW_THIS_IN_INITIALIZER_LIST(storage_(this)) {
@ -166,7 +162,7 @@ BrowserRequestContext::BrowserRequestContext(
} }
void BrowserRequestContext::Init( void BrowserRequestContext::Init(
const FilePath& cache_path, const base::FilePath& cache_path,
net::HttpCache::Mode cache_mode, net::HttpCache::Mode cache_mode,
bool no_proxy) { bool no_proxy) {
SetCookieStoragePath(cache_path); SetCookieStoragePath(cache_path);
@ -298,7 +294,7 @@ void BrowserRequestContext::Init(
BrowserRequestContext::~BrowserRequestContext() { BrowserRequestContext::~BrowserRequestContext() {
} }
void BrowserRequestContext::SetCookieStoragePath(const FilePath& path) { void BrowserRequestContext::SetCookieStoragePath(const base::FilePath& path) {
REQUIRE_IOT(); REQUIRE_IOT();
if (cookie_store() && ((cookie_store_path_.empty() && path.empty()) || if (cookie_store() && ((cookie_store_path_.empty() && path.empty()) ||
@ -307,7 +303,7 @@ void BrowserRequestContext::SetCookieStoragePath(const FilePath& path) {
return; return;
} }
FilePath new_path = path; base::FilePath new_path = path;
scoped_refptr<SQLitePersistentCookieStore> persistent_store; scoped_refptr<SQLitePersistentCookieStore> persistent_store;
if (!new_path.empty()) { if (!new_path.empty()) {
@ -316,7 +312,8 @@ void BrowserRequestContext::SetCookieStoragePath(const FilePath& path) {
NOTREACHED() << "Failed to create cookie storage directory"; NOTREACHED() << "Failed to create cookie storage directory";
new_path.clear(); new_path.clear();
} else { } else {
FilePath cookie_path = new_path.Append(FILE_PATH_LITERAL("Cookies")); base::FilePath cookie_path =
new_path.Append(FILE_PATH_LITERAL("Cookies"));
persistent_store = persistent_store =
new SQLitePersistentCookieStore(cookie_path, false, NULL); new SQLitePersistentCookieStore(cookie_path, false, NULL);
} }

View File

@ -15,7 +15,9 @@
#include "net/url_request/url_request_context.h" #include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_storage.h" #include "net/url_request/url_request_context_storage.h"
namespace base {
class FilePath; class FilePath;
}
namespace webkit_blob { namespace webkit_blob {
class BlobStorageController; class BlobStorageController;
@ -30,28 +32,28 @@ class BrowserRequestContext : public net::URLRequestContext {
// Use an on-disk cache at the specified location. Optionally, use the cache // Use an on-disk cache at the specified location. Optionally, use the cache
// in playback or record mode. // in playback or record mode.
BrowserRequestContext(const FilePath& cache_path, BrowserRequestContext(const base::FilePath& cache_path,
net::HttpCache::Mode cache_mode, net::HttpCache::Mode cache_mode,
bool no_proxy); bool no_proxy);
// Set the path used for cookie storage. If |path| is empty memory only // 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 // storage will be used. If the old cookie data is being stored on disk it
// will be flushed and closed. // will be flushed and closed.
void SetCookieStoragePath(const FilePath& path); void SetCookieStoragePath(const base::FilePath& path);
webkit_blob::BlobStorageController* blob_storage_controller() const { webkit_blob::BlobStorageController* blob_storage_controller() const {
return blob_storage_controller_.get(); return blob_storage_controller_.get();
} }
private: 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); bool no_proxy);
net::URLRequestContextStorage storage_; net::URLRequestContextStorage storage_;
scoped_ptr<webkit_blob::BlobStorageController> blob_storage_controller_; scoped_ptr<webkit_blob::BlobStorageController> blob_storage_controller_;
scoped_ptr<net::URLSecurityManager> url_security_manager_; scoped_ptr<net::URLSecurityManager> url_security_manager_;
scoped_ptr<net::URLRequest::Interceptor> url_request_interceptor_; scoped_ptr<net::URLRequest::Interceptor> url_request_interceptor_;
FilePath cookie_store_path_; base::FilePath cookie_store_path_;
}; };
#endif // CEF_LIBCEF_BROWSER_REQUEST_CONTEXT_H_ #endif // CEF_LIBCEF_BROWSER_REQUEST_CONTEXT_H_

View File

@ -458,6 +458,7 @@ class RequestProxy : public net::URLRequest::Delegate,
upload_data_stream.reset( upload_data_stream.reset(
params->request_body->ResolveElementsAndCreateUploadDataStream( params->request_body->ResolveElementsAndCreateUploadDataStream(
_Context->request_context()->blob_storage_controller(), _Context->request_context()->blob_storage_controller(),
_Context->file_system()->file_system_context(),
base::MessageLoopProxy::current())); base::MessageLoopProxy::current()));
} }
@ -613,7 +614,7 @@ class RequestProxy : public net::URLRequest::Delegate,
download_to_file_ = params->download_to_file; download_to_file_ = params->download_to_file;
if (download_to_file_) { if (download_to_file_) {
FilePath path; base::FilePath path;
if (file_util::CreateTemporaryFile(&path)) { if (file_util::CreateTemporaryFile(&path)) {
downloaded_file_ = ShareableFileReference::GetOrCreate( downloaded_file_ = ShareableFileReference::GetOrCreate(
path, ShareableFileReference::DELETE_ON_FINAL_RELEASE, path, ShareableFileReference::DELETE_ON_FINAL_RELEASE,

View File

@ -14,7 +14,7 @@
#include "net/socket_stream/socket_stream_job.h" #include "net/socket_stream/socket_stream_job.h"
#include "net/websockets/websocket_job.h" #include "net/websockets/websocket_job.h"
#include "net/url_request/url_request_context.h" #include "net/url_request/url_request_context.h"
#include "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_bridge.h"
#include "webkit/glue/websocketstreamhandle_delegate.h" #include "webkit/glue/websocketstreamhandle_delegate.h"
@ -36,18 +36,18 @@ class WebSocketStreamHandleBridgeImpl
webkit_glue::WebSocketStreamHandleDelegate* delegate); webkit_glue::WebSocketStreamHandleDelegate* delegate);
// WebSocketStreamHandleBridge methods. // WebSocketStreamHandleBridge methods.
virtual void Connect(const GURL& url); virtual void Connect(const GURL& url) OVERRIDE;
virtual bool Send(const std::vector<char>& data); virtual bool Send(const std::vector<char>& data) OVERRIDE;
virtual void Close(); virtual void Close() OVERRIDE;
// net::SocketStream::Delegate methods. // net::SocketStream::Delegate methods.
virtual void OnConnected(net::SocketStream* req, virtual void OnConnected(net::SocketStream* req,
int max_pending_send_allowed); int max_pending_send_allowed) OVERRIDE;
virtual void OnSentData(net::SocketStream* req, virtual void OnSentData(net::SocketStream* req,
int amount_sent); int amount_sent) OVERRIDE;
virtual void OnReceivedData(net::SocketStream* req, virtual void OnReceivedData(net::SocketStream* req,
const char* data, int len); const char* data, int len) OVERRIDE;
virtual void OnClose(net::SocketStream* req); virtual void OnClose(net::SocketStream* req) OVERRIDE;
private: private:
virtual ~WebSocketStreamHandleBridgeImpl(); virtual ~WebSocketStreamHandleBridgeImpl();

View File

@ -7,8 +7,8 @@
#include "base/bind.h" #include "base/bind.h"
#include "base/message_loop.h" #include "base/message_loop.h"
#include "googleurl/src/gurl.h" #include "googleurl/src/gurl.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebBlobData.h" #include "third_party/WebKit/Source/Platform/chromium/public/WebBlobData.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" #include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h"
#include "webkit/base/file_path_string_conversions.h" #include "webkit/base/file_path_string_conversions.h"
#include "webkit/blob/blob_data.h" #include "webkit/blob/blob_data.h"
#include "webkit/blob/blob_storage_controller.h" #include "webkit/blob/blob_storage_controller.h"

View File

@ -7,7 +7,7 @@
#pragma once #pragma once
#include "base/memory/ref_counted.h" #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; class GURL;

View File

@ -15,7 +15,7 @@
#include "base/synchronization/waitable_event.h" #include "base/synchronization/waitable_event.h"
#include "net/cookies/cookie_store.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::WebString;
using WebKit::WebURL; using WebKit::WebURL;

View File

@ -7,7 +7,7 @@
#define CEF_LIBCEF_BROWSER_WEBCOOKIEJAR_IMPL_H_ #define CEF_LIBCEF_BROWSER_WEBCOOKIEJAR_IMPL_H_
#pragma once #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 { namespace net {
class CookieStore; class CookieStore;

View File

@ -20,9 +20,9 @@ MSVC_POP_WARNING();
#include "base/logging.h" #include "base/logging.h"
#include "base/string_util.h" #include "base/string_util.h"
#include "net/base/mime_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/WebFrame.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.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/glue/webkit_glue.h"
#include "webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h" #include "webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h"
#include "webkit/gpu/webgraphicscontext3d_in_process_impl.h" #include "webkit/gpu/webgraphicscontext3d_in_process_impl.h"

View File

@ -11,7 +11,7 @@
#include "include/internal/cef_types.h" #include "include/internal/cef_types.h"
#include "base/compiler_specific.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" #include "v8/include/v8.h"
#if defined(OS_WIN) #if defined(OS_WIN)

View File

@ -56,8 +56,8 @@ BrowserWebKitInit::BrowserWebKitInit()
prerendering_support_.reset(new BrowserPrerenderingSupport); prerendering_support_.reset(new BrowserPrerenderingSupport);
WebKit::WebPrerenderingSupport::initialize(prerendering_support_.get()); WebKit::WebPrerenderingSupport::initialize(prerendering_support_.get());
FilePath appcache_path; base::FilePath appcache_path;
FilePath cache_path = _Context->cache_path(); base::FilePath cache_path = _Context->cache_path();
if (!cache_path.empty()) { if (!cache_path.empty()) {
appcache_path = cache_path.Append(FILE_PATH_LITERAL("AppCache")); appcache_path = cache_path.Append(FILE_PATH_LITERAL("AppCache"));
if (!file_util::PathExists(appcache_path) && if (!file_util::PathExists(appcache_path) &&

View File

@ -17,7 +17,7 @@
#include "libcef/browser_webcookiejar_impl.h" #include "libcef/browser_webcookiejar_impl.h"
#include "libcef/simple_clipboard_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/simple_webmimeregistry_impl.h"
#include "webkit/glue/webclipboard_impl.h" #include "webkit/glue/webclipboard_impl.h"
#include "webkit/glue/webfileutilities_impl.h" #include "webkit/glue/webfileutilities_impl.h"

View File

@ -31,10 +31,17 @@
#include "base/string_util.h" #include "base/string_util.h"
#include "base/stringprintf.h" #include "base/stringprintf.h"
#include "net/base/net_errors.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/WebConsoleMessage.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.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/WebDataSource.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileError.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/WebKit.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.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/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/WebPluginParams.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebRange.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/WebScreenInfo.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageNamespace.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/WebView.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebWindowFeatures.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/native_widget_types.h"
#include "ui/gfx/point.h" #include "ui/gfx/point.h"
#include "webkit/appcache/web_application_cache_host_impl.h" #include "webkit/appcache/web_application_cache_host_impl.h"
@ -65,7 +66,6 @@
#include "webkit/glue/glue_serialize.h" #include "webkit/glue/glue_serialize.h"
#include "webkit/glue/webpreferences.h" #include "webkit/glue/webpreferences.h"
#include "webkit/glue/weburlrequest_extradata_impl.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/plugin_list.h"
#include "webkit/plugins/npapi/webplugin_delegate_impl.h" #include "webkit/plugins/npapi/webplugin_delegate_impl.h"
#include "webkit/plugins/npapi/webplugin_impl.h" #include "webkit/plugins/npapi/webplugin_impl.h"
@ -309,7 +309,7 @@ bool BrowserWebViewDelegate::runFileChooser(
const WebFileChooserParams& params, const WebFileChooserParams& params,
WebKit::WebFileChooserCompletion* chooser_completion) { WebKit::WebFileChooserCompletion* chooser_completion) {
// Support file open dialog. // Support file open dialog.
std::vector<FilePath> file_names; std::vector<base::FilePath> file_names;
std::vector<std::string> mime_types; std::vector<std::string> mime_types;
for (size_t i = 0; i < params.acceptTypes.size(); ++i) for (size_t i = 0; i < params.acceptTypes.size(); ++i)
@ -529,7 +529,7 @@ void BrowserWebViewDelegate::willAddPrerender(WebKit::WebPrerender* prerender) {
// WebPluginPageDelegate ----------------------------------------------------- // WebPluginPageDelegate -----------------------------------------------------
WebKit::WebPlugin* BrowserWebViewDelegate::CreatePluginReplacement( WebKit::WebPlugin* BrowserWebViewDelegate::CreatePluginReplacement(
const FilePath& file_path) { const base::FilePath& file_path) {
return NULL; return NULL;
} }

View File

@ -23,13 +23,13 @@
#include "base/memory/scoped_ptr.h" #include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h" #include "base/memory/weak_ptr.h"
#include "build/build_config.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/WebContextMenuData.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileChooserParams.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/WebFrameClient.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPermissionClient.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/WebPrerendererClient.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebViewClient.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebViewClient.h"
#include "webkit/glue/webcursor.h" #include "webkit/glue/webcursor.h"
#include "webkit/plugins/npapi/webplugin_page_delegate.h" #include "webkit/plugins/npapi/webplugin_page_delegate.h"
@ -56,7 +56,10 @@ class WebDropTarget;
class CefBrowserImpl; class CefBrowserImpl;
class GURL; class GURL;
class WebWidgetHost; class WebWidgetHost;
namespace base {
class FilePath; class FilePath;
}
class BrowserWebViewDelegate : public WebKit::WebViewClient, class BrowserWebViewDelegate : public WebKit::WebViewClient,
public WebKit::WebFrameClient, public WebKit::WebFrameClient,
@ -227,10 +230,10 @@ class BrowserWebViewDelegate : public WebKit::WebViewClient,
// webkit_glue::WebPluginPageDelegate // webkit_glue::WebPluginPageDelegate
virtual webkit::npapi::WebPluginDelegate* CreatePluginDelegate( virtual webkit::npapi::WebPluginDelegate* CreatePluginDelegate(
const FilePath& file_path, const base::FilePath& file_path,
const std::string& mime_type) OVERRIDE; const std::string& mime_type) OVERRIDE;
virtual WebKit::WebPlugin* CreatePluginReplacement( virtual WebKit::WebPlugin* CreatePluginReplacement(
const FilePath& file_path) OVERRIDE; const base::FilePath& file_path) OVERRIDE;
virtual void CreatedPluginWindow( virtual void CreatedPluginWindow(
gfx::PluginWindowHandle handle) OVERRIDE; gfx::PluginWindowHandle handle) OVERRIDE;
virtual void WillDestroyPluginWindow( virtual void WillDestroyPluginWindow(
@ -315,10 +318,10 @@ class BrowserWebViewDelegate : public WebKit::WebViewClient,
CefString* result); CefString* result);
// Called to show the file chooser dialog. // Called to show the file chooser dialog.
bool ShowFileChooser(std::vector<FilePath>& file_names, bool ShowFileChooser(std::vector<base::FilePath>& file_names,
bool multi_select, bool multi_select,
const WebKit::WebString& title, const WebKit::WebString& title,
const FilePath& default_file, const base::FilePath& default_file,
const std::vector<std::string>& accept_mime_types); const std::vector<std::string>& accept_mime_types);
// Called to show status messages. // Called to show status messages.

View File

@ -12,23 +12,23 @@
#include "base/message_loop.h" #include "base/message_loop.h"
#include "base/string_util.h" #include "base/string_util.h"
#include "net/base/net_errors.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/WebContextMenuData.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.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/WebDocument.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenu.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/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 "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/native_widget_types.h"
#include "ui/gfx/gtk_util.h" #include "ui/gfx/gtk_util.h"
#include "ui/gfx/point.h" #include "ui/gfx/point.h"
#include "webkit/glue/webdropdata.h" #include "webkit/glue/webdropdata.h"
#include "webkit/glue/webpreferences.h" #include "webkit/glue/webpreferences.h"
#include "webkit/glue/webkit_glue.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/plugin_list.h"
#include "webkit/plugins/npapi/webplugin.h" #include "webkit/plugins/npapi/webplugin.h"
#include "webkit/plugins/npapi/webplugin_delegate_impl.h" #include "webkit/plugins/npapi/webplugin_delegate_impl.h"
@ -180,7 +180,7 @@ bool ShowJSPromptDialog(GtkWidget* window,
return (result == GTK_RESPONSE_OK); return (result == GTK_RESPONSE_OK);
} }
bool ShowJSFileChooser(GtkWidget* window, FilePath* path) { bool ShowJSFileChooser(GtkWidget* window, base::FilePath* path) {
// Create the widgets. // Create the widgets.
GtkWidget* dialog = gtk_file_chooser_dialog_new( GtkWidget* dialog = gtk_file_chooser_dialog_new(
"Open File", "Open File",
@ -193,8 +193,10 @@ bool ShowJSFileChooser(GtkWidget* window, FilePath* path) {
gtk_widget_show_all(dialog); gtk_widget_show_all(dialog);
int result = gtk_dialog_run(GTK_DIALOG(dialog)); int result = gtk_dialog_run(GTK_DIALOG(dialog));
if (result == GTK_RESPONSE_ACCEPT) if (result == GTK_RESPONSE_ACCEPT) {
*path = FilePath(gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog))); *path = base::FilePath(gtk_file_chooser_get_filename(
GTK_FILE_CHOOSER(dialog)));
}
gtk_widget_destroy(dialog); gtk_widget_destroy(dialog);
@ -448,7 +450,7 @@ void BrowserWebViewDelegate::runModal() {
// WebPluginPageDelegate ------------------------------------------------------ // WebPluginPageDelegate ------------------------------------------------------
webkit::npapi::WebPluginDelegate* BrowserWebViewDelegate::CreatePluginDelegate( webkit::npapi::WebPluginDelegate* BrowserWebViewDelegate::CreatePluginDelegate(
const FilePath& path, const base::FilePath& path,
const std::string& mime_type) { const std::string& mime_type) {
return webkit::npapi::WebPluginDelegateImpl::Create(path, mime_type); return webkit::npapi::WebPluginDelegateImpl::Create(path, mime_type);
} }
@ -553,15 +555,15 @@ bool BrowserWebViewDelegate::ShowJavaScriptPrompt(
} }
bool BrowserWebViewDelegate::ShowFileChooser( bool BrowserWebViewDelegate::ShowFileChooser(
std::vector<FilePath>& file_names, std::vector<base::FilePath>& file_names,
bool multi_select, bool multi_select,
const WebKit::WebString& title, const WebKit::WebString& title,
const FilePath& default_file, const base::FilePath& default_file,
const std::vector<std::string>& accept_mime_types) { const std::vector<std::string>& accept_mime_types) {
gfx::NativeView view = browser_->UIT_GetMainWndHandle(); gfx::NativeView view = browser_->UIT_GetMainWndHandle();
GtkWidget* window = gtk_widget_get_toplevel(GTK_WIDGET(view)); GtkWidget* window = gtk_widget_get_toplevel(GTK_WIDGET(view));
FilePath file_name; base::FilePath file_name;
bool resp = ShowJSFileChooser(window, &file_name); bool resp = ShowJSFileChooser(window, &file_name);
if (resp) if (resp)
file_names.push_back(file_name); file_names.push_back(file_name);

View File

@ -16,13 +16,13 @@
#include "base/utf_string_conversions.h" #include "base/utf_string_conversions.h"
#include "base/threading/thread_restrictions.h" #include "base/threading/thread_restrictions.h"
#include "skia/ext/skia_utils_mac.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/WebContextMenuData.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.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/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/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/WebPopupMenu.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#include "ui/base/layout.h" #include "ui/base/layout.h"
@ -440,7 +440,7 @@ void BrowserWebViewDelegate::runModal() {
// WebPluginPageDelegate ------------------------------------------------------ // WebPluginPageDelegate ------------------------------------------------------
webkit::npapi::WebPluginDelegate* BrowserWebViewDelegate::CreatePluginDelegate( webkit::npapi::WebPluginDelegate* BrowserWebViewDelegate::CreatePluginDelegate(
const FilePath& path, const base::FilePath& path,
const std::string& mime_type) { const std::string& mime_type) {
WebWidgetHost *host = GetWidgetHost(); WebWidgetHost *host = GetWidgetHost();
if (!host) if (!host)
@ -548,10 +548,10 @@ bool BrowserWebViewDelegate::ShowJavaScriptPrompt(
// Called to show the file chooser dialog. // Called to show the file chooser dialog.
bool BrowserWebViewDelegate::ShowFileChooser( bool BrowserWebViewDelegate::ShowFileChooser(
std::vector<FilePath>& file_names, std::vector<base::FilePath>& file_names,
bool multi_select, bool multi_select,
const WebKit::WebString& title, const WebKit::WebString& title,
const FilePath& default_file, const base::FilePath& default_file,
const std::vector<std::string>& accept_mime_types) { const std::vector<std::string>& accept_mime_types) {
NSOpenPanel* dialog = [NSOpenPanel openPanel]; NSOpenPanel* dialog = [NSOpenPanel openPanel];
if (!title.isNull()) if (!title.isNull())
@ -598,8 +598,10 @@ bool BrowserWebViewDelegate::ShowFileChooser(
int i, count = [urls count]; int i, count = [urls count];
for (i=0; i<count; i++) { for (i=0; i<count; i++) {
NSURL* url = [urls objectAtIndex:i]; NSURL* url = [urls objectAtIndex:i];
if ([url isFileURL]) if ([url isFileURL]) {
file_names.push_back(FilePath(base::SysNSStringToUTF8([url path]))); file_names.push_back(
base::FilePath(base::SysNSStringToUTF8([url path])));
}
} }
return true; return true;

View File

@ -29,23 +29,23 @@
#include "base/win/registry.h" #include "base/win/registry.h"
#include "net/base/mime_util.h" #include "net/base/mime_util.h"
#include "net/base/net_errors.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/WebContextMenuData.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.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/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/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 "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#include "ui/base/l10n/l10n_util.h" #include "ui/base/l10n/l10n_util.h"
#include "ui/base/window_open_disposition.h"
#include "ui/gfx/gdi_util.h" #include "ui/gfx/gdi_util.h"
#include "ui/gfx/native_widget_types.h" #include "ui/gfx/native_widget_types.h"
#include "ui/gfx/point.h" #include "ui/gfx/point.h"
#include "webkit/glue/webdropdata.h" #include "webkit/glue/webdropdata.h"
#include "webkit/glue/webpreferences.h" #include "webkit/glue/webpreferences.h"
#include "webkit/glue/webkit_glue.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/plugin_list.h"
#include "webkit/plugins/npapi/webplugin.h" #include "webkit/plugins/npapi/webplugin.h"
#include "webkit/plugins/npapi/webplugin_delegate_impl.h" #include "webkit/plugins/npapi/webplugin_delegate_impl.h"
@ -222,7 +222,7 @@ std::wstring GetFilterStringFromAcceptTypes(
descriptions.push_back(std::wstring()); descriptions.push_back(std::wstring());
} else { } else {
// Otherwise convert mime type to one or more extensions. // Otherwise convert mime type to one or more extensions.
std::vector<FilePath::StringType> ext; std::vector<base::FilePath::StringType> ext;
std::wstring ext_str; std::wstring ext_str;
net::GetExtensionsForMimeType(ascii_type, &ext); net::GetExtensionsForMimeType(ascii_type, &ext);
if (ext.size() > 0) { if (ext.size() > 0) {
@ -499,7 +499,10 @@ void BrowserWebViewDelegate::startDragging(
} }
drag_delegate_ = new BrowserDragDelegate(this); 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()); gfx::Point(image_offset).OffsetFromOrigin());
} }
@ -559,7 +562,7 @@ void BrowserWebViewDelegate::runModal() {
// WebPluginPageDelegate ------------------------------------------------------ // WebPluginPageDelegate ------------------------------------------------------
webkit::npapi::WebPluginDelegate* BrowserWebViewDelegate::CreatePluginDelegate( webkit::npapi::WebPluginDelegate* BrowserWebViewDelegate::CreatePluginDelegate(
const FilePath& file_path, const base::FilePath& file_path,
const std::string& mime_type) { const std::string& mime_type) {
WebViewHost* host = browser_->UIT_GetWebViewHost(); WebViewHost* host = browser_->UIT_GetWebViewHost();
if (!host) if (!host)
@ -803,7 +806,7 @@ bool BrowserWebViewDelegate::ShowJavaScriptPrompt(WebFrame* webframe,
const CefString& message, const CefString& message,
const CefString& default_value, const CefString& default_value,
CefString* result) { CefString* result) {
FilePath file_path; base::FilePath file_path;
HMODULE hModule = NULL; HMODULE hModule = NULL;
// Try to load the dialog from the DLL. // Try to load the dialog from the DLL.
@ -840,7 +843,8 @@ namespace {
// from chrome/browser/views/shell_dialogs_win.cc // 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; OPENFILENAME ofn;
// We must do this otherwise the ofn's FlagsEx may be initialized to random // 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); bool success = !!GetOpenFileName(&ofn);
if (success) if (success)
*path = FilePath(filename); *path = base::FilePath(filename);
return success; return success;
} }
bool RunOpenMultiFileDialog(const std::wstring& filter, HWND owner, bool RunOpenMultiFileDialog(const std::wstring& filter, HWND owner,
std::vector<FilePath>* paths) { std::vector<base::FilePath>* paths) {
OPENFILENAME ofn; OPENFILENAME ofn;
// We must do this otherwise the ofn's FlagsEx may be initialized to random // 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); bool success = !!GetOpenFileName(&ofn);
if (success) { if (success) {
std::vector<FilePath> files; std::vector<base::FilePath> files;
const wchar_t* selection = ofn.lpstrFile; const wchar_t* selection = ofn.lpstrFile;
while (*selection) { // Empty string indicates end of list. 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. // Skip over filename and null-terminator.
selection += files.back().value().length() + 1; selection += files.back().value().length() + 1;
} }
@ -910,8 +914,8 @@ bool RunOpenMultiFileDialog(const std::wstring& filter, HWND owner,
} else { } else {
// Otherwise, the first string is the path, and the remainder are // Otherwise, the first string is the path, and the remainder are
// filenames. // filenames.
std::vector<FilePath>::iterator path = files.begin(); std::vector<base::FilePath>::iterator path = files.begin();
for (std::vector<FilePath>::iterator file = path + 1; for (std::vector<base::FilePath>::iterator file = path + 1;
file != files.end(); ++file) { file != files.end(); ++file) {
paths->push_back(path->Append(*file)); paths->push_back(path->Append(*file));
} }
@ -923,10 +927,10 @@ bool RunOpenMultiFileDialog(const std::wstring& filter, HWND owner,
} // namespace } // namespace
bool BrowserWebViewDelegate::ShowFileChooser( bool BrowserWebViewDelegate::ShowFileChooser(
std::vector<FilePath>& file_names, std::vector<base::FilePath>& file_names,
bool multi_select, bool multi_select,
const WebKit::WebString& title, const WebKit::WebString& title,
const FilePath& default_file, const base::FilePath& default_file,
const std::vector<std::string>& accept_mime_types) { const std::vector<std::string>& accept_mime_types) {
bool result = false; bool result = false;
const std::wstring& filter = const std::wstring& filter =
@ -936,7 +940,7 @@ bool BrowserWebViewDelegate::ShowFileChooser(
result = RunOpenMultiFileDialog(filter, browser_->UIT_GetMainWndHandle(), result = RunOpenMultiFileDialog(filter, browser_->UIT_GetMainWndHandle(),
&file_names); &file_names);
} else { } else {
FilePath file_name; base::FilePath file_name;
result = RunOpenFileDialog(filter, browser_->UIT_GetMainWndHandle(), result = RunOpenFileDialog(filter, browser_->UIT_GetMainWndHandle(),
&file_name); &file_name);
if (result) if (result)

View File

@ -75,20 +75,20 @@ class CefResourceBundleDelegate : public ui::ResourceBundle::Delegate {
void set_allow_pack_file_load(bool val) { allow_pack_file_load_ = val; } void set_allow_pack_file_load(bool val) { allow_pack_file_load_ = val; }
private: private:
virtual FilePath GetPathForResourcePack( virtual base::FilePath GetPathForResourcePack(
const FilePath& pack_path, const base::FilePath& pack_path,
ui::ScaleFactor scale_factor) OVERRIDE { ui::ScaleFactor scale_factor) OVERRIDE {
// Only allow the cef pack file to load. // Only allow the cef pack file to load.
if (!context_->settings().pack_loading_disabled && allow_pack_file_load_) if (!context_->settings().pack_loading_disabled && allow_pack_file_load_)
return pack_path; 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 { const std::string& locale) OVERRIDE {
if (!context_->settings().pack_loading_disabled) if (!context_->settings().pack_loading_disabled)
return pack_path; return pack_path;
return FilePath(); return base::FilePath();
} }
virtual gfx::Image GetImageNamed(int resource_id) OVERRIDE { virtual gfx::Image GetImageNamed(int resource_id) OVERRIDE {
@ -253,7 +253,7 @@ bool CefContext::Initialize(const CefSettings& settings,
settings_ = settings; settings_ = settings;
application_ = application; application_ = application;
cache_path_ = FilePath(CefString(&settings.cache_path)); cache_path_ = base::FilePath(CefString(&settings.cache_path));
if (!cache_path_.empty() && if (!cache_path_.empty() &&
!file_util::PathExists(cache_path_) && !file_util::PathExists(cache_path_) &&
!file_util::CreateDirectory(cache_path_)) { !file_util::CreateDirectory(cache_path_)) {
@ -372,14 +372,14 @@ CefRefPtr<CefBrowserImpl> CefContext::GetBrowserByID(int id) {
void CefContext::InitializeResourceBundle() { void CefContext::InitializeResourceBundle() {
#if !defined(OS_WIN) #if !defined(OS_WIN)
FilePath chrome_pak_file; base::FilePath chrome_pak_file;
#endif #endif
FilePath devtools_pak_file, locales_dir; base::FilePath devtools_pak_file, locales_dir;
if (!settings_.pack_loading_disabled) { if (!settings_.pack_loading_disabled) {
FilePath resources_dir_path; base::FilePath resources_dir_path;
if (settings_.resources_dir_path.length > 0) 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()) if (resources_dir_path.empty())
resources_dir_path = GetResourcesFilePath(); resources_dir_path = GetResourcesFilePath();
@ -393,7 +393,7 @@ void CefContext::InitializeResourceBundle() {
} }
if (settings_.locales_dir_path.length > 0) 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()) if (!locales_dir.empty())
PathService::Override(ui::DIR_LOCALES, locales_dir); PathService::Override(ui::DIR_LOCALES, locales_dir);
@ -476,7 +476,7 @@ base::StringPiece CefContext::GetDataResource(int resource_id) const {
#if defined(OS_WIN) #if defined(OS_WIN)
if (value.empty()) { if (value.empty()) {
FilePath file_path; base::FilePath file_path;
HMODULE hModule = NULL; HMODULE hModule = NULL;
// Try to load the resource from the DLL. // 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) // Use webkit's broken image icon (16x16)
static std::string broken_image_data; static std::string broken_image_data;
if (broken_image_data.empty()) { 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 // 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 // use a PNG. The GIF doesn't have the color range needed to correctly
// match the TIFF they use in Safari. // 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. // Use webkit's text area resizer image.
static std::string resize_corner_data; static std::string resize_corner_data;
if (resize_corner_data.empty()) { if (resize_corner_data.empty()) {
FilePath path = GetResourcesFilePath(); base::FilePath path = GetResourcesFilePath();
path = path.AppendASCII("textAreaResizeCorner.png"); path = path.AppendASCII("textAreaResizeCorner.png");
bool success = file_util::ReadFileToString(path, &resize_corner_data); bool success = file_util::ReadFileToString(path, &resize_corner_data);
if (!success) { if (!success) {
@ -536,20 +536,20 @@ base::StringPiece CefContext::GetDataResource(int resource_id) const {
return value; return value;
} }
FilePath CefContext::GetResourcesFilePath() const { base::FilePath CefContext::GetResourcesFilePath() const {
#if defined(OS_MACOSX) #if defined(OS_MACOSX)
// Start out with the path to the running executable. // Start out with the path to the running executable.
FilePath execPath; base::FilePath execPath;
PathService::Get(base::FILE_EXE, &execPath); PathService::Get(base::FILE_EXE, &execPath);
// Get the main bundle path. // Get the main bundle path.
FilePath bundlePath = base::mac::GetAppBundlePath(execPath); base::FilePath bundlePath = base::mac::GetAppBundlePath(execPath);
// Go into the Contents/Resources directory. // Go into the Contents/Resources directory.
return bundlePath.Append(FILE_PATH_LITERAL("Contents")) return bundlePath.Append(FILE_PATH_LITERAL("Contents"))
.Append(FILE_PATH_LITERAL("Resources")); .Append(FILE_PATH_LITERAL("Resources"));
#else #else
FilePath pak_dir; base::FilePath pak_dir;
PathService::Get(base::DIR_MODULE, &pak_dir); PathService::Get(base::DIR_MODULE, &pak_dir);
return pak_dir; return pak_dir;
#endif #endif

View File

@ -62,11 +62,11 @@ class CefContext : public CefBase {
string16 GetLocalizedString(int message_id) const; string16 GetLocalizedString(int message_id) const;
base::StringPiece GetDataResource(int resource_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, // Retrieve the path at which cache data will be stored on disk. If empty,
// cache data will be stored in-memory. // 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_; } const CefSettings& settings() const { return settings_; }
CefRefPtr<CefApp> application() const { return application_; } CefRefPtr<CefApp> application() const { return application_; }
@ -122,7 +122,7 @@ class CefContext : public CefBase {
CefSettings settings_; CefSettings settings_;
CefRefPtr<CefApp> application_; CefRefPtr<CefApp> application_;
FilePath cache_path_; base::FilePath cache_path_;
base::ScopedTempDir cache_temp_dir_; base::ScopedTempDir cache_temp_dir_;
BrowserRequestContext* request_context_; BrowserRequestContext* request_context_;

View File

@ -8,6 +8,7 @@
#include "libcef/cef_process_sub_thread.h" #include "libcef/cef_process_sub_thread.h"
#include "libcef/cef_process_ui_thread.h" #include "libcef/cef_process_ui_thread.h"
#include "base/run_loop.h"
#include "base/synchronization/waitable_event.h" #include "base/synchronization/waitable_event.h"
#include "base/threading/thread.h" #include "base/threading/thread.h"
@ -16,17 +17,8 @@ class CefMessageLoopForUI : public MessageLoopForUI {
typedef MessageLoopForUI inherited; typedef MessageLoopForUI inherited;
public: public:
CefMessageLoopForUI() CefMessageLoopForUI() {
: is_iterating_(true) {
} }
#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. // Returns the MessageLoopForUI of the current thread.
static CefMessageLoopForUI* current() { static CefMessageLoopForUI* current() {
@ -35,30 +27,18 @@ class CefMessageLoopForUI : public MessageLoopForUI {
return static_cast<CefMessageLoopForUI*>(loop); return static_cast<CefMessageLoopForUI*>(loop);
} }
virtual bool DoIdleWork() {
bool valueToRet = inherited::DoIdleWork();
if (is_iterating_)
pump_->Quit();
return valueToRet;
}
// Do a single interation of the UI message loop. // Do a single interation of the UI message loop.
void DoMessageLoopIteration() { void DoMessageLoopIteration() {
Run(); base::RunLoop run_loop;
run_loop.RunUntilIdle();
} }
// Run the UI message loop. // Run the UI message loop.
void RunMessageLoop() { void RunMessageLoop() {
is_iterating_ = false; Run();
DoMessageLoopIteration();
} }
bool is_iterating() { return is_iterating_; }
private: private:
// True if the message loop is doing one iteration at a time.
bool is_iterating_;
DISALLOW_COPY_AND_ASSIGN(CefMessageLoopForUI); DISALLOW_COPY_AND_ASSIGN(CefMessageLoopForUI);
}; };
@ -90,7 +70,6 @@ CefProcess::~CefProcess() {
void CefProcess::DoMessageLoopIteration() { void CefProcess::DoMessageLoopIteration() {
DCHECK(CalledOnValidThread() && ui_message_loop_.get() != NULL); DCHECK(CalledOnValidThread() && ui_message_loop_.get() != NULL);
DCHECK(ui_message_loop_->is_iterating());
ui_message_loop_->DoMessageLoopIteration(); ui_message_loop_->DoMessageLoopIteration();
} }

View File

@ -36,7 +36,7 @@ CefProcessIOThread::~CefProcessIOThread() {
void CefProcessIOThread::Init() { void CefProcessIOThread::Init() {
CefThread::Init(); CefThread::Init();
FilePath cache_path(_Context->cache_path()); base::FilePath cache_path(_Context->cache_path());
request_context_.reset(new BrowserRequestContext(cache_path, request_context_.reset(new BrowserRequestContext(cache_path,
net::HttpCache::NORMAL, false)); net::HttpCache::NORMAL, false));
_Context->set_request_context(request_context_.get()); _Context->set_request_context(request_context_.get());

View File

@ -76,7 +76,7 @@ void CefProcessUIThread::Init() {
logging::SetMinLogLevel(settings.log_severity); 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::DcheckState dcheck_state =
logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS; logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS;
if (settings.release_dcheck_enabled) if (settings.release_dcheck_enabled)
@ -168,12 +168,12 @@ void CefProcessUIThread::Init() {
cef_string_t str; cef_string_t str;
memset(&str, 0, sizeof(str)); memset(&str, 0, sizeof(str));
FilePath path; base::FilePath path;
int size = cef_string_list_size(settings.extra_plugin_paths); int size = cef_string_list_size(settings.extra_plugin_paths);
for (int i = 0; i < size; ++i) { for (int i = 0; i < size; ++i) {
if (!cef_string_list_value(settings.extra_plugin_paths, i, &str)) if (!cef_string_list_value(settings.extra_plugin_paths, i, &str))
continue; continue;
path = FilePath(CefString(&str)); path = base::FilePath(CefString(&str));
webkit::npapi::PluginList::Singleton()->AddExtraPluginPath(path); webkit::npapi::PluginList::Singleton()->AddExtraPluginPath(path);
} }
} }

View File

@ -45,7 +45,7 @@ class CefCommandLineImpl : public CefCommandLine {
virtual void SetProgram(const CefString& program) OVERRIDE { virtual void SetProgram(const CefString& program) OVERRIDE {
AutoLock lock_scope(this); AutoLock lock_scope(this);
command_line_.SetProgram(FilePath(program)); command_line_.SetProgram(base::FilePath(program));
} }
virtual bool HasSwitches() OVERRIDE { virtual bool HasSwitches() OVERRIDE {

View File

@ -206,9 +206,9 @@ bool CefCookieManagerImpl::DeleteCookies(const CefString& url,
bool CefCookieManagerImpl::SetStoragePath(const CefString& path) { bool CefCookieManagerImpl::SetStoragePath(const CefString& path) {
if (CefThread::CurrentlyOn(CefThread::IO)) { if (CefThread::CurrentlyOn(CefThread::IO)) {
FilePath new_path; base::FilePath new_path;
if (!path.empty()) if (!path.empty())
new_path = FilePath(path); new_path = base::FilePath(path);
if (is_global_) { if (is_global_) {
// Global path changes are handled by the request context. // 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"; NOTREACHED() << "Failed to create cookie storage directory";
new_path.clear(); new_path.clear();
} else { } else {
FilePath cookie_path = new_path.Append(FILE_PATH_LITERAL("Cookies")); base::FilePath cookie_path = new_path.Append(FILE_PATH_LITERAL("Cookies"));
persistent_store = persistent_store =
new SQLitePersistentCookieStore(cookie_path, false, NULL); new SQLitePersistentCookieStore(cookie_path, false, NULL);
} }

View File

@ -33,7 +33,7 @@ class CefCookieManagerImpl : public CefCookieManager {
private: private:
scoped_refptr<net::CookieMonster> cookie_monster_; scoped_refptr<net::CookieMonster> cookie_monster_;
bool is_global_; bool is_global_;
FilePath storage_path_; base::FilePath storage_path_;
IMPLEMENT_REFCOUNTING(CefCookieManagerImpl); IMPLEMENT_REFCOUNTING(CefCookieManagerImpl);
}; };

View File

@ -7,13 +7,13 @@
#include "libcef/cef_thread.h" #include "libcef/cef_thread.h"
#include "base/logging.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/WebDocument.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.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/WebFrame.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebNode.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/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::WebDocument;
using WebKit::WebElement; using WebKit::WebElement;

View File

@ -7,8 +7,8 @@
#include "libcef/dom_document_impl.h" #include "libcef/dom_document_impl.h"
#include "base/logging.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/WebDOMEvent.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
using WebKit::WebDOMEvent; using WebKit::WebDOMEvent;
using WebKit::WebString; using WebKit::WebString;

View File

@ -13,6 +13,7 @@
#include "base/string_util.h" #include "base/string_util.h"
#include "base/threading/non_thread_safe.h" #include "base/threading/non_thread_safe.h"
#include "base/utf_string_conversions.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/WebDocument.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDOMEvent.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDOMEvent.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDOMEventListener.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/WebInputElement.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebNode.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/WebSelectElement.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
using WebKit::WebDocument; using WebKit::WebDocument;
using WebKit::WebDOMEvent; using WebKit::WebDOMEvent;

View File

@ -89,9 +89,9 @@ bool IsReservedName(const string16& filename) {
// Create an extension based on the file name and mime type. // Create an extension based on the file name and mime type.
// From chrome/browser/download/download_util.cc // 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, const std::string& mime_type,
FilePath::StringType* generated_extension) { base::FilePath::StringType* generated_extension) {
// We're worried about two things here: // We're worried about two things here:
// //
// 1) Usability. If the site fails to provide a file extension, we want to // 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. // from integrating with the user's shell.
// See if our file name already contains an extension. // 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()) if (!extension.empty())
extension.erase(extension.begin()); // Erase preceding '.'. extension.erase(extension.begin()); // Erase preceding '.'.
#if defined(OS_WIN) #if defined(OS_WIN)
static const FilePath::CharType default_extension[] = static const base::FilePath::CharType default_extension[] =
FILE_PATH_LITERAL("download"); FILE_PATH_LITERAL("download");
// Rename shell-integrated extensions. // 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 // download. |file_name| can either be just the file name or it can be a
// full path to a file. // full path to a file.
// From chrome/browser/download/download_util.cc // 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 // Make sure we get the right file extension
FilePath::StringType extension; base::FilePath::StringType extension;
GenerateExtension(*file_name, mime_type, &extension); GenerateExtension(*file_name, mime_type, &extension);
*file_name = file_name->ReplaceExtension(extension); *file_name = file_name->ReplaceExtension(extension);
#if defined(OS_WIN) #if defined(OS_WIN)
// Prepend "_" to the file name if it's a reserved name // 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()); DCHECK(!leaf_name.empty());
if (IsReservedName(leaf_name)) { 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(); *file_name = file_name->DirName();
if (file_name->value() == FilePath::kCurrentDirectory) { if (file_name->value() == base::FilePath::kCurrentDirectory) {
*file_name = FilePath(leaf_name); *file_name = base::FilePath(leaf_name);
} else { } else {
*file_name = file_name->Append(leaf_name); *file_name = file_name->Append(leaf_name);
} }
@ -163,7 +164,7 @@ void GenerateFileName(const GURL& url,
const std::string& referrer_charset, const std::string& referrer_charset,
const std::string& mime_type, const std::string& mime_type,
const std::string& suggested_name, const std::string& suggested_name,
FilePath* generated_name) { base::FilePath* generated_name) {
string16 new_name = net::GetSuggestedFilename(GURL(url), string16 new_name = net::GetSuggestedFilename(GURL(url),
content_disposition, content_disposition,
referrer_charset, referrer_charset,
@ -176,9 +177,10 @@ void GenerateFileName(const GURL& url,
// However, I'm just shuffling wrong code around, at least not adding // However, I'm just shuffling wrong code around, at least not adding
// to it. // to it.
#if defined(OS_WIN) #if defined(OS_WIN)
*generated_name = FilePath(new_name); *generated_name = base::FilePath(new_name);
#else #else
*generated_name = FilePath(base::SysWideToNativeMB(UTF16ToWide(new_name))); *generated_name =
base::FilePath(base::SysWideToNativeMB(UTF16ToWide(new_name)));
#endif #endif
DCHECK(!generated_name->empty()); DCHECK(!generated_name->empty());

View File

@ -10,7 +10,10 @@
#include <string> #include <string>
class GURL; class GURL;
namespace base {
class FilePath; class FilePath;
}
namespace download_util { namespace download_util {
@ -20,7 +23,7 @@ void GenerateFileName(const GURL& url,
const std::string& referrer_charset, const std::string& referrer_charset,
const std::string& mime_type, const std::string& mime_type,
const std::string& suggested_name, const std::string& suggested_name,
FilePath* generated_name); base::FilePath* generated_name);
} // namespace download_util } // namespace download_util

View File

@ -13,7 +13,7 @@
#include "net/base/file_stream.h" #include "net/base/file_stream.h"
DragDownloadFile::DragDownloadFile( DragDownloadFile::DragDownloadFile(
const FilePath& file_name_or_path, const base::FilePath& file_name_or_path,
scoped_ptr<net::FileStream> file_stream, scoped_ptr<net::FileStream> file_stream,
const GURL& url, const GURL& url,
const GURL& referrer, const GURL& referrer,

View File

@ -33,7 +33,7 @@ class DragDownloadFile : public ui::DownloadFileProvider {
// created. Only UI thread is involved. // created. Only UI thread is involved.
// The file path and file stream should be provided as the first two // The file path and file stream should be provided as the first two
// parameters. // parameters.
DragDownloadFile(const FilePath& file_name_or_path, DragDownloadFile(const base::FilePath& file_name_or_path,
scoped_ptr<net::FileStream> file_stream, scoped_ptr<net::FileStream> file_stream,
const GURL& url, const GURL& url,
const GURL& referrer, const GURL& referrer,
@ -64,15 +64,15 @@ class DragDownloadFile : public ui::DownloadFileProvider {
// Initialized on drag-and-drop thread. Accessed on either thread after that // Initialized on drag-and-drop thread. Accessed on either thread after that
// (Windows). // (Windows).
// Accessed on UI thread (MacOSX). // Accessed on UI thread (MacOSX).
FilePath file_path_; base::FilePath file_path_;
FilePath file_name_; base::FilePath file_name_;
scoped_ptr<net::FileStream> file_stream_; scoped_ptr<net::FileStream> file_stream_;
GURL url_; GURL url_;
GURL referrer_; GURL referrer_;
std::string referrer_encoding_; std::string referrer_encoding_;
BrowserWebViewDelegate* view_; BrowserWebViewDelegate* view_;
MessageLoop* drag_message_loop_; MessageLoop* drag_message_loop_;
FilePath temp_dir_path_; base::FilePath temp_dir_path_;
// Accessed on drag-and-drop thread (Windows). // Accessed on drag-and-drop thread (Windows).
// Accessed on UI thread (MacOSX). // Accessed on UI thread (MacOSX).

View File

@ -22,7 +22,7 @@ namespace drag_download_util {
bool ParseDownloadMetadata(const string16& metadata, bool ParseDownloadMetadata(const string16& metadata,
string16* mime_type, string16* mime_type,
FilePath* file_name, base::FilePath* file_name,
GURL* url) { GURL* url) {
const char16 separator = L':'; const char16 separator = L':';
@ -44,9 +44,9 @@ bool ParseDownloadMetadata(const string16& metadata,
string16 file_name_str = metadata.substr( string16 file_name_str = metadata.substr(
mime_type_end_pos + 1, file_name_end_pos - mime_type_end_pos - 1); mime_type_end_pos + 1, file_name_end_pos - mime_type_end_pos - 1);
#if defined(OS_WIN) #if defined(OS_WIN)
*file_name = FilePath(file_name_str); *file_name = base::FilePath(file_name_str);
#else #else
*file_name = FilePath(UTF16ToUTF8(file_name_str)); *file_name = base::FilePath(UTF16ToUTF8(file_name_str));
#endif #endif
} }
if (url) if (url)
@ -55,13 +55,13 @@ bool ParseDownloadMetadata(const string16& metadata,
return true; return true;
} }
FileStream* CreateFileStreamForDrop(FilePath* file_path) { FileStream* CreateFileStreamForDrop(base::FilePath* file_path) {
DCHECK(file_path && !file_path->empty()); DCHECK(file_path && !file_path->empty());
scoped_ptr<FileStream> file_stream(new FileStream(NULL)); scoped_ptr<FileStream> file_stream(new FileStream(NULL));
const int kMaxSeq = 99; const int kMaxSeq = 99;
for (int seq = 0; seq <= kMaxSeq; seq++) { for (int seq = 0; seq <= kMaxSeq; seq++) {
FilePath new_file_path; base::FilePath new_file_path;
if (seq == 0) { if (seq == 0) {
new_file_path = *file_path; new_file_path = *file_path;
} else { } else {
@ -98,7 +98,8 @@ void PromiseFileFinalizer::Cleanup() {
drag_file_downloader_ = NULL; drag_file_downloader_ = NULL;
} }
void PromiseFileFinalizer::OnDownloadCompleted(const FilePath& file_path) { void PromiseFileFinalizer::OnDownloadCompleted(
const base::FilePath& file_path) {
CefThread::PostTask( CefThread::PostTask(
CefThread::UI, FROM_HERE, CefThread::UI, FROM_HERE,
base::Bind(&PromiseFileFinalizer::Cleanup, this)); base::Bind(&PromiseFileFinalizer::Cleanup, this));

View File

@ -13,8 +13,12 @@
#include "base/string16.h" #include "base/string16.h"
#include "ui/base/dragdrop/download_file_interface.h" #include "ui/base/dragdrop/download_file_interface.h"
class FilePath;
class GURL; class GURL;
namespace base {
class FilePath;
}
namespace net { namespace net {
class FileStream; class FileStream;
} }
@ -32,13 +36,13 @@ namespace drag_download_util {
// text/plain:example.txt:http://example.com/example.txt // text/plain:example.txt:http://example.com/example.txt
bool ParseDownloadMetadata(const string16& metadata, bool ParseDownloadMetadata(const string16& metadata,
string16* mime_type, string16* mime_type,
FilePath* file_name, base::FilePath* file_name,
GURL* url); GURL* url);
// Create a new file at the specified path. If the file already exists, try to // 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. // insert the sequential unifier to produce a new file, like foo-01.txt.
// Return a FileStream if successful. // 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. // Implementation of DownloadFileObserver to finalize the download process.
class PromiseFileFinalizer : public ui::DownloadFileObserver { class PromiseFileFinalizer : public ui::DownloadFileObserver {
@ -47,7 +51,7 @@ class PromiseFileFinalizer : public ui::DownloadFileObserver {
virtual ~PromiseFileFinalizer(); virtual ~PromiseFileFinalizer();
// DownloadFileObserver methods. // DownloadFileObserver methods.
virtual void OnDownloadCompleted(const FilePath& file_path); virtual void OnDownloadCompleted(const base::FilePath& file_path);
virtual void OnDownloadAborted(); virtual void OnDownloadAborted();
private: private:

View File

@ -6,9 +6,9 @@
#include "libcef/external_popup_menu_mac.h" #include "libcef/external_popup_menu_mac.h"
#include "libcef/browser_impl.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/WebExternalPopupMenuClient.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenuInfo.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" #include "webkit/glue/webmenurunner_mac.h"
ExternalPopupMenu::ExternalPopupMenu( ExternalPopupMenu::ExternalPopupMenu(

View File

@ -19,13 +19,13 @@
#include "content/public/common/content_client.h" #include "content/public/common/content_client.h"
#include "content/public/common/content_switches.h" #include "content/public/common/content_switches.h"
#include "net/url_request/url_request_context_getter.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/WebGeolocationPermissionRequest.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebGeolocationPermissionRequestManager.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/WebGeolocationClient.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebGeolocationPosition.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/WebGeolocationError.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.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" #include "webkit/user_agent/user_agent.h"
using WebKit::WebGeolocationController; using WebKit::WebGeolocationController;

View File

@ -9,8 +9,8 @@
#include <string> #include <string>
#include "include/cef_request.h" #include "include/cef_request.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebHTTPHeaderVisitor.h" #include "third_party/WebKit/Source/Platform/chromium/public/WebHTTPHeaderVisitor.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h"
namespace HttpHeaderUtils { namespace HttpHeaderUtils {

View File

@ -18,7 +18,7 @@ void UIT_RegisterPlugin(CefPluginInfo* plugin_info) {
webkit::WebPluginInfo 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.name = CefString(&plugin_info->display_name);
info.version = CefString(&plugin_info->version); info.version = CefString(&plugin_info->version);
info.desc = CefString(&plugin_info->description); info.desc = CefString(&plugin_info->description);

View File

@ -7,9 +7,9 @@
#include "libcef/cef_thread.h" #include "libcef/cef_thread.h"
#include "base/bind.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/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::WebSecurityPolicy;
using WebKit::WebString; using WebKit::WebString;

View File

@ -18,7 +18,7 @@
#include "net/base/upload_file_element_reader.h" #include "net/base/upload_file_element_reader.h"
#include "net/http/http_request_headers.h" #include "net/http/http_request_headers.h"
#include "net/url_request/url_request.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::WebHTTPBody;
using WebKit::WebString; using WebKit::WebString;
@ -558,7 +558,7 @@ void CefPostDataElementImpl::Get(net::UploadElement& element) {
if (type_ == PDE_TYPE_BYTES) { if (type_ == PDE_TYPE_BYTES) {
element.SetToBytes(static_cast<char*>(data_.bytes.bytes), data_.bytes.size); element.SetToBytes(static_cast<char*>(data_.bytes.bytes), data_.bytes.size);
} else if (type_ == PDE_TYPE_FILE) { } else if (type_ == PDE_TYPE_FILE) {
FilePath path = FilePath(CefString(&data_.filename)); base::FilePath path = FilePath(CefString(&data_.filename));
element.SetToFilePath(path); element.SetToFilePath(path);
} else { } else {
NOTREACHED(); NOTREACHED();
@ -575,7 +575,7 @@ net::UploadElementReader* CefPostDataElementImpl::Get() {
return new BytesElementReader(make_scoped_ptr(element)); return new BytesElementReader(make_scoped_ptr(element));
} else if (type_ == PDE_TYPE_FILE) { } else if (type_ == PDE_TYPE_FILE) {
net::UploadElement* element = new net::UploadElement(); net::UploadElement* element = new net::UploadElement();
FilePath path = FilePath(CefString(&data_.filename)); base::FilePath path = base::FilePath(CefString(&data_.filename));
element->SetToFilePath(path); element->SetToFilePath(path);
return new FileElementReader(make_scoped_ptr(element)); return new FileElementReader(make_scoped_ptr(element));
} else { } else {

View File

@ -7,7 +7,7 @@
#pragma once #pragma once
#include "include/cef_request.h" #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 { namespace net {
class HttpRequestHeaders; class HttpRequestHeaders;

View File

@ -8,8 +8,8 @@
#include "base/logging.h" #include "base/logging.h"
#include "base/stringprintf.h" #include "base/stringprintf.h"
#include "net/http/http_response_headers.h" #include "net/http/http_response_headers.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLResponse.h" #include "third_party/WebKit/Source/Platform/chromium/public/WebURLResponse.h"
CefResponseImpl::CefResponseImpl() CefResponseImpl::CefResponseImpl()
: status_code_(0) { : status_code_(0) {

View File

@ -39,8 +39,8 @@
#include "net/url_request/url_request_http_job.h" #include "net/url_request/url_request_http_job.h"
#include "net/url_request/url_request_job.h" #include "net/url_request/url_request_job.h"
#include "net/url_request/url_request_job_factory.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/WebSecurityPolicy.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
using net::URLRequestStatus; using net::URLRequestStatus;
using WebKit::WebSecurityPolicy; using WebKit::WebSecurityPolicy;

View File

@ -22,20 +22,20 @@
#include "googleurl/src/gurl.h" #include "googleurl/src/gurl.h"
#include "net/base/file_stream.h" #include "net/base/file_stream.h"
#include "net/base/net_util.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/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/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/WebView.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebImage.h"
#include "ui/base/clipboard/custom_data_helper.h" #include "ui/base/clipboard/custom_data_helper.h"
#include "ui/base/dragdrop/os_exchange_data.h" #include "ui/base/dragdrop/os_exchange_data.h"
#include "ui/base/dragdrop/os_exchange_data_provider_gtk.h" #include "ui/base/dragdrop/os_exchange_data_provider_gtk.h"
#include "ui/base/dragdrop/gtk_dnd_util.h" #include "ui/base/dragdrop/gtk_dnd_util.h"
#include "ui/base/gtk/gtk_screen_util.h" #include "ui/base/gtk/gtk_screen_util.h"
#include "ui/base/window_open_disposition.h"
#include "ui/gfx/gtk_util.h" #include "ui/gfx/gtk_util.h"
#include "webkit/glue/webdropdata.h" #include "webkit/glue/webdropdata.h"
#include "webkit/glue/window_open_disposition.h"
using WebKit::WebDragOperation; using WebKit::WebDragOperation;
using WebKit::WebDragOperationsMask; using WebKit::WebDragOperationsMask;
@ -257,7 +257,7 @@ void WebDragSource::OnDragDataGet(GtkWidget* sender,
GURL file_url(std::string(reinterpret_cast<char*>(file_url_value), GURL file_url(std::string(reinterpret_cast<char*>(file_url_value),
file_url_len)); file_url_len));
g_free(file_url_value); g_free(file_url_value);
FilePath file_path; base::FilePath file_path;
if (net::FileURLToFilePath(file_url, &file_path)) { if (net::FileURLToFilePath(file_url, &file_path)) {
// Open the file as a stream. // Open the file as a stream.
scoped_ptr<net::FileStream> file_stream( scoped_ptr<net::FileStream> file_stream(
@ -333,7 +333,7 @@ void WebDragSource::OnDragBegin(GtkWidget* sender,
if (!download_url_.is_empty()) { if (!download_url_.is_empty()) {
// Generate the file name based on both mime type and proposed file name. // Generate the file name based on both mime type and proposed file name.
std::string default_name = "download"; std::string default_name = "download";
FilePath generated_download_file_name = base::FilePath generated_download_file_name =
net::GenerateFileName(download_url_, net::GenerateFileName(download_url_,
std::string(), std::string(),
std::string(), std::string(),

View File

@ -91,7 +91,7 @@ class WebDragSource : public base::RefCounted<WebDragSource>,
string16 wide_download_mime_type_; string16 wide_download_mime_type_;
// The file name to be saved to for a drag-out download. // 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. // The URL to download from for a drag-out download.
GURL download_url_; GURL download_url_;

View File

@ -41,7 +41,7 @@ struct WebDropData;
NSDragOperation dragOperationMask_; NSDragOperation dragOperationMask_;
// The file name to be saved to for a drag-out download. // 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. // The URL to download from for a drag-out download.
GURL downloadURL_; GURL downloadURL_;

View File

@ -21,9 +21,9 @@
#include "net/base/file_stream.h" #include "net/base/file_stream.h"
#include "net/base/net_util.h" #include "net/base/net_util.h"
#import "third_party/mozilla/NSPasteboard+Utils.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/WebDocument.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.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/WebView.h"
#include "ui/gfx/mac/nsimage_cache.h" #include "ui/gfx/mac/nsimage_cache.h"
#include "webkit/glue/webdropdata.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 // Converts a string16 into a FilePath. Use this method instead of
// -[NSString fileSystemRepresentation] to prevent exceptions from being thrown. // -[NSString fileSystemRepresentation] to prevent exceptions from being thrown.
// See http://crbug.com/78782 for more info. // See http://crbug.com/78782 for more info.
FilePath FilePathFromFilename(const string16& filename) { base::FilePath FilePathFromFilename(const string16& filename) {
NSString* str = SysUTF16ToNSString(filename); NSString* str = SysUTF16ToNSString(filename);
char buf[MAXPATHLEN]; char buf[MAXPATHLEN];
if (![str getFileSystemRepresentation:buf maxLength:sizeof(buf)]) if (![str getFileSystemRepresentation:buf maxLength:sizeof(buf)])
return FilePath(); return base::FilePath();
return FilePath(buf); return base::FilePath(buf);
} }
// Returns a filename appropriate for the drop data // Returns a filename appropriate for the drop data
// TODO(viettrungluu): Refactor to make it common across platforms, // TODO(viettrungluu): Refactor to make it common across platforms,
// and move it somewhere sensible. // and move it somewhere sensible.
FilePath GetFileNameFromDragData(const WebDropData& drop_data) { base::FilePath GetFileNameFromDragData(const WebDropData& drop_data) {
FilePath file_name(FilePathFromFilename(drop_data.file_description_filename)); base::FilePath file_name(
FilePathFromFilename(drop_data.file_description_filename));
std::string extension = file_name.Extension(); std::string extension = file_name.Extension();
file_name = file_name.BaseName().RemoveExtension(); file_name = file_name.BaseName().RemoveExtension();
@ -109,7 +110,7 @@ void PromiseWriterHelper(const WebDropData& drop_data,
if (image == nil) { if (image == nil) {
// No drag image was provided so create one. // No drag image was provided so create one.
FilePath path = _Context->GetResourcesFilePath(); base::FilePath path = _Context->GetResourcesFilePath();
path = path.AppendASCII("urlIcon.png"); path = path.AppendASCII("urlIcon.png");
image = [[NSImage alloc] image = [[NSImage alloc]
initWithContentsOfFile:SysUTF8ToNSString(path.value())]; initWithContentsOfFile:SysUTF8ToNSString(path.value())];
@ -303,10 +304,10 @@ void PromiseWriterHelper(const WebDropData& drop_data,
return nil; return nil;
} }
FilePath fileName = downloadFileName_.empty() ? base::FilePath fileName = downloadFileName_.empty() ?
GetFileNameFromDragData(*dropData_) : downloadFileName_; GetFileNameFromDragData(*dropData_) : downloadFileName_;
FilePath filePath(SysNSStringToUTF8(path)); base::FilePath filePath(SysNSStringToUTF8(path));
filePath = filePath.Append(fileName); base::filePath = filePath.Append(fileName);
// CreateFileStreamForDrop() will call file_util::PathExists(), // CreateFileStreamForDrop() will call file_util::PathExists(),
// which is blocking. Since this operation is already blocking the // which is blocking. Since this operation is already blocking the
@ -377,7 +378,7 @@ void PromiseWriterHelper(const WebDropData& drop_data,
fileExtension = GetFileNameFromDragData(*dropData_).Extension(); fileExtension = GetFileNameFromDragData(*dropData_).Extension();
} else { } else {
string16 mimeType; string16 mimeType;
FilePath fileName; base::FilePath fileName;
if (drag_download_util::ParseDownloadMetadata( if (drag_download_util::ParseDownloadMetadata(
dropData_->download_metadata, dropData_->download_metadata,
&mimeType, &mimeType,

View File

@ -8,7 +8,7 @@
#include "libcef/cef_thread.h" #include "libcef/cef_thread.h"
#include "base/bind.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" #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
using WebKit::WebDragOperationNone; using WebKit::WebDragOperationNone;

View File

@ -66,7 +66,7 @@ GURL GetFileURLFromDropData(id<NSDraggingInfo> info) {
} }
static BOOL IsSupportedFileURL(const GURL& url) { static BOOL IsSupportedFileURL(const GURL& url) {
FilePath full_path; base::FilePath full_path;
net::FileURLToFilePath(url, &full_path); net::FileURLToFilePath(url, &full_path);
std::string mime_type; std::string mime_type;

View File

@ -17,16 +17,16 @@
#include "base/bind.h" #include "base/bind.h"
#include "googleurl/src/gurl.h" #include "googleurl/src/gurl.h"
#include "net/base/net_util.h" #include "net/base/net_util.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/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" #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#include "ui/base/clipboard/custom_data_helper.h" #include "ui/base/clipboard/custom_data_helper.h"
#include "ui/base/dragdrop/os_exchange_data.h" #include "ui/base/dragdrop/os_exchange_data.h"
#include "ui/base/dragdrop/os_exchange_data_provider_gtk.h" #include "ui/base/dragdrop/os_exchange_data_provider_gtk.h"
#include "ui/base/dragdrop/gtk_dnd_util.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 "ui/base/gtk/gtk_screen_util.h"
#include "webkit/glue/webdropdata.h" #include "webkit/glue/webdropdata.h"
#include "webkit/glue/window_open_disposition.h"
using WebKit::WebDragOperation; using WebKit::WebDragOperation;
using WebKit::WebDragOperationNone; using WebKit::WebDragOperationNone;
@ -193,7 +193,7 @@ void WebDropTarget::OnDragDataReceived(
// file URLs are never set as the URL content for the drop. // file URLs are never set as the URL content for the drop.
// TODO(estade): Can the filenames have a non-UTF8 encoding? // TODO(estade): Can the filenames have a non-UTF8 encoding?
GURL url(*uri_iter); GURL url(*uri_iter);
FilePath file_path; base::FilePath file_path;
if (url.SchemeIs("file") && if (url.SchemeIs("file") &&
net::FileURLToFilePath(url, &file_path)) { net::FileURLToFilePath(url, &file_path)) {
drop_data_->filenames.push_back( drop_data_->filenames.push_back(

View File

@ -13,12 +13,12 @@
#include "base/logging.h" #include "base/logging.h"
#include "base/sys_string_conversions.h" #include "base/sys_string_conversions.h"
#import "third_party/mozilla/NSPasteboard+Utils.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/WebDragOperation.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/WebView.h"
#include "ui/base/window_open_disposition.h"
#include "webkit/glue/webdropdata.h" #include "webkit/glue/webdropdata.h"
#include "webkit/glue/window_open_disposition.h"
using WebKit::WebDragOperation; using WebKit::WebDragOperation;
using WebKit::WebDragOperationsMask; using WebKit::WebDragOperationsMask;

View File

@ -15,14 +15,14 @@
#include "googleurl/src/gurl.h" #include "googleurl/src/gurl.h"
#include "net/base/net_util.h" #include "net/base/net_util.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/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" #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#include "ui/base/clipboard/clipboard_util_win.h" #include "ui/base/clipboard/clipboard_util_win.h"
#include "ui/base/dragdrop/os_exchange_data.h" #include "ui/base/dragdrop/os_exchange_data.h"
#include "ui/base/dragdrop/os_exchange_data_provider_win.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/webdropdata.h"
#include "webkit/glue/window_open_disposition.h"
using WebKit::WebDragOperation; using WebKit::WebDragOperation;
using WebKit::WebDragOperationNone; using WebKit::WebDragOperationNone;

View File

@ -12,10 +12,10 @@
#include "base/logging.h" #include "base/logging.h"
#include "base/memory/scoped_ptr.h" #include "base/memory/scoped_ptr.h"
#include "googleurl/src/gurl.h" #include "googleurl/src/gurl.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLError.h" #include "third_party/WebKit/Source/Platform/chromium/public/WebURLError.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLLoaderClient.h" #include "third_party/WebKit/Source/Platform/chromium/public/WebURLLoaderClient.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLRequest.h" #include "third_party/WebKit/Source/Platform/chromium/public/WebURLRequest.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLResponse.h" #include "third_party/WebKit/Source/Platform/chromium/public/WebURLResponse.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h"
#include "webkit/glue/weburlloader_impl.h" #include "webkit/glue/weburlloader_impl.h"

View File

@ -10,9 +10,9 @@
#include "libcef/cef_context.h" #include "libcef/cef_context.h"
#include "skia/ext/platform_canvas.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/mac/WebInputEventFactory.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.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 "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#include "ui/gfx/rect.h" #include "ui/gfx/rect.h"
#include "ui/gfx/size.h" #include "ui/gfx/size.h"

View File

@ -8,7 +8,7 @@
#include "base/bind.h" #include "base/bind.h"
#include "base/logging.h" #include "base/logging.h"
#include "base/message_loop.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 "third_party/WebKit/Source/WebKit/chromium/public/WebWidget.h"
#include "webkit/glue/webkit_glue.h" #include "webkit/glue/webkit_glue.h"

View File

@ -18,8 +18,8 @@
#include "base/time.h" #include "base/time.h"
#include "base/timer.h" #include "base/timer.h"
#include "skia/ext/platform_canvas.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/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/WebKit/Source/WebKit/chromium/public/WebTextInputType.h"
#include "third_party/skia/include/core/SkRegion.h" #include "third_party/skia/include/core/SkRegion.h"
#include "ui/gfx/native_widget_types.h" #include "ui/gfx/native_widget_types.h"

View File

@ -13,12 +13,12 @@
#include "skia/ext/bitmap_platform_device.h" #include "skia/ext/bitmap_platform_device.h"
#include "skia/ext/platform_canvas.h" #include "skia/ext/platform_canvas.h"
#include "skia/ext/platform_device.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/gtk/WebInputEventFactory.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/x11/WebScreenInfoFactory.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/WebInputEvent.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenu.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/WebScreenInfo.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h"
using WebKit::WebInputEventFactory; using WebKit::WebInputEventFactory;
using WebKit::WebKeyboardEvent; using WebKit::WebKeyboardEvent;

View File

@ -17,12 +17,12 @@ MSVC_POP_WARNING();
#include "base/bind.h" #include "base/bind.h"
#import "base/logging.h" #import "base/logging.h"
#import "skia/ext/platform_canvas.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/WebInputEventFactory.h"
#import "third_party/WebKit/Source/WebKit/chromium/public/mac/WebScreenInfoFactory.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/WebInputEvent.h"
#import "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenu.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/WebScreenInfo.h"
#import "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h"
#import "third_party/skia/include/core/SkRegion.h" #import "third_party/skia/include/core/SkRegion.h"
#import "ui/gfx/rect.h" #import "ui/gfx/rect.h"
#import "ui/gfx/size.h" #import "ui/gfx/size.h"

View File

@ -12,14 +12,14 @@
#include "base/bind.h" #include "base/bind.h"
#include "base/logging.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/WebCompositionUnderline.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.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/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/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/WebInputEventFactory.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/win/WebScreenInfoFactory.h" #include "third_party/WebKit/Source/WebKit/chromium/public/win/WebScreenInfoFactory.h"
#include "third_party/skia/include/core/SkRegion.h" #include "third_party/skia/include/core/SkRegion.h"

View File

@ -21,6 +21,11 @@ patches = [
'name': 'zlib', 'name': 'zlib',
'path': '../third_party/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 # http://code.google.com/p/chromiumembedded/issues/detail?id=364
'name': 'spi_webcore_364', 'name': 'spi_webcore_364',

View File

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