mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
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:
@ -17,5 +17,5 @@
|
||||
|
||||
{
|
||||
'chromium_url': 'http://src.chromium.org/svn/trunk/src',
|
||||
'chromium_revision': '176706',
|
||||
'chromium_revision': '181864',
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ class BrowserFrontendProxy
|
||||
void clear_appcache_system() { system_ = NULL; }
|
||||
|
||||
virtual void OnCacheSelected(int host_id,
|
||||
const appcache::AppCacheInfo& info) {
|
||||
const appcache::AppCacheInfo& info) OVERRIDE {
|
||||
if (!system_)
|
||||
return;
|
||||
if (system_->is_io_thread()) {
|
||||
@ -51,7 +51,7 @@ class BrowserFrontendProxy
|
||||
}
|
||||
|
||||
virtual void OnStatusChanged(const std::vector<int>& host_ids,
|
||||
appcache::Status status) {
|
||||
appcache::Status status) OVERRIDE {
|
||||
if (!system_)
|
||||
return;
|
||||
if (system_->is_io_thread())
|
||||
@ -66,7 +66,7 @@ class BrowserFrontendProxy
|
||||
}
|
||||
|
||||
virtual void OnEventRaised(const std::vector<int>& host_ids,
|
||||
appcache::EventID event_id) {
|
||||
appcache::EventID event_id) OVERRIDE {
|
||||
if (!system_)
|
||||
return;
|
||||
if (system_->is_io_thread())
|
||||
@ -82,7 +82,7 @@ class BrowserFrontendProxy
|
||||
|
||||
virtual void OnProgressEventRaised(const std::vector<int>& host_ids,
|
||||
const GURL& url,
|
||||
int num_total, int num_complete) {
|
||||
int num_total, int num_complete) OVERRIDE {
|
||||
if (!system_)
|
||||
return;
|
||||
if (system_->is_io_thread())
|
||||
@ -98,7 +98,7 @@ class BrowserFrontendProxy
|
||||
}
|
||||
|
||||
virtual void OnErrorEventRaised(const std::vector<int>& host_ids,
|
||||
const std::string& message) {
|
||||
const std::string& message) OVERRIDE {
|
||||
if (!system_)
|
||||
return;
|
||||
if (system_->is_io_thread())
|
||||
@ -115,7 +115,7 @@ class BrowserFrontendProxy
|
||||
|
||||
virtual void OnLogMessage(int host_id,
|
||||
appcache::LogLevel log_level,
|
||||
const std::string& message) {
|
||||
const std::string& message) OVERRIDE {
|
||||
if (!system_)
|
||||
return;
|
||||
if (system_->is_io_thread())
|
||||
@ -130,12 +130,13 @@ class BrowserFrontendProxy
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
virtual void OnContentBlocked(int host_id, const GURL& manifest_url) {}
|
||||
virtual void OnContentBlocked(int host_id,
|
||||
const GURL& manifest_url) OVERRIDE {}
|
||||
|
||||
private:
|
||||
friend class base::RefCountedThreadSafe<BrowserFrontendProxy>;
|
||||
|
||||
~BrowserFrontendProxy() {}
|
||||
virtual ~BrowserFrontendProxy() {}
|
||||
|
||||
BrowserAppCacheSystem* system_;
|
||||
};
|
||||
@ -161,7 +162,7 @@ class BrowserBackendProxy
|
||||
base::Unretained(this));
|
||||
}
|
||||
|
||||
virtual void RegisterHost(int host_id) {
|
||||
virtual void RegisterHost(int host_id) OVERRIDE {
|
||||
if (system_->is_ui_thread()) {
|
||||
system_->io_message_loop()->PostTask(
|
||||
FROM_HERE,
|
||||
@ -173,7 +174,7 @@ class BrowserBackendProxy
|
||||
}
|
||||
}
|
||||
|
||||
virtual void UnregisterHost(int host_id) {
|
||||
virtual void UnregisterHost(int host_id) OVERRIDE {
|
||||
if (system_->is_ui_thread()) {
|
||||
system_->io_message_loop()->PostTask(
|
||||
FROM_HERE,
|
||||
@ -185,7 +186,7 @@ class BrowserBackendProxy
|
||||
}
|
||||
}
|
||||
|
||||
virtual void SetSpawningHostId(int host_id, int spawning_host_id) {
|
||||
virtual void SetSpawningHostId(int host_id, int spawning_host_id) OVERRIDE {
|
||||
if (system_->is_ui_thread()) {
|
||||
system_->io_message_loop()->PostTask(
|
||||
FROM_HERE,
|
||||
@ -201,7 +202,7 @@ class BrowserBackendProxy
|
||||
virtual void SelectCache(int host_id,
|
||||
const GURL& document_url,
|
||||
const int64 cache_document_was_loaded_from,
|
||||
const GURL& manifest_url) {
|
||||
const GURL& manifest_url) OVERRIDE {
|
||||
if (system_->is_ui_thread()) {
|
||||
system_->io_message_loop()->PostTask(
|
||||
FROM_HERE,
|
||||
@ -219,7 +220,7 @@ class BrowserBackendProxy
|
||||
|
||||
virtual void GetResourceList(
|
||||
int host_id,
|
||||
std::vector<appcache::AppCacheResourceInfo>* resource_infos) {
|
||||
std::vector<appcache::AppCacheResourceInfo>* resource_infos) OVERRIDE {
|
||||
if (system_->is_ui_thread()) {
|
||||
system_->io_message_loop()->PostTask(
|
||||
FROM_HERE,
|
||||
@ -235,18 +236,20 @@ class BrowserBackendProxy
|
||||
virtual void SelectCacheForWorker(
|
||||
int host_id,
|
||||
int parent_process_id,
|
||||
int parent_host_id) {
|
||||
int parent_host_id) OVERRIDE {
|
||||
NOTIMPLEMENTED(); // Workers are not supported in test_shell.
|
||||
}
|
||||
|
||||
virtual void SelectCacheForSharedWorker(
|
||||
int host_id,
|
||||
int64 appcache_id) {
|
||||
int64 appcache_id) OVERRIDE {
|
||||
NOTIMPLEMENTED(); // Workers are not supported in test_shell.
|
||||
}
|
||||
|
||||
virtual void MarkAsForeignEntry(int host_id, const GURL& document_url,
|
||||
int64 cache_document_was_loaded_from) {
|
||||
virtual void MarkAsForeignEntry(
|
||||
int host_id,
|
||||
const GURL& document_url,
|
||||
int64 cache_document_was_loaded_from) OVERRIDE {
|
||||
if (system_->is_ui_thread()) {
|
||||
system_->io_message_loop()->PostTask(
|
||||
FROM_HERE,
|
||||
@ -261,7 +264,7 @@ class BrowserBackendProxy
|
||||
}
|
||||
}
|
||||
|
||||
virtual appcache::Status GetStatus(int host_id) {
|
||||
virtual appcache::Status GetStatus(int host_id) OVERRIDE {
|
||||
if (system_->is_ui_thread()) {
|
||||
status_result_ = appcache::UNCACHED;
|
||||
event_.Reset();
|
||||
@ -279,7 +282,7 @@ class BrowserBackendProxy
|
||||
return status_result_;
|
||||
}
|
||||
|
||||
virtual bool StartUpdate(int host_id) {
|
||||
virtual bool StartUpdate(int host_id) OVERRIDE {
|
||||
if (system_->is_ui_thread()) {
|
||||
bool_result_ = false;
|
||||
event_.Reset();
|
||||
@ -297,7 +300,7 @@ class BrowserBackendProxy
|
||||
return bool_result_;
|
||||
}
|
||||
|
||||
virtual bool SwapCache(int host_id) {
|
||||
virtual bool SwapCache(int host_id) OVERRIDE {
|
||||
if (system_->is_ui_thread()) {
|
||||
bool_result_ = false;
|
||||
event_.Reset();
|
||||
@ -337,7 +340,7 @@ class BrowserBackendProxy
|
||||
private:
|
||||
friend class base::RefCountedThreadSafe<BrowserBackendProxy>;
|
||||
|
||||
~BrowserBackendProxy() {}
|
||||
virtual ~BrowserBackendProxy() {}
|
||||
|
||||
BrowserAppCacheSystem* system_;
|
||||
base::WaitableEvent event_;
|
||||
@ -387,7 +390,8 @@ BrowserAppCacheSystem::~BrowserAppCacheSystem() {
|
||||
}
|
||||
}
|
||||
|
||||
void BrowserAppCacheSystem::InitOnUIThread(const FilePath& cache_directory) {
|
||||
void BrowserAppCacheSystem::InitOnUIThread(
|
||||
const base::FilePath& cache_directory) {
|
||||
DCHECK(!ui_message_loop_);
|
||||
ui_message_loop_ = MessageLoop::current();
|
||||
cache_directory_ = cache_directory;
|
||||
|
@ -39,7 +39,7 @@ class BrowserAppCacheSystem {
|
||||
virtual ~BrowserAppCacheSystem();
|
||||
|
||||
// One-time main UI thread initialization.
|
||||
static void InitializeOnUIThread(const FilePath& cache_directory) {
|
||||
static void InitializeOnUIThread(const base::FilePath& cache_directory) {
|
||||
if (instance_)
|
||||
instance_->InitOnUIThread(cache_directory);
|
||||
}
|
||||
@ -86,7 +86,7 @@ class BrowserAppCacheSystem {
|
||||
friend class BrowserFrontendProxy;
|
||||
|
||||
// Instance methods called by our static public methods
|
||||
void InitOnUIThread(const FilePath& cache_directory);
|
||||
void InitOnUIThread(const base::FilePath& cache_directory);
|
||||
void InitOnIOThread(net::URLRequestContext* request_context);
|
||||
void CleanupIOThread();
|
||||
WebKit::WebApplicationCacheHost* CreateCacheHostForWebKit(
|
||||
@ -110,7 +110,7 @@ class BrowserAppCacheSystem {
|
||||
return ui_message_loop_ ? true : false;
|
||||
}
|
||||
|
||||
FilePath cache_directory_;
|
||||
base::FilePath cache_directory_;
|
||||
MessageLoop* io_message_loop_;
|
||||
MessageLoop* ui_message_loop_;
|
||||
scoped_refptr<BrowserBackendProxy> backend_proxy_;
|
||||
|
@ -15,8 +15,8 @@
|
||||
#include "base/threading/platform_thread.h"
|
||||
#include "base/utf_string_conversions.h"
|
||||
#include "third_party/sqlite/sqlite3.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDatabase.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
|
||||
#include "webkit/database/database_util.h"
|
||||
#include "webkit/database/vfs_backend.h"
|
||||
|
||||
@ -223,7 +223,7 @@ void BrowserDatabaseSystem::VfsOpenFile(
|
||||
const string16& vfs_file_name, int desired_flags,
|
||||
base::PlatformFile* file_handle, base::WaitableEvent* done_event ) {
|
||||
DCHECK(db_thread_proxy_->BelongsToCurrentThread());
|
||||
FilePath file_name = GetFullFilePathForVfsFile(vfs_file_name);
|
||||
base::FilePath file_name = GetFullFilePathForVfsFile(vfs_file_name);
|
||||
if (file_name.empty()) {
|
||||
VfsBackend::OpenTempFileInDirectory(
|
||||
db_tracker_->DatabaseDirectory(), desired_flags, file_handle);
|
||||
@ -243,7 +243,7 @@ void BrowserDatabaseSystem::VfsDeleteFile(
|
||||
const int kNumDeleteRetries = 3;
|
||||
int num_retries = 0;
|
||||
*result = SQLITE_OK;
|
||||
FilePath file_name = GetFullFilePathForVfsFile(vfs_file_name);
|
||||
base::FilePath file_name = GetFullFilePathForVfsFile(vfs_file_name);
|
||||
do {
|
||||
*result = VfsBackend::DeleteFile(file_name, sync_dir);
|
||||
} while ((++num_retries < kNumDeleteRetries) &&
|
||||
@ -293,7 +293,7 @@ FilePath BrowserDatabaseSystem::GetFullFilePathForVfsFile(
|
||||
const string16& vfs_file_name) {
|
||||
DCHECK(db_thread_proxy_->BelongsToCurrentThread());
|
||||
if (vfs_file_name.empty()) // temp file, used for vacuuming
|
||||
return FilePath();
|
||||
return base::FilePath();
|
||||
return DatabaseUtil::GetFullFilePathForVfsFile(
|
||||
db_tracker_.get(), vfs_file_name);
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ class BrowserDatabaseSystem : public webkit_database::DatabaseTracker::Observer,
|
||||
void VfsGetSpaceAvailable(const string16& origin_identifier,
|
||||
int64* result, base::WaitableEvent* done_event);
|
||||
|
||||
FilePath GetFullFilePathForVfsFile(const string16& vfs_file_name);
|
||||
base::FilePath GetFullFilePathForVfsFile(const string16& vfs_file_name);
|
||||
|
||||
void ResetTracker();
|
||||
void ThreadCleanup(base::WaitableEvent* done_event);
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
#include "base/basictypes.h"
|
||||
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h"
|
||||
|
||||
class BrowserDevToolsCallArgs {
|
||||
public:
|
||||
|
@ -8,10 +8,10 @@
|
||||
#include "libcef/browser_impl.h"
|
||||
#include "libcef/cef_context.h"
|
||||
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsAgent.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsFrontend.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptSource.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
|
||||
|
||||
|
@ -48,7 +48,7 @@ class DevToolsSchemeHandler : public CefSchemeHandler {
|
||||
response_length = size_;
|
||||
|
||||
std::string mime_type = "text/plain";
|
||||
if (net::GetMimeTypeFromFile(FilePath(CefString(path_)), &mime_type))
|
||||
if (net::GetMimeTypeFromFile(base::FilePath(CefString(path_)), &mime_type))
|
||||
response->SetMimeType(mime_type);
|
||||
|
||||
response->SetStatus(200);
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include "base/auto_reset.h"
|
||||
#include "base/path_service.h"
|
||||
#include "googleurl/src/gurl.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageArea.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageEventDispatcher.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageNamespace.h"
|
||||
@ -201,8 +201,8 @@ BrowserDomStorageSystem::BrowserDomStorageSystem()
|
||||
: weak_factory_(this),
|
||||
area_being_processed_(NULL),
|
||||
next_connection_id_(1) {
|
||||
FilePath local_storage_path;
|
||||
FilePath cache_path(_Context->cache_path());
|
||||
base::FilePath local_storage_path;
|
||||
base::FilePath cache_path(_Context->cache_path());
|
||||
if (!cache_path.empty()) {
|
||||
local_storage_path = cache_path.Append(FILE_PATH_LITERAL("Local Storage"));
|
||||
if (!file_util::PathExists(local_storage_path) &&
|
||||
@ -214,7 +214,7 @@ BrowserDomStorageSystem::BrowserDomStorageSystem()
|
||||
|
||||
base::SequencedWorkerPool* worker_pool = _Context->blocking_pool();
|
||||
|
||||
context_ = new DomStorageContext(local_storage_path, FilePath(), NULL,
|
||||
context_ = new DomStorageContext(local_storage_path, base::FilePath(), NULL,
|
||||
new DomStorageWorkerPoolTaskRunner(
|
||||
worker_pool,
|
||||
worker_pool->GetNamedSequenceToken("dom_storage_primary"),
|
||||
|
@ -114,7 +114,7 @@ BrowserDragDelegate::~BrowserDragDelegate() {
|
||||
|
||||
void BrowserDragDelegate::StartDragging(const WebDropData& drop_data,
|
||||
WebDragOperationsMask ops,
|
||||
const SkBitmap& image,
|
||||
const gfx::ImageSkia& image,
|
||||
const gfx::Vector2d& image_offset) {
|
||||
DCHECK(CefThread::CurrentlyOn(CefThread::UI));
|
||||
|
||||
@ -174,7 +174,7 @@ void BrowserDragDelegate::StartBackgroundDragging(
|
||||
WebDragOperationsMask ops,
|
||||
const GURL& page_url,
|
||||
const std::string& page_encoding,
|
||||
const SkBitmap& image,
|
||||
const gfx::ImageSkia& image,
|
||||
const gfx::Vector2d& image_offset) {
|
||||
drag_drop_thread_id_ = base::PlatformThread::CurrentId();
|
||||
|
||||
@ -191,7 +191,7 @@ void BrowserDragDelegate::PrepareDragForDownload(
|
||||
const std::string& page_encoding) {
|
||||
// Parse the download metadata.
|
||||
string16 mime_type;
|
||||
FilePath file_name;
|
||||
base::FilePath file_name;
|
||||
GURL download_url;
|
||||
if (!drag_download_util::ParseDownloadMetadata(drop_data.download_metadata,
|
||||
&mime_type,
|
||||
@ -202,7 +202,7 @@ void BrowserDragDelegate::PrepareDragForDownload(
|
||||
// Generate the download filename.
|
||||
std::string content_disposition =
|
||||
"attachment; filename=" + UTF16ToUTF8(file_name.value());
|
||||
FilePath generated_file_name;
|
||||
base::FilePath generated_file_name;
|
||||
download_util::GenerateFileName(download_url,
|
||||
content_disposition,
|
||||
std::string(),
|
||||
@ -220,7 +220,7 @@ void BrowserDragDelegate::PrepareDragForDownload(
|
||||
page_url,
|
||||
page_encoding,
|
||||
view_);
|
||||
ui::OSExchangeData::DownloadFileInfo file_download(FilePath(),
|
||||
ui::OSExchangeData::DownloadFileInfo file_download(base::FilePath(),
|
||||
download_file.get());
|
||||
data->SetDownloadFileInfo(file_download);
|
||||
|
||||
@ -231,17 +231,17 @@ void BrowserDragDelegate::PrepareDragForDownload(
|
||||
void BrowserDragDelegate::PrepareDragForFileContents(
|
||||
const WebDropData& drop_data, ui::OSExchangeData* data) {
|
||||
static const int kMaxFilenameLength = 255; // FAT and NTFS
|
||||
FilePath file_name(drop_data.file_description_filename);
|
||||
base::FilePath file_name(drop_data.file_description_filename);
|
||||
string16 extension = file_name.Extension();
|
||||
file_name = file_name.BaseName().RemoveExtension();
|
||||
// Images without ALT text will only have a file extension so we need to
|
||||
// synthesize one from the provided extension and URL.
|
||||
if (file_name.value().empty()) {
|
||||
// Retrieve the name from the URL.
|
||||
file_name = FilePath(
|
||||
file_name = base::FilePath(
|
||||
net::GetSuggestedFilename(drop_data.url, "", "", "", "", ""));
|
||||
if (file_name.value().size() + extension.size() > kMaxFilenameLength) {
|
||||
file_name = FilePath(file_name.value().substr(
|
||||
file_name = base::FilePath(file_name.value().substr(
|
||||
0, kMaxFilenameLength - extension.size()));
|
||||
}
|
||||
}
|
||||
@ -262,7 +262,7 @@ void BrowserDragDelegate::DoDragging(const WebDropData& drop_data,
|
||||
WebDragOperationsMask ops,
|
||||
const GURL& page_url,
|
||||
const std::string& page_encoding,
|
||||
const SkBitmap& image,
|
||||
const gfx::ImageSkia& image,
|
||||
const gfx::Vector2d& image_offset) {
|
||||
ui::OSExchangeData data;
|
||||
|
||||
|
@ -12,9 +12,9 @@
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/threading/platform_thread.h"
|
||||
#include "third_party/skia/include/core/SkBitmap.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDragOperation.h"
|
||||
#include "ui/base/dragdrop/os_exchange_data_provider_win.h"
|
||||
#include "ui/gfx/image/image_skia.h"
|
||||
#include "ui/gfx/point.h"
|
||||
|
||||
class BrowserWebViewDelegate;
|
||||
@ -37,7 +37,7 @@ class BrowserDragDelegate
|
||||
// Called on UI thread.
|
||||
void StartDragging(const WebDropData& drop_data,
|
||||
WebKit::WebDragOperationsMask ops,
|
||||
const SkBitmap& image,
|
||||
const gfx::ImageSkia& image,
|
||||
const gfx::Vector2d& image_offset);
|
||||
void CancelDrag();
|
||||
|
||||
@ -60,7 +60,7 @@ class BrowserDragDelegate
|
||||
WebKit::WebDragOperationsMask ops,
|
||||
const GURL& page_url,
|
||||
const std::string& page_encoding,
|
||||
const SkBitmap& image,
|
||||
const gfx::ImageSkia& image,
|
||||
const gfx::Vector2d& image_offset);
|
||||
|
||||
// Called on drag-and-drop thread.
|
||||
@ -68,7 +68,7 @@ class BrowserDragDelegate
|
||||
WebKit::WebDragOperationsMask ops,
|
||||
const GURL& page_url,
|
||||
const std::string& page_encoding,
|
||||
const SkBitmap& image,
|
||||
const gfx::ImageSkia& image,
|
||||
const gfx::Vector2d& image_offset);
|
||||
// Called on UI thread.
|
||||
void EndDragging();
|
||||
|
@ -15,16 +15,17 @@
|
||||
#include "base/utf_string_conversions.h"
|
||||
#include "googleurl/src/gurl.h"
|
||||
#include "net/base/mime_util.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebVector.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileInfo.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystemCallbacks.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystemEntry.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h"
|
||||
#include "webkit/base/file_path_string_conversions.h"
|
||||
#include "webkit/blob/blob_storage_controller.h"
|
||||
#include "webkit/fileapi/external_mount_points.h"
|
||||
#include "webkit/fileapi/file_system_task_runners.h"
|
||||
#include "webkit/fileapi/file_system_url.h"
|
||||
#include "webkit/fileapi/file_system_util.h"
|
||||
@ -55,10 +56,10 @@ namespace {
|
||||
MessageLoop* g_io_thread;
|
||||
webkit_blob::BlobStorageController* g_blob_storage_controller;
|
||||
|
||||
void RegisterBlob(const GURL& blob_url, const FilePath& file_path) {
|
||||
void RegisterBlob(const GURL& blob_url, const base::FilePath& file_path) {
|
||||
DCHECK(g_blob_storage_controller);
|
||||
|
||||
FilePath::StringType extension = file_path.Extension();
|
||||
base::FilePath::StringType extension = file_path.Extension();
|
||||
if (!extension.empty())
|
||||
extension = extension.substr(1); // Strip leading ".".
|
||||
|
||||
@ -89,6 +90,7 @@ void BrowserFileSystem::CreateContext() {
|
||||
CefThread::GetMessageLoopProxyForThread(CefThread::IO),
|
||||
CefThread::GetMessageLoopProxyForThread(CefThread::FILE),
|
||||
CefThread::GetMessageLoopProxyForThread(CefThread::FILE))),
|
||||
fileapi::ExternalMountPoints::CreateRefCounted().get(),
|
||||
NULL /* special storage policy */,
|
||||
NULL /* quota manager */,
|
||||
_Context->cache_path(),
|
||||
@ -133,8 +135,8 @@ void BrowserFileSystem::DeleteFileSystem(
|
||||
void BrowserFileSystem::move(
|
||||
const WebURL& src_path,
|
||||
const WebURL& dest_path, WebFileSystemCallbacks* callbacks) {
|
||||
FileSystemURL src_url(src_path);
|
||||
FileSystemURL dest_url(dest_path);
|
||||
FileSystemURL src_url(file_system_context()->CrackURL(src_path));
|
||||
FileSystemURL dest_url(file_system_context()->CrackURL(dest_path));
|
||||
if (!HasFilePermission(src_url, FILE_PERMISSION_WRITE) ||
|
||||
!HasFilePermission(dest_url, FILE_PERMISSION_CREATE)) {
|
||||
callbacks->didFail(WebKit::WebFileErrorSecurity);
|
||||
@ -147,8 +149,8 @@ void BrowserFileSystem::move(
|
||||
void BrowserFileSystem::copy(
|
||||
const WebURL& src_path, const WebURL& dest_path,
|
||||
WebFileSystemCallbacks* callbacks) {
|
||||
FileSystemURL src_url(src_path);
|
||||
FileSystemURL dest_url(dest_path);
|
||||
FileSystemURL src_url(file_system_context()->CrackURL(src_path));
|
||||
FileSystemURL dest_url(file_system_context()->CrackURL(dest_path));
|
||||
if (!HasFilePermission(src_url, FILE_PERMISSION_READ) ||
|
||||
!HasFilePermission(dest_url, FILE_PERMISSION_CREATE)) {
|
||||
callbacks->didFail(WebKit::WebFileErrorSecurity);
|
||||
@ -160,7 +162,7 @@ void BrowserFileSystem::copy(
|
||||
|
||||
void BrowserFileSystem::remove(
|
||||
const WebURL& path, WebFileSystemCallbacks* callbacks) {
|
||||
FileSystemURL url(path);
|
||||
FileSystemURL url(file_system_context()->CrackURL(path));
|
||||
if (!HasFilePermission(url, FILE_PERMISSION_WRITE)) {
|
||||
callbacks->didFail(WebKit::WebFileErrorSecurity);
|
||||
return;
|
||||
@ -171,7 +173,7 @@ void BrowserFileSystem::remove(
|
||||
|
||||
void BrowserFileSystem::removeRecursively(
|
||||
const WebURL& path, WebFileSystemCallbacks* callbacks) {
|
||||
FileSystemURL url(path);
|
||||
FileSystemURL url(file_system_context()->CrackURL(path));
|
||||
if (!HasFilePermission(url, FILE_PERMISSION_WRITE)) {
|
||||
callbacks->didFail(WebKit::WebFileErrorSecurity);
|
||||
return;
|
||||
@ -182,7 +184,7 @@ void BrowserFileSystem::removeRecursively(
|
||||
|
||||
void BrowserFileSystem::readMetadata(
|
||||
const WebURL& path, WebFileSystemCallbacks* callbacks) {
|
||||
FileSystemURL url(path);
|
||||
FileSystemURL url(file_system_context()->CrackURL(path));
|
||||
if (!HasFilePermission(url, FILE_PERMISSION_READ)) {
|
||||
callbacks->didFail(WebKit::WebFileErrorSecurity);
|
||||
return;
|
||||
@ -192,7 +194,7 @@ void BrowserFileSystem::readMetadata(
|
||||
|
||||
void BrowserFileSystem::createFile(
|
||||
const WebURL& path, bool exclusive, WebFileSystemCallbacks* callbacks) {
|
||||
FileSystemURL url(path);
|
||||
FileSystemURL url(file_system_context()->CrackURL(path));
|
||||
if (!HasFilePermission(url, FILE_PERMISSION_CREATE)) {
|
||||
callbacks->didFail(WebKit::WebFileErrorSecurity);
|
||||
return;
|
||||
@ -202,7 +204,7 @@ void BrowserFileSystem::createFile(
|
||||
|
||||
void BrowserFileSystem::createDirectory(
|
||||
const WebURL& path, bool exclusive, WebFileSystemCallbacks* callbacks) {
|
||||
FileSystemURL url(path);
|
||||
FileSystemURL url(file_system_context()->CrackURL(path));
|
||||
if (!HasFilePermission(url, FILE_PERMISSION_CREATE)) {
|
||||
callbacks->didFail(WebKit::WebFileErrorSecurity);
|
||||
return;
|
||||
@ -213,7 +215,7 @@ void BrowserFileSystem::createDirectory(
|
||||
|
||||
void BrowserFileSystem::fileExists(
|
||||
const WebURL& path, WebFileSystemCallbacks* callbacks) {
|
||||
FileSystemURL url(path);
|
||||
FileSystemURL url(file_system_context()->CrackURL(path));
|
||||
if (!HasFilePermission(url, FILE_PERMISSION_READ)) {
|
||||
callbacks->didFail(WebKit::WebFileErrorSecurity);
|
||||
return;
|
||||
@ -223,7 +225,7 @@ void BrowserFileSystem::fileExists(
|
||||
|
||||
void BrowserFileSystem::directoryExists(
|
||||
const WebURL& path, WebFileSystemCallbacks* callbacks) {
|
||||
FileSystemURL url(path);
|
||||
FileSystemURL url(file_system_context()->CrackURL(path));
|
||||
if (!HasFilePermission(url, FILE_PERMISSION_READ)) {
|
||||
callbacks->didFail(WebKit::WebFileErrorSecurity);
|
||||
return;
|
||||
@ -233,7 +235,7 @@ void BrowserFileSystem::directoryExists(
|
||||
|
||||
void BrowserFileSystem::readDirectory(
|
||||
const WebURL& path, WebFileSystemCallbacks* callbacks) {
|
||||
FileSystemURL url(path);
|
||||
FileSystemURL url(file_system_context()->CrackURL(path));
|
||||
if (!HasFilePermission(url, FILE_PERMISSION_READ)) {
|
||||
callbacks->didFail(WebKit::WebFileErrorSecurity);
|
||||
return;
|
||||
@ -250,7 +252,7 @@ void BrowserFileSystem::createSnapshotFileAndReadMetadata(
|
||||
const WebURL& blobURL,
|
||||
const WebURL& path,
|
||||
WebFileSystemCallbacks* callbacks) {
|
||||
FileSystemURL url(path);
|
||||
FileSystemURL url(file_system_context()->CrackURL(path));
|
||||
if (!HasFilePermission(url, FILE_PERMISSION_READ)) {
|
||||
callbacks->didFail(WebKit::WebFileErrorSecurity);
|
||||
return;
|
||||
@ -332,7 +334,7 @@ void BrowserFileSystem::DidFinish(WebFileSystemCallbacks* callbacks,
|
||||
void BrowserFileSystem::DidGetMetadata(WebFileSystemCallbacks* callbacks,
|
||||
base::PlatformFileError result,
|
||||
const base::PlatformFileInfo& info,
|
||||
const FilePath& platform_path) {
|
||||
const base::FilePath& platform_path) {
|
||||
if (result == base::PLATFORM_FILE_OK) {
|
||||
WebFileInfo web_file_info;
|
||||
web_file_info.length = info.size;
|
||||
@ -396,7 +398,7 @@ void BrowserFileSystem::DidCreateSnapshotFile(
|
||||
WebFileSystemCallbacks* callbacks,
|
||||
base::PlatformFileError result,
|
||||
const base::PlatformFileInfo& info,
|
||||
const FilePath& platform_path,
|
||||
const base::FilePath& platform_path,
|
||||
const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref) {
|
||||
DCHECK(g_io_thread);
|
||||
if (result == base::PLATFORM_FILE_OK) {
|
||||
|
@ -8,10 +8,10 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "base/file_util_proxy.h"
|
||||
#include "base/files/file_util_proxy.h"
|
||||
#include "base/id_map.h"
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebFileSystem.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebFileSystem.h"
|
||||
#include "webkit/fileapi/file_system_context.h"
|
||||
#include "webkit/fileapi/file_system_operation.h"
|
||||
#include "webkit/fileapi/file_system_types.h"
|
||||
@ -131,7 +131,7 @@ class BrowserFileSystem
|
||||
void DidGetMetadata(WebKit::WebFileSystemCallbacks* callbacks,
|
||||
base::PlatformFileError result,
|
||||
const base::PlatformFileInfo& info,
|
||||
const FilePath& platform_path);
|
||||
const base::FilePath& platform_path);
|
||||
void DidReadDirectory(
|
||||
WebKit::WebFileSystemCallbacks* callbacks,
|
||||
base::PlatformFileError result,
|
||||
@ -147,7 +147,7 @@ class BrowserFileSystem
|
||||
WebKit::WebFileSystemCallbacks* callbacks,
|
||||
base::PlatformFileError result,
|
||||
const base::PlatformFileInfo& info,
|
||||
const FilePath& platform_path,
|
||||
const base::FilePath& platform_path,
|
||||
const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref);
|
||||
|
||||
scoped_refptr<fileapi::FileSystemContext> file_system_context_;
|
||||
|
@ -180,6 +180,7 @@ BrowserFileWriter::BrowserFileWriter(
|
||||
WebFileWriterClient* client,
|
||||
FileSystemContext* file_system_context)
|
||||
: WebFileWriterBase(path, client),
|
||||
file_system_context_(file_system_context),
|
||||
io_thread_proxy_(new IOThreadProxy(AsWeakPtr(), file_system_context)) {
|
||||
}
|
||||
|
||||
@ -187,13 +188,13 @@ BrowserFileWriter::~BrowserFileWriter() {
|
||||
}
|
||||
|
||||
void BrowserFileWriter::DoTruncate(const GURL& path, int64 offset) {
|
||||
FileSystemURL url(path);
|
||||
FileSystemURL url(file_system_context_->CrackURL(path));
|
||||
io_thread_proxy_->Truncate(url, offset);
|
||||
}
|
||||
|
||||
void BrowserFileWriter::DoWrite(
|
||||
const GURL& path, const GURL& blob_url, int64 offset) {
|
||||
FileSystemURL url(path);
|
||||
FileSystemURL url(file_system_context_->CrackURL(path));
|
||||
io_thread_proxy_->Write(url, blob_url, offset);
|
||||
}
|
||||
|
||||
|
@ -45,6 +45,7 @@ class BrowserFileWriter : public fileapi::WebFileWriterBase,
|
||||
|
||||
private:
|
||||
class IOThreadProxy;
|
||||
scoped_refptr<fileapi::FileSystemContext> file_system_context_;
|
||||
scoped_refptr<IOThreadProxy> io_thread_proxy_;
|
||||
static net::URLRequestContext* request_context_;
|
||||
};
|
||||
|
@ -19,17 +19,17 @@
|
||||
#include "base/stringprintf.h"
|
||||
#include "base/synchronization/waitable_event.h"
|
||||
#include "base/utf_string_conversions.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebHTTPBody.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebRect.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebURLRequest.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebHTTPBody.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginDocument.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebRange.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptSource.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLRequest.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
|
||||
#include "webkit/glue/glue_serialize.h"
|
||||
#include "webkit/plugins/npapi/webplugin_delegate.h"
|
||||
|
@ -9,9 +9,9 @@
|
||||
#include "libcef/browser_impl.h"
|
||||
#include "libcef/browser_settings.h"
|
||||
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebRect.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
|
||||
#include "webkit/glue/webpreferences.h"
|
||||
|
||||
|
@ -10,9 +10,9 @@
|
||||
#include "libcef/browser_settings.h"
|
||||
#include "libcef/browser_webview_mac.h"
|
||||
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebRect.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
|
||||
#include "webkit/glue/webpreferences.h"
|
||||
|
||||
|
@ -18,11 +18,11 @@
|
||||
#include "printing/units.h"
|
||||
#include "skia/ext/vector_canvas.h"
|
||||
#include "skia/ext/vector_platform_device_emf_win.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebRect.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPrintParams.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
|
||||
#include "ui/base/win/hwnd_util.h"
|
||||
#include "webkit/glue/webpreferences.h"
|
||||
|
@ -14,8 +14,8 @@
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "base/memory/scoped_vector.h"
|
||||
#include "googleurl/src/gurl.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebHTTPBody.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebHTTPBody.h"
|
||||
|
||||
#include "include/cef_request.h"
|
||||
|
||||
|
@ -100,8 +100,9 @@ bool BrowserNetworkDelegate::OnCanSetCookie(
|
||||
return rv == net::OK;
|
||||
}
|
||||
|
||||
bool BrowserNetworkDelegate::OnCanAccessFile(const net::URLRequest& request,
|
||||
const FilePath& path) const {
|
||||
bool BrowserNetworkDelegate::OnCanAccessFile(
|
||||
const net::URLRequest& request,
|
||||
const base::FilePath& path) const {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@ class BrowserNetworkDelegate : public net::NetworkDelegate {
|
||||
const std::string& cookie_line,
|
||||
net::CookieOptions* options) OVERRIDE;
|
||||
virtual bool OnCanAccessFile(const net::URLRequest& request,
|
||||
const FilePath& path) const OVERRIDE;
|
||||
const base::FilePath& path) const OVERRIDE;
|
||||
virtual bool OnCanThrottleRequest(
|
||||
const net::URLRequest& request) const OVERRIDE;
|
||||
virtual int OnBeforeSocketStreamConnect(
|
||||
|
@ -101,10 +101,6 @@ class CefProxyResolver : public net::ProxyResolver {
|
||||
virtual net::LoadState GetLoadState(RequestHandle request) const OVERRIDE {
|
||||
return net::LOAD_STATE_IDLE;
|
||||
}
|
||||
virtual net::LoadState GetLoadStateThreadSafe(RequestHandle request) const
|
||||
OVERRIDE {
|
||||
return net::LOAD_STATE_IDLE;
|
||||
}
|
||||
virtual void CancelSetPacScript() OVERRIDE {}
|
||||
|
||||
protected:
|
||||
@ -154,11 +150,11 @@ class CefHttpUserAgentSettings : public net::HttpUserAgentSettings {
|
||||
|
||||
BrowserRequestContext::BrowserRequestContext()
|
||||
: ALLOW_THIS_IN_INITIALIZER_LIST(storage_(this)) {
|
||||
Init(FilePath(), net::HttpCache::NORMAL, false);
|
||||
Init(base::FilePath(), net::HttpCache::NORMAL, false);
|
||||
}
|
||||
|
||||
BrowserRequestContext::BrowserRequestContext(
|
||||
const FilePath& cache_path,
|
||||
const base::FilePath& cache_path,
|
||||
net::HttpCache::Mode cache_mode,
|
||||
bool no_proxy)
|
||||
: ALLOW_THIS_IN_INITIALIZER_LIST(storage_(this)) {
|
||||
@ -166,7 +162,7 @@ BrowserRequestContext::BrowserRequestContext(
|
||||
}
|
||||
|
||||
void BrowserRequestContext::Init(
|
||||
const FilePath& cache_path,
|
||||
const base::FilePath& cache_path,
|
||||
net::HttpCache::Mode cache_mode,
|
||||
bool no_proxy) {
|
||||
SetCookieStoragePath(cache_path);
|
||||
@ -298,7 +294,7 @@ void BrowserRequestContext::Init(
|
||||
BrowserRequestContext::~BrowserRequestContext() {
|
||||
}
|
||||
|
||||
void BrowserRequestContext::SetCookieStoragePath(const FilePath& path) {
|
||||
void BrowserRequestContext::SetCookieStoragePath(const base::FilePath& path) {
|
||||
REQUIRE_IOT();
|
||||
|
||||
if (cookie_store() && ((cookie_store_path_.empty() && path.empty()) ||
|
||||
@ -307,7 +303,7 @@ void BrowserRequestContext::SetCookieStoragePath(const FilePath& path) {
|
||||
return;
|
||||
}
|
||||
|
||||
FilePath new_path = path;
|
||||
base::FilePath new_path = path;
|
||||
|
||||
scoped_refptr<SQLitePersistentCookieStore> persistent_store;
|
||||
if (!new_path.empty()) {
|
||||
@ -316,7 +312,8 @@ void BrowserRequestContext::SetCookieStoragePath(const FilePath& path) {
|
||||
NOTREACHED() << "Failed to create cookie storage directory";
|
||||
new_path.clear();
|
||||
} else {
|
||||
FilePath cookie_path = new_path.Append(FILE_PATH_LITERAL("Cookies"));
|
||||
base::FilePath cookie_path =
|
||||
new_path.Append(FILE_PATH_LITERAL("Cookies"));
|
||||
persistent_store =
|
||||
new SQLitePersistentCookieStore(cookie_path, false, NULL);
|
||||
}
|
||||
|
@ -15,7 +15,9 @@
|
||||
#include "net/url_request/url_request_context.h"
|
||||
#include "net/url_request/url_request_context_storage.h"
|
||||
|
||||
namespace base {
|
||||
class FilePath;
|
||||
}
|
||||
|
||||
namespace webkit_blob {
|
||||
class BlobStorageController;
|
||||
@ -30,28 +32,28 @@ class BrowserRequestContext : public net::URLRequestContext {
|
||||
|
||||
// Use an on-disk cache at the specified location. Optionally, use the cache
|
||||
// in playback or record mode.
|
||||
BrowserRequestContext(const FilePath& cache_path,
|
||||
BrowserRequestContext(const base::FilePath& cache_path,
|
||||
net::HttpCache::Mode cache_mode,
|
||||
bool no_proxy);
|
||||
|
||||
// Set the path used for cookie storage. If |path| is empty memory only
|
||||
// storage will be used. If the old cookie data is being stored on disk it
|
||||
// will be flushed and closed.
|
||||
void SetCookieStoragePath(const FilePath& path);
|
||||
void SetCookieStoragePath(const base::FilePath& path);
|
||||
|
||||
webkit_blob::BlobStorageController* blob_storage_controller() const {
|
||||
return blob_storage_controller_.get();
|
||||
}
|
||||
|
||||
private:
|
||||
void Init(const FilePath& cache_path, net::HttpCache::Mode cache_mode,
|
||||
void Init(const base::FilePath& cache_path, net::HttpCache::Mode cache_mode,
|
||||
bool no_proxy);
|
||||
|
||||
net::URLRequestContextStorage storage_;
|
||||
scoped_ptr<webkit_blob::BlobStorageController> blob_storage_controller_;
|
||||
scoped_ptr<net::URLSecurityManager> url_security_manager_;
|
||||
scoped_ptr<net::URLRequest::Interceptor> url_request_interceptor_;
|
||||
FilePath cookie_store_path_;
|
||||
base::FilePath cookie_store_path_;
|
||||
};
|
||||
|
||||
#endif // CEF_LIBCEF_BROWSER_REQUEST_CONTEXT_H_
|
||||
|
@ -458,6 +458,7 @@ class RequestProxy : public net::URLRequest::Delegate,
|
||||
upload_data_stream.reset(
|
||||
params->request_body->ResolveElementsAndCreateUploadDataStream(
|
||||
_Context->request_context()->blob_storage_controller(),
|
||||
_Context->file_system()->file_system_context(),
|
||||
base::MessageLoopProxy::current()));
|
||||
}
|
||||
|
||||
@ -613,7 +614,7 @@ class RequestProxy : public net::URLRequest::Delegate,
|
||||
|
||||
download_to_file_ = params->download_to_file;
|
||||
if (download_to_file_) {
|
||||
FilePath path;
|
||||
base::FilePath path;
|
||||
if (file_util::CreateTemporaryFile(&path)) {
|
||||
downloaded_file_ = ShareableFileReference::GetOrCreate(
|
||||
path, ShareableFileReference::DELETE_ON_FINAL_RELEASE,
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "net/socket_stream/socket_stream_job.h"
|
||||
#include "net/websockets/websocket_job.h"
|
||||
#include "net/url_request/url_request_context.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSocketStreamHandle.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebSocketStreamHandle.h"
|
||||
#include "webkit/glue/websocketstreamhandle_bridge.h"
|
||||
#include "webkit/glue/websocketstreamhandle_delegate.h"
|
||||
|
||||
@ -36,18 +36,18 @@ class WebSocketStreamHandleBridgeImpl
|
||||
webkit_glue::WebSocketStreamHandleDelegate* delegate);
|
||||
|
||||
// WebSocketStreamHandleBridge methods.
|
||||
virtual void Connect(const GURL& url);
|
||||
virtual bool Send(const std::vector<char>& data);
|
||||
virtual void Close();
|
||||
virtual void Connect(const GURL& url) OVERRIDE;
|
||||
virtual bool Send(const std::vector<char>& data) OVERRIDE;
|
||||
virtual void Close() OVERRIDE;
|
||||
|
||||
// net::SocketStream::Delegate methods.
|
||||
virtual void OnConnected(net::SocketStream* req,
|
||||
int max_pending_send_allowed);
|
||||
int max_pending_send_allowed) OVERRIDE;
|
||||
virtual void OnSentData(net::SocketStream* req,
|
||||
int amount_sent);
|
||||
int amount_sent) OVERRIDE;
|
||||
virtual void OnReceivedData(net::SocketStream* req,
|
||||
const char* data, int len);
|
||||
virtual void OnClose(net::SocketStream* req);
|
||||
const char* data, int len) OVERRIDE;
|
||||
virtual void OnClose(net::SocketStream* req) OVERRIDE;
|
||||
|
||||
private:
|
||||
virtual ~WebSocketStreamHandleBridgeImpl();
|
||||
|
@ -7,8 +7,8 @@
|
||||
#include "base/bind.h"
|
||||
#include "base/message_loop.h"
|
||||
#include "googleurl/src/gurl.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebBlobData.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebBlobData.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h"
|
||||
#include "webkit/base/file_path_string_conversions.h"
|
||||
#include "webkit/blob/blob_data.h"
|
||||
#include "webkit/blob/blob_storage_controller.h"
|
||||
|
@ -7,7 +7,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebBlobRegistry.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebBlobRegistry.h"
|
||||
|
||||
class GURL;
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
#include "base/synchronization/waitable_event.h"
|
||||
#include "net/cookies/cookie_store.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h"
|
||||
|
||||
using WebKit::WebString;
|
||||
using WebKit::WebURL;
|
||||
|
@ -7,7 +7,7 @@
|
||||
#define CEF_LIBCEF_BROWSER_WEBCOOKIEJAR_IMPL_H_
|
||||
#pragma once
|
||||
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCookieJar.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebCookieJar.h"
|
||||
|
||||
namespace net {
|
||||
class CookieStore;
|
||||
|
@ -20,9 +20,9 @@ MSVC_POP_WARNING();
|
||||
#include "base/logging.h"
|
||||
#include "base/string_util.h"
|
||||
#include "net/base/mime_util.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
|
||||
#include "webkit/glue/webkit_glue.h"
|
||||
#include "webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h"
|
||||
#include "webkit/gpu/webgraphicscontext3d_in_process_impl.h"
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "include/internal/cef_types.h"
|
||||
|
||||
#include "base/compiler_specific.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebGraphicsContext3D.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3D.h"
|
||||
#include "v8/include/v8.h"
|
||||
|
||||
#if defined(OS_WIN)
|
||||
|
@ -56,8 +56,8 @@ BrowserWebKitInit::BrowserWebKitInit()
|
||||
prerendering_support_.reset(new BrowserPrerenderingSupport);
|
||||
WebKit::WebPrerenderingSupport::initialize(prerendering_support_.get());
|
||||
|
||||
FilePath appcache_path;
|
||||
FilePath cache_path = _Context->cache_path();
|
||||
base::FilePath appcache_path;
|
||||
base::FilePath cache_path = _Context->cache_path();
|
||||
if (!cache_path.empty()) {
|
||||
appcache_path = cache_path.Append(FILE_PATH_LITERAL("AppCache"));
|
||||
if (!file_util::PathExists(appcache_path) &&
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include "libcef/browser_webcookiejar_impl.h"
|
||||
#include "libcef/simple_clipboard_impl.h"
|
||||
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebGraphicsContext3D.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3D.h"
|
||||
#include "webkit/glue/simple_webmimeregistry_impl.h"
|
||||
#include "webkit/glue/webclipboard_impl.h"
|
||||
#include "webkit/glue/webfileutilities_impl.h"
|
||||
|
@ -31,10 +31,17 @@
|
||||
#include "base/string_util.h"
|
||||
#include "base/stringprintf.h"
|
||||
#include "net/base/net_errors.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebCString.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebData.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebPoint.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebURLError.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebURLRequest.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebURLResponse.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebVector.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCString.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebData.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileError.h"
|
||||
@ -45,19 +52,13 @@
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebNode.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPoint.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginParams.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebRange.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageNamespace.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLError.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLRequest.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLResponse.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebWindowFeatures.h"
|
||||
#include "ui/base/window_open_disposition.h"
|
||||
#include "ui/gfx/native_widget_types.h"
|
||||
#include "ui/gfx/point.h"
|
||||
#include "webkit/appcache/web_application_cache_host_impl.h"
|
||||
@ -65,7 +66,6 @@
|
||||
#include "webkit/glue/glue_serialize.h"
|
||||
#include "webkit/glue/webpreferences.h"
|
||||
#include "webkit/glue/weburlrequest_extradata_impl.h"
|
||||
#include "webkit/glue/window_open_disposition.h"
|
||||
#include "webkit/plugins/npapi/plugin_list.h"
|
||||
#include "webkit/plugins/npapi/webplugin_delegate_impl.h"
|
||||
#include "webkit/plugins/npapi/webplugin_impl.h"
|
||||
@ -309,7 +309,7 @@ bool BrowserWebViewDelegate::runFileChooser(
|
||||
const WebFileChooserParams& params,
|
||||
WebKit::WebFileChooserCompletion* chooser_completion) {
|
||||
// Support file open dialog.
|
||||
std::vector<FilePath> file_names;
|
||||
std::vector<base::FilePath> file_names;
|
||||
std::vector<std::string> mime_types;
|
||||
|
||||
for (size_t i = 0; i < params.acceptTypes.size(); ++i)
|
||||
@ -529,7 +529,7 @@ void BrowserWebViewDelegate::willAddPrerender(WebKit::WebPrerender* prerender) {
|
||||
// WebPluginPageDelegate -----------------------------------------------------
|
||||
|
||||
WebKit::WebPlugin* BrowserWebViewDelegate::CreatePluginReplacement(
|
||||
const FilePath& file_path) {
|
||||
const base::FilePath& file_path) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -23,13 +23,13 @@
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#include "build/build_config.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebFileSystem.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebRect.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileChooserParams.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebFileSystem.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrameClient.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPermissionClient.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPrerendererClient.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebViewClient.h"
|
||||
#include "webkit/glue/webcursor.h"
|
||||
#include "webkit/plugins/npapi/webplugin_page_delegate.h"
|
||||
@ -56,7 +56,10 @@ class WebDropTarget;
|
||||
class CefBrowserImpl;
|
||||
class GURL;
|
||||
class WebWidgetHost;
|
||||
|
||||
namespace base {
|
||||
class FilePath;
|
||||
}
|
||||
|
||||
class BrowserWebViewDelegate : public WebKit::WebViewClient,
|
||||
public WebKit::WebFrameClient,
|
||||
@ -227,10 +230,10 @@ class BrowserWebViewDelegate : public WebKit::WebViewClient,
|
||||
|
||||
// webkit_glue::WebPluginPageDelegate
|
||||
virtual webkit::npapi::WebPluginDelegate* CreatePluginDelegate(
|
||||
const FilePath& file_path,
|
||||
const base::FilePath& file_path,
|
||||
const std::string& mime_type) OVERRIDE;
|
||||
virtual WebKit::WebPlugin* CreatePluginReplacement(
|
||||
const FilePath& file_path) OVERRIDE;
|
||||
const base::FilePath& file_path) OVERRIDE;
|
||||
virtual void CreatedPluginWindow(
|
||||
gfx::PluginWindowHandle handle) OVERRIDE;
|
||||
virtual void WillDestroyPluginWindow(
|
||||
@ -315,10 +318,10 @@ class BrowserWebViewDelegate : public WebKit::WebViewClient,
|
||||
CefString* result);
|
||||
|
||||
// Called to show the file chooser dialog.
|
||||
bool ShowFileChooser(std::vector<FilePath>& file_names,
|
||||
bool ShowFileChooser(std::vector<base::FilePath>& file_names,
|
||||
bool multi_select,
|
||||
const WebKit::WebString& title,
|
||||
const FilePath& default_file,
|
||||
const base::FilePath& default_file,
|
||||
const std::vector<std::string>& accept_mime_types);
|
||||
|
||||
// Called to show status messages.
|
||||
|
@ -12,23 +12,23 @@
|
||||
#include "base/message_loop.h"
|
||||
#include "base/string_util.h"
|
||||
#include "net/base/net_errors.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebDragData.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebImage.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebPoint.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebRect.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenu.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebDragData.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebImage.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPoint.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
|
||||
#include "ui/base/window_open_disposition.h"
|
||||
#include "ui/gfx/native_widget_types.h"
|
||||
#include "ui/gfx/gtk_util.h"
|
||||
#include "ui/gfx/point.h"
|
||||
#include "webkit/glue/webdropdata.h"
|
||||
#include "webkit/glue/webpreferences.h"
|
||||
#include "webkit/glue/webkit_glue.h"
|
||||
#include "webkit/glue/window_open_disposition.h"
|
||||
#include "webkit/plugins/npapi/plugin_list.h"
|
||||
#include "webkit/plugins/npapi/webplugin.h"
|
||||
#include "webkit/plugins/npapi/webplugin_delegate_impl.h"
|
||||
@ -180,7 +180,7 @@ bool ShowJSPromptDialog(GtkWidget* window,
|
||||
return (result == GTK_RESPONSE_OK);
|
||||
}
|
||||
|
||||
bool ShowJSFileChooser(GtkWidget* window, FilePath* path) {
|
||||
bool ShowJSFileChooser(GtkWidget* window, base::FilePath* path) {
|
||||
// Create the widgets.
|
||||
GtkWidget* dialog = gtk_file_chooser_dialog_new(
|
||||
"Open File",
|
||||
@ -193,8 +193,10 @@ bool ShowJSFileChooser(GtkWidget* window, FilePath* path) {
|
||||
gtk_widget_show_all(dialog);
|
||||
|
||||
int result = gtk_dialog_run(GTK_DIALOG(dialog));
|
||||
if (result == GTK_RESPONSE_ACCEPT)
|
||||
*path = FilePath(gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog)));
|
||||
if (result == GTK_RESPONSE_ACCEPT) {
|
||||
*path = base::FilePath(gtk_file_chooser_get_filename(
|
||||
GTK_FILE_CHOOSER(dialog)));
|
||||
}
|
||||
|
||||
gtk_widget_destroy(dialog);
|
||||
|
||||
@ -448,7 +450,7 @@ void BrowserWebViewDelegate::runModal() {
|
||||
// WebPluginPageDelegate ------------------------------------------------------
|
||||
|
||||
webkit::npapi::WebPluginDelegate* BrowserWebViewDelegate::CreatePluginDelegate(
|
||||
const FilePath& path,
|
||||
const base::FilePath& path,
|
||||
const std::string& mime_type) {
|
||||
return webkit::npapi::WebPluginDelegateImpl::Create(path, mime_type);
|
||||
}
|
||||
@ -553,15 +555,15 @@ bool BrowserWebViewDelegate::ShowJavaScriptPrompt(
|
||||
}
|
||||
|
||||
bool BrowserWebViewDelegate::ShowFileChooser(
|
||||
std::vector<FilePath>& file_names,
|
||||
std::vector<base::FilePath>& file_names,
|
||||
bool multi_select,
|
||||
const WebKit::WebString& title,
|
||||
const FilePath& default_file,
|
||||
const base::FilePath& default_file,
|
||||
const std::vector<std::string>& accept_mime_types) {
|
||||
gfx::NativeView view = browser_->UIT_GetMainWndHandle();
|
||||
GtkWidget* window = gtk_widget_get_toplevel(GTK_WIDGET(view));
|
||||
|
||||
FilePath file_name;
|
||||
base::FilePath file_name;
|
||||
bool resp = ShowJSFileChooser(window, &file_name);
|
||||
if (resp)
|
||||
file_names.push_back(file_name);
|
||||
|
@ -16,13 +16,13 @@
|
||||
#include "base/utf_string_conversions.h"
|
||||
#include "base/threading/thread_restrictions.h"
|
||||
#include "skia/ext/skia_utils_mac.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebDragData.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebImage.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebPoint.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebDragData.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebImage.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPoint.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenu.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
|
||||
#include "ui/base/layout.h"
|
||||
@ -440,7 +440,7 @@ void BrowserWebViewDelegate::runModal() {
|
||||
// WebPluginPageDelegate ------------------------------------------------------
|
||||
|
||||
webkit::npapi::WebPluginDelegate* BrowserWebViewDelegate::CreatePluginDelegate(
|
||||
const FilePath& path,
|
||||
const base::FilePath& path,
|
||||
const std::string& mime_type) {
|
||||
WebWidgetHost *host = GetWidgetHost();
|
||||
if (!host)
|
||||
@ -548,10 +548,10 @@ bool BrowserWebViewDelegate::ShowJavaScriptPrompt(
|
||||
|
||||
// Called to show the file chooser dialog.
|
||||
bool BrowserWebViewDelegate::ShowFileChooser(
|
||||
std::vector<FilePath>& file_names,
|
||||
std::vector<base::FilePath>& file_names,
|
||||
bool multi_select,
|
||||
const WebKit::WebString& title,
|
||||
const FilePath& default_file,
|
||||
const base::FilePath& default_file,
|
||||
const std::vector<std::string>& accept_mime_types) {
|
||||
NSOpenPanel* dialog = [NSOpenPanel openPanel];
|
||||
if (!title.isNull())
|
||||
@ -598,8 +598,10 @@ bool BrowserWebViewDelegate::ShowFileChooser(
|
||||
int i, count = [urls count];
|
||||
for (i=0; i<count; i++) {
|
||||
NSURL* url = [urls objectAtIndex:i];
|
||||
if ([url isFileURL])
|
||||
file_names.push_back(FilePath(base::SysNSStringToUTF8([url path])));
|
||||
if ([url isFileURL]) {
|
||||
file_names.push_back(
|
||||
base::FilePath(base::SysNSStringToUTF8([url path])));
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -29,23 +29,23 @@
|
||||
#include "base/win/registry.h"
|
||||
#include "net/base/mime_util.h"
|
||||
#include "net/base/net_errors.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebDragData.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebImage.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebPoint.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebRect.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebDragData.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebImage.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPoint.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
#include "ui/base/window_open_disposition.h"
|
||||
#include "ui/gfx/gdi_util.h"
|
||||
#include "ui/gfx/native_widget_types.h"
|
||||
#include "ui/gfx/point.h"
|
||||
#include "webkit/glue/webdropdata.h"
|
||||
#include "webkit/glue/webpreferences.h"
|
||||
#include "webkit/glue/webkit_glue.h"
|
||||
#include "webkit/glue/window_open_disposition.h"
|
||||
#include "webkit/plugins/npapi/plugin_list.h"
|
||||
#include "webkit/plugins/npapi/webplugin.h"
|
||||
#include "webkit/plugins/npapi/webplugin_delegate_impl.h"
|
||||
@ -222,7 +222,7 @@ std::wstring GetFilterStringFromAcceptTypes(
|
||||
descriptions.push_back(std::wstring());
|
||||
} else {
|
||||
// Otherwise convert mime type to one or more extensions.
|
||||
std::vector<FilePath::StringType> ext;
|
||||
std::vector<base::FilePath::StringType> ext;
|
||||
std::wstring ext_str;
|
||||
net::GetExtensionsForMimeType(ascii_type, &ext);
|
||||
if (ext.size() > 0) {
|
||||
@ -499,7 +499,10 @@ void BrowserWebViewDelegate::startDragging(
|
||||
}
|
||||
|
||||
drag_delegate_ = new BrowserDragDelegate(this);
|
||||
drag_delegate_->StartDragging(drop_data, mask, image.getSkBitmap(),
|
||||
gfx::ImageSkia image_skia =
|
||||
gfx::ImageSkia(gfx::ImageSkiaRep(image.getSkBitmap(),
|
||||
ui::SCALE_FACTOR_100P));
|
||||
drag_delegate_->StartDragging(drop_data, mask, image_skia,
|
||||
gfx::Point(image_offset).OffsetFromOrigin());
|
||||
}
|
||||
|
||||
@ -559,7 +562,7 @@ void BrowserWebViewDelegate::runModal() {
|
||||
// WebPluginPageDelegate ------------------------------------------------------
|
||||
|
||||
webkit::npapi::WebPluginDelegate* BrowserWebViewDelegate::CreatePluginDelegate(
|
||||
const FilePath& file_path,
|
||||
const base::FilePath& file_path,
|
||||
const std::string& mime_type) {
|
||||
WebViewHost* host = browser_->UIT_GetWebViewHost();
|
||||
if (!host)
|
||||
@ -803,7 +806,7 @@ bool BrowserWebViewDelegate::ShowJavaScriptPrompt(WebFrame* webframe,
|
||||
const CefString& message,
|
||||
const CefString& default_value,
|
||||
CefString* result) {
|
||||
FilePath file_path;
|
||||
base::FilePath file_path;
|
||||
HMODULE hModule = NULL;
|
||||
|
||||
// Try to load the dialog from the DLL.
|
||||
@ -840,7 +843,8 @@ namespace {
|
||||
|
||||
// from chrome/browser/views/shell_dialogs_win.cc
|
||||
|
||||
bool RunOpenFileDialog(const std::wstring& filter, HWND owner, FilePath* path) {
|
||||
bool RunOpenFileDialog(const std::wstring& filter, HWND owner,
|
||||
base::FilePath* path) {
|
||||
OPENFILENAME ofn;
|
||||
|
||||
// We must do this otherwise the ofn's FlagsEx may be initialized to random
|
||||
@ -864,12 +868,12 @@ bool RunOpenFileDialog(const std::wstring& filter, HWND owner, FilePath* path) {
|
||||
}
|
||||
bool success = !!GetOpenFileName(&ofn);
|
||||
if (success)
|
||||
*path = FilePath(filename);
|
||||
*path = base::FilePath(filename);
|
||||
return success;
|
||||
}
|
||||
|
||||
bool RunOpenMultiFileDialog(const std::wstring& filter, HWND owner,
|
||||
std::vector<FilePath>* paths) {
|
||||
std::vector<base::FilePath>* paths) {
|
||||
OPENFILENAME ofn;
|
||||
|
||||
// We must do this otherwise the ofn's FlagsEx may be initialized to random
|
||||
@ -895,10 +899,10 @@ bool RunOpenMultiFileDialog(const std::wstring& filter, HWND owner,
|
||||
bool success = !!GetOpenFileName(&ofn);
|
||||
|
||||
if (success) {
|
||||
std::vector<FilePath> files;
|
||||
std::vector<base::FilePath> files;
|
||||
const wchar_t* selection = ofn.lpstrFile;
|
||||
while (*selection) { // Empty string indicates end of list.
|
||||
files.push_back(FilePath(selection));
|
||||
files.push_back(base::FilePath(selection));
|
||||
// Skip over filename and null-terminator.
|
||||
selection += files.back().value().length() + 1;
|
||||
}
|
||||
@ -910,8 +914,8 @@ bool RunOpenMultiFileDialog(const std::wstring& filter, HWND owner,
|
||||
} else {
|
||||
// Otherwise, the first string is the path, and the remainder are
|
||||
// filenames.
|
||||
std::vector<FilePath>::iterator path = files.begin();
|
||||
for (std::vector<FilePath>::iterator file = path + 1;
|
||||
std::vector<base::FilePath>::iterator path = files.begin();
|
||||
for (std::vector<base::FilePath>::iterator file = path + 1;
|
||||
file != files.end(); ++file) {
|
||||
paths->push_back(path->Append(*file));
|
||||
}
|
||||
@ -923,10 +927,10 @@ bool RunOpenMultiFileDialog(const std::wstring& filter, HWND owner,
|
||||
} // namespace
|
||||
|
||||
bool BrowserWebViewDelegate::ShowFileChooser(
|
||||
std::vector<FilePath>& file_names,
|
||||
std::vector<base::FilePath>& file_names,
|
||||
bool multi_select,
|
||||
const WebKit::WebString& title,
|
||||
const FilePath& default_file,
|
||||
const base::FilePath& default_file,
|
||||
const std::vector<std::string>& accept_mime_types) {
|
||||
bool result = false;
|
||||
const std::wstring& filter =
|
||||
@ -936,7 +940,7 @@ bool BrowserWebViewDelegate::ShowFileChooser(
|
||||
result = RunOpenMultiFileDialog(filter, browser_->UIT_GetMainWndHandle(),
|
||||
&file_names);
|
||||
} else {
|
||||
FilePath file_name;
|
||||
base::FilePath file_name;
|
||||
result = RunOpenFileDialog(filter, browser_->UIT_GetMainWndHandle(),
|
||||
&file_name);
|
||||
if (result)
|
||||
|
@ -75,20 +75,20 @@ class CefResourceBundleDelegate : public ui::ResourceBundle::Delegate {
|
||||
void set_allow_pack_file_load(bool val) { allow_pack_file_load_ = val; }
|
||||
|
||||
private:
|
||||
virtual FilePath GetPathForResourcePack(
|
||||
const FilePath& pack_path,
|
||||
virtual base::FilePath GetPathForResourcePack(
|
||||
const base::FilePath& pack_path,
|
||||
ui::ScaleFactor scale_factor) OVERRIDE {
|
||||
// Only allow the cef pack file to load.
|
||||
if (!context_->settings().pack_loading_disabled && allow_pack_file_load_)
|
||||
return pack_path;
|
||||
return FilePath();
|
||||
return base::FilePath();
|
||||
}
|
||||
|
||||
virtual FilePath GetPathForLocalePack(const FilePath& pack_path,
|
||||
virtual base::FilePath GetPathForLocalePack(const FilePath& pack_path,
|
||||
const std::string& locale) OVERRIDE {
|
||||
if (!context_->settings().pack_loading_disabled)
|
||||
return pack_path;
|
||||
return FilePath();
|
||||
return base::FilePath();
|
||||
}
|
||||
|
||||
virtual gfx::Image GetImageNamed(int resource_id) OVERRIDE {
|
||||
@ -253,7 +253,7 @@ bool CefContext::Initialize(const CefSettings& settings,
|
||||
settings_ = settings;
|
||||
application_ = application;
|
||||
|
||||
cache_path_ = FilePath(CefString(&settings.cache_path));
|
||||
cache_path_ = base::FilePath(CefString(&settings.cache_path));
|
||||
if (!cache_path_.empty() &&
|
||||
!file_util::PathExists(cache_path_) &&
|
||||
!file_util::CreateDirectory(cache_path_)) {
|
||||
@ -372,14 +372,14 @@ CefRefPtr<CefBrowserImpl> CefContext::GetBrowserByID(int id) {
|
||||
|
||||
void CefContext::InitializeResourceBundle() {
|
||||
#if !defined(OS_WIN)
|
||||
FilePath chrome_pak_file;
|
||||
base::FilePath chrome_pak_file;
|
||||
#endif
|
||||
FilePath devtools_pak_file, locales_dir;
|
||||
base::FilePath devtools_pak_file, locales_dir;
|
||||
|
||||
if (!settings_.pack_loading_disabled) {
|
||||
FilePath resources_dir_path;
|
||||
base::FilePath resources_dir_path;
|
||||
if (settings_.resources_dir_path.length > 0)
|
||||
resources_dir_path = FilePath(CefString(&settings_.resources_dir_path));
|
||||
resources_dir_path = base::FilePath(CefString(&settings_.resources_dir_path));
|
||||
if (resources_dir_path.empty())
|
||||
resources_dir_path = GetResourcesFilePath();
|
||||
|
||||
@ -393,7 +393,7 @@ void CefContext::InitializeResourceBundle() {
|
||||
}
|
||||
|
||||
if (settings_.locales_dir_path.length > 0)
|
||||
locales_dir = FilePath(CefString(&settings_.locales_dir_path));
|
||||
locales_dir = base::FilePath(CefString(&settings_.locales_dir_path));
|
||||
|
||||
if (!locales_dir.empty())
|
||||
PathService::Override(ui::DIR_LOCALES, locales_dir);
|
||||
@ -476,7 +476,7 @@ base::StringPiece CefContext::GetDataResource(int resource_id) const {
|
||||
|
||||
#if defined(OS_WIN)
|
||||
if (value.empty()) {
|
||||
FilePath file_path;
|
||||
base::FilePath file_path;
|
||||
HMODULE hModule = NULL;
|
||||
|
||||
// Try to load the resource from the DLL.
|
||||
@ -493,7 +493,7 @@ base::StringPiece CefContext::GetDataResource(int resource_id) const {
|
||||
// Use webkit's broken image icon (16x16)
|
||||
static std::string broken_image_data;
|
||||
if (broken_image_data.empty()) {
|
||||
FilePath path = GetResourcesFilePath();
|
||||
base::FilePath path = GetResourcesFilePath();
|
||||
// In order to match WebKit's colors for the missing image, we have to
|
||||
// use a PNG. The GIF doesn't have the color range needed to correctly
|
||||
// match the TIFF they use in Safari.
|
||||
@ -510,7 +510,7 @@ base::StringPiece CefContext::GetDataResource(int resource_id) const {
|
||||
// Use webkit's text area resizer image.
|
||||
static std::string resize_corner_data;
|
||||
if (resize_corner_data.empty()) {
|
||||
FilePath path = GetResourcesFilePath();
|
||||
base::FilePath path = GetResourcesFilePath();
|
||||
path = path.AppendASCII("textAreaResizeCorner.png");
|
||||
bool success = file_util::ReadFileToString(path, &resize_corner_data);
|
||||
if (!success) {
|
||||
@ -536,20 +536,20 @@ base::StringPiece CefContext::GetDataResource(int resource_id) const {
|
||||
return value;
|
||||
}
|
||||
|
||||
FilePath CefContext::GetResourcesFilePath() const {
|
||||
base::FilePath CefContext::GetResourcesFilePath() const {
|
||||
#if defined(OS_MACOSX)
|
||||
// Start out with the path to the running executable.
|
||||
FilePath execPath;
|
||||
base::FilePath execPath;
|
||||
PathService::Get(base::FILE_EXE, &execPath);
|
||||
|
||||
// Get the main bundle path.
|
||||
FilePath bundlePath = base::mac::GetAppBundlePath(execPath);
|
||||
base::FilePath bundlePath = base::mac::GetAppBundlePath(execPath);
|
||||
|
||||
// Go into the Contents/Resources directory.
|
||||
return bundlePath.Append(FILE_PATH_LITERAL("Contents"))
|
||||
.Append(FILE_PATH_LITERAL("Resources"));
|
||||
#else
|
||||
FilePath pak_dir;
|
||||
base::FilePath pak_dir;
|
||||
PathService::Get(base::DIR_MODULE, &pak_dir);
|
||||
return pak_dir;
|
||||
#endif
|
||||
|
@ -62,11 +62,11 @@ class CefContext : public CefBase {
|
||||
string16 GetLocalizedString(int message_id) const;
|
||||
base::StringPiece GetDataResource(int resource_id) const;
|
||||
|
||||
FilePath GetResourcesFilePath() const;
|
||||
base::FilePath GetResourcesFilePath() const;
|
||||
|
||||
// Retrieve the path at which cache data will be stored on disk. If empty,
|
||||
// cache data will be stored in-memory.
|
||||
const FilePath& cache_path() const { return cache_path_; }
|
||||
const base::FilePath& cache_path() const { return cache_path_; }
|
||||
|
||||
const CefSettings& settings() const { return settings_; }
|
||||
CefRefPtr<CefApp> application() const { return application_; }
|
||||
@ -122,7 +122,7 @@ class CefContext : public CefBase {
|
||||
|
||||
CefSettings settings_;
|
||||
CefRefPtr<CefApp> application_;
|
||||
FilePath cache_path_;
|
||||
base::FilePath cache_path_;
|
||||
base::ScopedTempDir cache_temp_dir_;
|
||||
|
||||
BrowserRequestContext* request_context_;
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include "libcef/cef_process_sub_thread.h"
|
||||
#include "libcef/cef_process_ui_thread.h"
|
||||
|
||||
#include "base/run_loop.h"
|
||||
#include "base/synchronization/waitable_event.h"
|
||||
#include "base/threading/thread.h"
|
||||
|
||||
@ -16,17 +17,8 @@ class CefMessageLoopForUI : public MessageLoopForUI {
|
||||
typedef MessageLoopForUI inherited;
|
||||
|
||||
public:
|
||||
CefMessageLoopForUI()
|
||||
: is_iterating_(true) {
|
||||
CefMessageLoopForUI() {
|
||||
}
|
||||
#if defined(OS_MACOSX)
|
||||
virtual ~CefMessageLoopForUI() {
|
||||
// On Mac the MessageLoop::AutoRunState scope in Run() never exits so clear
|
||||
// the run_loop_ variable to avoid an assertion in the MessageLoop
|
||||
// destructor.
|
||||
run_loop_ = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Returns the MessageLoopForUI of the current thread.
|
||||
static CefMessageLoopForUI* current() {
|
||||
@ -35,30 +27,18 @@ class CefMessageLoopForUI : public MessageLoopForUI {
|
||||
return static_cast<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.
|
||||
void DoMessageLoopIteration() {
|
||||
Run();
|
||||
base::RunLoop run_loop;
|
||||
run_loop.RunUntilIdle();
|
||||
}
|
||||
|
||||
// Run the UI message loop.
|
||||
void RunMessageLoop() {
|
||||
is_iterating_ = false;
|
||||
DoMessageLoopIteration();
|
||||
Run();
|
||||
}
|
||||
|
||||
bool is_iterating() { return is_iterating_; }
|
||||
|
||||
private:
|
||||
// True if the message loop is doing one iteration at a time.
|
||||
bool is_iterating_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CefMessageLoopForUI);
|
||||
};
|
||||
|
||||
@ -90,7 +70,6 @@ CefProcess::~CefProcess() {
|
||||
|
||||
void CefProcess::DoMessageLoopIteration() {
|
||||
DCHECK(CalledOnValidThread() && ui_message_loop_.get() != NULL);
|
||||
DCHECK(ui_message_loop_->is_iterating());
|
||||
ui_message_loop_->DoMessageLoopIteration();
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,7 @@ CefProcessIOThread::~CefProcessIOThread() {
|
||||
void CefProcessIOThread::Init() {
|
||||
CefThread::Init();
|
||||
|
||||
FilePath cache_path(_Context->cache_path());
|
||||
base::FilePath cache_path(_Context->cache_path());
|
||||
request_context_.reset(new BrowserRequestContext(cache_path,
|
||||
net::HttpCache::NORMAL, false));
|
||||
_Context->set_request_context(request_context_.get());
|
||||
|
@ -76,7 +76,7 @@ void CefProcessUIThread::Init() {
|
||||
logging::SetMinLogLevel(settings.log_severity);
|
||||
}
|
||||
|
||||
FilePath log_file = FilePath(CefString(&settings.log_file));
|
||||
base::FilePath log_file = FilePath(CefString(&settings.log_file));
|
||||
logging::DcheckState dcheck_state =
|
||||
logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS;
|
||||
if (settings.release_dcheck_enabled)
|
||||
@ -168,12 +168,12 @@ void CefProcessUIThread::Init() {
|
||||
cef_string_t str;
|
||||
memset(&str, 0, sizeof(str));
|
||||
|
||||
FilePath path;
|
||||
base::FilePath path;
|
||||
int size = cef_string_list_size(settings.extra_plugin_paths);
|
||||
for (int i = 0; i < size; ++i) {
|
||||
if (!cef_string_list_value(settings.extra_plugin_paths, i, &str))
|
||||
continue;
|
||||
path = FilePath(CefString(&str));
|
||||
path = base::FilePath(CefString(&str));
|
||||
webkit::npapi::PluginList::Singleton()->AddExtraPluginPath(path);
|
||||
}
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ class CefCommandLineImpl : public CefCommandLine {
|
||||
|
||||
virtual void SetProgram(const CefString& program) OVERRIDE {
|
||||
AutoLock lock_scope(this);
|
||||
command_line_.SetProgram(FilePath(program));
|
||||
command_line_.SetProgram(base::FilePath(program));
|
||||
}
|
||||
|
||||
virtual bool HasSwitches() OVERRIDE {
|
||||
|
@ -206,9 +206,9 @@ bool CefCookieManagerImpl::DeleteCookies(const CefString& url,
|
||||
|
||||
bool CefCookieManagerImpl::SetStoragePath(const CefString& path) {
|
||||
if (CefThread::CurrentlyOn(CefThread::IO)) {
|
||||
FilePath new_path;
|
||||
base::FilePath new_path;
|
||||
if (!path.empty())
|
||||
new_path = FilePath(path);
|
||||
new_path = base::FilePath(path);
|
||||
|
||||
if (is_global_) {
|
||||
// Global path changes are handled by the request context.
|
||||
@ -232,7 +232,7 @@ bool CefCookieManagerImpl::SetStoragePath(const CefString& path) {
|
||||
NOTREACHED() << "Failed to create cookie storage directory";
|
||||
new_path.clear();
|
||||
} else {
|
||||
FilePath cookie_path = new_path.Append(FILE_PATH_LITERAL("Cookies"));
|
||||
base::FilePath cookie_path = new_path.Append(FILE_PATH_LITERAL("Cookies"));
|
||||
persistent_store =
|
||||
new SQLitePersistentCookieStore(cookie_path, false, NULL);
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ class CefCookieManagerImpl : public CefCookieManager {
|
||||
private:
|
||||
scoped_refptr<net::CookieMonster> cookie_monster_;
|
||||
bool is_global_;
|
||||
FilePath storage_path_;
|
||||
base::FilePath storage_path_;
|
||||
|
||||
IMPLEMENT_REFCOUNTING(CefCookieManagerImpl);
|
||||
};
|
||||
|
@ -7,13 +7,13 @@
|
||||
#include "libcef/cef_thread.h"
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebNode.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebRange.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h"
|
||||
|
||||
using WebKit::WebDocument;
|
||||
using WebKit::WebElement;
|
||||
|
@ -7,8 +7,8 @@
|
||||
#include "libcef/dom_document_impl.h"
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDOMEvent.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
|
||||
|
||||
using WebKit::WebDOMEvent;
|
||||
using WebKit::WebString;
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include "base/string_util.h"
|
||||
#include "base/threading/non_thread_safe.h"
|
||||
#include "base/utf_string_conversions.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDOMEvent.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDOMEventListener.h"
|
||||
@ -22,7 +23,6 @@
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebNode.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSelectElement.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
|
||||
|
||||
using WebKit::WebDocument;
|
||||
using WebKit::WebDOMEvent;
|
||||
|
@ -89,9 +89,9 @@ bool IsReservedName(const string16& filename) {
|
||||
|
||||
// Create an extension based on the file name and mime type.
|
||||
// From chrome/browser/download/download_util.cc
|
||||
void GenerateExtension(const FilePath& file_name,
|
||||
void GenerateExtension(const base::FilePath& file_name,
|
||||
const std::string& mime_type,
|
||||
FilePath::StringType* generated_extension) {
|
||||
base::FilePath::StringType* generated_extension) {
|
||||
// We're worried about two things here:
|
||||
//
|
||||
// 1) Usability. If the site fails to provide a file extension, we want to
|
||||
@ -102,12 +102,12 @@ void GenerateExtension(const FilePath& file_name,
|
||||
// from integrating with the user's shell.
|
||||
|
||||
// See if our file name already contains an extension.
|
||||
FilePath::StringType extension = file_name.Extension();
|
||||
base::FilePath::StringType extension = file_name.Extension();
|
||||
if (!extension.empty())
|
||||
extension.erase(extension.begin()); // Erase preceding '.'.
|
||||
|
||||
#if defined(OS_WIN)
|
||||
static const FilePath::CharType default_extension[] =
|
||||
static const base::FilePath::CharType default_extension[] =
|
||||
FILE_PATH_LITERAL("download");
|
||||
|
||||
// Rename shell-integrated extensions.
|
||||
@ -130,21 +130,22 @@ void GenerateExtension(const FilePath& file_name,
|
||||
// download. |file_name| can either be just the file name or it can be a
|
||||
// full path to a file.
|
||||
// From chrome/browser/download/download_util.cc
|
||||
void GenerateSafeFileName(const std::string& mime_type, FilePath* file_name) {
|
||||
void GenerateSafeFileName(const std::string& mime_type,
|
||||
base::FilePath* file_name) {
|
||||
// Make sure we get the right file extension
|
||||
FilePath::StringType extension;
|
||||
base::FilePath::StringType extension;
|
||||
GenerateExtension(*file_name, mime_type, &extension);
|
||||
*file_name = file_name->ReplaceExtension(extension);
|
||||
|
||||
#if defined(OS_WIN)
|
||||
// Prepend "_" to the file name if it's a reserved name
|
||||
FilePath::StringType leaf_name = file_name->BaseName().value();
|
||||
base::FilePath::StringType leaf_name = file_name->BaseName().value();
|
||||
DCHECK(!leaf_name.empty());
|
||||
if (IsReservedName(leaf_name)) {
|
||||
leaf_name = FilePath::StringType(FILE_PATH_LITERAL("_")) + leaf_name;
|
||||
leaf_name = base::FilePath::StringType(FILE_PATH_LITERAL("_")) + leaf_name;
|
||||
*file_name = file_name->DirName();
|
||||
if (file_name->value() == FilePath::kCurrentDirectory) {
|
||||
*file_name = FilePath(leaf_name);
|
||||
if (file_name->value() == base::FilePath::kCurrentDirectory) {
|
||||
*file_name = base::FilePath(leaf_name);
|
||||
} else {
|
||||
*file_name = file_name->Append(leaf_name);
|
||||
}
|
||||
@ -163,7 +164,7 @@ void GenerateFileName(const GURL& url,
|
||||
const std::string& referrer_charset,
|
||||
const std::string& mime_type,
|
||||
const std::string& suggested_name,
|
||||
FilePath* generated_name) {
|
||||
base::FilePath* generated_name) {
|
||||
string16 new_name = net::GetSuggestedFilename(GURL(url),
|
||||
content_disposition,
|
||||
referrer_charset,
|
||||
@ -176,9 +177,10 @@ void GenerateFileName(const GURL& url,
|
||||
// However, I'm just shuffling wrong code around, at least not adding
|
||||
// to it.
|
||||
#if defined(OS_WIN)
|
||||
*generated_name = FilePath(new_name);
|
||||
*generated_name = base::FilePath(new_name);
|
||||
#else
|
||||
*generated_name = FilePath(base::SysWideToNativeMB(UTF16ToWide(new_name)));
|
||||
*generated_name =
|
||||
base::FilePath(base::SysWideToNativeMB(UTF16ToWide(new_name)));
|
||||
#endif
|
||||
|
||||
DCHECK(!generated_name->empty());
|
||||
|
@ -10,7 +10,10 @@
|
||||
#include <string>
|
||||
|
||||
class GURL;
|
||||
|
||||
namespace base {
|
||||
class FilePath;
|
||||
}
|
||||
|
||||
namespace download_util {
|
||||
|
||||
@ -20,7 +23,7 @@ void GenerateFileName(const GURL& url,
|
||||
const std::string& referrer_charset,
|
||||
const std::string& mime_type,
|
||||
const std::string& suggested_name,
|
||||
FilePath* generated_name);
|
||||
base::FilePath* generated_name);
|
||||
|
||||
} // namespace download_util
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "net/base/file_stream.h"
|
||||
|
||||
DragDownloadFile::DragDownloadFile(
|
||||
const FilePath& file_name_or_path,
|
||||
const base::FilePath& file_name_or_path,
|
||||
scoped_ptr<net::FileStream> file_stream,
|
||||
const GURL& url,
|
||||
const GURL& referrer,
|
||||
|
@ -33,7 +33,7 @@ class DragDownloadFile : public ui::DownloadFileProvider {
|
||||
// created. Only UI thread is involved.
|
||||
// The file path and file stream should be provided as the first two
|
||||
// parameters.
|
||||
DragDownloadFile(const FilePath& file_name_or_path,
|
||||
DragDownloadFile(const base::FilePath& file_name_or_path,
|
||||
scoped_ptr<net::FileStream> file_stream,
|
||||
const GURL& url,
|
||||
const GURL& referrer,
|
||||
@ -64,15 +64,15 @@ class DragDownloadFile : public ui::DownloadFileProvider {
|
||||
// Initialized on drag-and-drop thread. Accessed on either thread after that
|
||||
// (Windows).
|
||||
// Accessed on UI thread (MacOSX).
|
||||
FilePath file_path_;
|
||||
FilePath file_name_;
|
||||
base::FilePath file_path_;
|
||||
base::FilePath file_name_;
|
||||
scoped_ptr<net::FileStream> file_stream_;
|
||||
GURL url_;
|
||||
GURL referrer_;
|
||||
std::string referrer_encoding_;
|
||||
BrowserWebViewDelegate* view_;
|
||||
MessageLoop* drag_message_loop_;
|
||||
FilePath temp_dir_path_;
|
||||
base::FilePath temp_dir_path_;
|
||||
|
||||
// Accessed on drag-and-drop thread (Windows).
|
||||
// Accessed on UI thread (MacOSX).
|
||||
|
@ -22,7 +22,7 @@ namespace drag_download_util {
|
||||
|
||||
bool ParseDownloadMetadata(const string16& metadata,
|
||||
string16* mime_type,
|
||||
FilePath* file_name,
|
||||
base::FilePath* file_name,
|
||||
GURL* url) {
|
||||
const char16 separator = L':';
|
||||
|
||||
@ -44,9 +44,9 @@ bool ParseDownloadMetadata(const string16& metadata,
|
||||
string16 file_name_str = metadata.substr(
|
||||
mime_type_end_pos + 1, file_name_end_pos - mime_type_end_pos - 1);
|
||||
#if defined(OS_WIN)
|
||||
*file_name = FilePath(file_name_str);
|
||||
*file_name = base::FilePath(file_name_str);
|
||||
#else
|
||||
*file_name = FilePath(UTF16ToUTF8(file_name_str));
|
||||
*file_name = base::FilePath(UTF16ToUTF8(file_name_str));
|
||||
#endif
|
||||
}
|
||||
if (url)
|
||||
@ -55,13 +55,13 @@ bool ParseDownloadMetadata(const string16& metadata,
|
||||
return true;
|
||||
}
|
||||
|
||||
FileStream* CreateFileStreamForDrop(FilePath* file_path) {
|
||||
FileStream* CreateFileStreamForDrop(base::FilePath* file_path) {
|
||||
DCHECK(file_path && !file_path->empty());
|
||||
|
||||
scoped_ptr<FileStream> file_stream(new FileStream(NULL));
|
||||
const int kMaxSeq = 99;
|
||||
for (int seq = 0; seq <= kMaxSeq; seq++) {
|
||||
FilePath new_file_path;
|
||||
base::FilePath new_file_path;
|
||||
if (seq == 0) {
|
||||
new_file_path = *file_path;
|
||||
} else {
|
||||
@ -98,7 +98,8 @@ void PromiseFileFinalizer::Cleanup() {
|
||||
drag_file_downloader_ = NULL;
|
||||
}
|
||||
|
||||
void PromiseFileFinalizer::OnDownloadCompleted(const FilePath& file_path) {
|
||||
void PromiseFileFinalizer::OnDownloadCompleted(
|
||||
const base::FilePath& file_path) {
|
||||
CefThread::PostTask(
|
||||
CefThread::UI, FROM_HERE,
|
||||
base::Bind(&PromiseFileFinalizer::Cleanup, this));
|
||||
|
@ -13,8 +13,12 @@
|
||||
#include "base/string16.h"
|
||||
#include "ui/base/dragdrop/download_file_interface.h"
|
||||
|
||||
class FilePath;
|
||||
class GURL;
|
||||
|
||||
namespace base {
|
||||
class FilePath;
|
||||
}
|
||||
|
||||
namespace net {
|
||||
class FileStream;
|
||||
}
|
||||
@ -32,13 +36,13 @@ namespace drag_download_util {
|
||||
// text/plain:example.txt:http://example.com/example.txt
|
||||
bool ParseDownloadMetadata(const string16& metadata,
|
||||
string16* mime_type,
|
||||
FilePath* file_name,
|
||||
base::FilePath* file_name,
|
||||
GURL* url);
|
||||
|
||||
// Create a new file at the specified path. If the file already exists, try to
|
||||
// insert the sequential unifier to produce a new file, like foo-01.txt.
|
||||
// Return a FileStream if successful.
|
||||
net::FileStream* CreateFileStreamForDrop(FilePath* file_path);
|
||||
net::FileStream* CreateFileStreamForDrop(base::FilePath* file_path);
|
||||
|
||||
// Implementation of DownloadFileObserver to finalize the download process.
|
||||
class PromiseFileFinalizer : public ui::DownloadFileObserver {
|
||||
@ -47,7 +51,7 @@ class PromiseFileFinalizer : public ui::DownloadFileObserver {
|
||||
virtual ~PromiseFileFinalizer();
|
||||
|
||||
// DownloadFileObserver methods.
|
||||
virtual void OnDownloadCompleted(const FilePath& file_path);
|
||||
virtual void OnDownloadCompleted(const base::FilePath& file_path);
|
||||
virtual void OnDownloadAborted();
|
||||
|
||||
private:
|
||||
|
@ -6,9 +6,9 @@
|
||||
#include "libcef/external_popup_menu_mac.h"
|
||||
#include "libcef/browser_impl.h"
|
||||
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebRect.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebExternalPopupMenuClient.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenuInfo.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h"
|
||||
#include "webkit/glue/webmenurunner_mac.h"
|
||||
|
||||
ExternalPopupMenu::ExternalPopupMenu(
|
||||
|
@ -19,13 +19,13 @@
|
||||
#include "content/public/common/content_client.h"
|
||||
#include "content/public/common/content_switches.h"
|
||||
#include "net/url_request/url_request_context_getter.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebGeolocationPermissionRequest.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebGeolocationPermissionRequestManager.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebGeolocationClient.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebGeolocationPosition.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebGeolocationError.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
|
||||
#include "webkit/user_agent/user_agent.h"
|
||||
|
||||
using WebKit::WebGeolocationController;
|
||||
|
@ -9,8 +9,8 @@
|
||||
#include <string>
|
||||
|
||||
#include "include/cef_request.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebHTTPHeaderVisitor.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebHTTPHeaderVisitor.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h"
|
||||
|
||||
namespace HttpHeaderUtils {
|
||||
|
||||
|
@ -18,7 +18,7 @@ void UIT_RegisterPlugin(CefPluginInfo* plugin_info) {
|
||||
|
||||
webkit::WebPluginInfo info;
|
||||
|
||||
info.path = FilePath(CefString(&plugin_info->unique_name));
|
||||
info.path = base::FilePath(CefString(&plugin_info->unique_name));
|
||||
info.name = CefString(&plugin_info->display_name);
|
||||
info.version = CefString(&plugin_info->version);
|
||||
info.desc = CefString(&plugin_info->description);
|
||||
|
@ -7,9 +7,9 @@
|
||||
#include "libcef/cef_thread.h"
|
||||
|
||||
#include "base/bind.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h"
|
||||
|
||||
using WebKit::WebSecurityPolicy;
|
||||
using WebKit::WebString;
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include "net/base/upload_file_element_reader.h"
|
||||
#include "net/http/http_request_headers.h"
|
||||
#include "net/url_request/url_request.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLRequest.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebURLRequest.h"
|
||||
|
||||
using WebKit::WebHTTPBody;
|
||||
using WebKit::WebString;
|
||||
@ -558,7 +558,7 @@ void CefPostDataElementImpl::Get(net::UploadElement& element) {
|
||||
if (type_ == PDE_TYPE_BYTES) {
|
||||
element.SetToBytes(static_cast<char*>(data_.bytes.bytes), data_.bytes.size);
|
||||
} else if (type_ == PDE_TYPE_FILE) {
|
||||
FilePath path = FilePath(CefString(&data_.filename));
|
||||
base::FilePath path = FilePath(CefString(&data_.filename));
|
||||
element.SetToFilePath(path);
|
||||
} else {
|
||||
NOTREACHED();
|
||||
@ -575,7 +575,7 @@ net::UploadElementReader* CefPostDataElementImpl::Get() {
|
||||
return new BytesElementReader(make_scoped_ptr(element));
|
||||
} else if (type_ == PDE_TYPE_FILE) {
|
||||
net::UploadElement* element = new net::UploadElement();
|
||||
FilePath path = FilePath(CefString(&data_.filename));
|
||||
base::FilePath path = base::FilePath(CefString(&data_.filename));
|
||||
element->SetToFilePath(path);
|
||||
return new FileElementReader(make_scoped_ptr(element));
|
||||
} else {
|
||||
|
@ -7,7 +7,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_request.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebHTTPBody.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebHTTPBody.h"
|
||||
|
||||
namespace net {
|
||||
class HttpRequestHeaders;
|
||||
|
@ -8,8 +8,8 @@
|
||||
#include "base/logging.h"
|
||||
#include "base/stringprintf.h"
|
||||
#include "net/http/http_response_headers.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLResponse.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebURLResponse.h"
|
||||
|
||||
CefResponseImpl::CefResponseImpl()
|
||||
: status_code_(0) {
|
||||
|
@ -39,8 +39,8 @@
|
||||
#include "net/url_request/url_request_http_job.h"
|
||||
#include "net/url_request/url_request_job.h"
|
||||
#include "net/url_request/url_request_job_factory.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
|
||||
|
||||
using net::URLRequestStatus;
|
||||
using WebKit::WebSecurityPolicy;
|
||||
|
@ -22,20 +22,20 @@
|
||||
#include "googleurl/src/gurl.h"
|
||||
#include "net/base/file_stream.h"
|
||||
#include "net/base/net_util.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebDragData.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebPoint.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebImage.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebDragData.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPoint.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebImage.h"
|
||||
#include "ui/base/clipboard/custom_data_helper.h"
|
||||
#include "ui/base/dragdrop/os_exchange_data.h"
|
||||
#include "ui/base/dragdrop/os_exchange_data_provider_gtk.h"
|
||||
#include "ui/base/dragdrop/gtk_dnd_util.h"
|
||||
#include "ui/base/gtk/gtk_screen_util.h"
|
||||
#include "ui/base/window_open_disposition.h"
|
||||
#include "ui/gfx/gtk_util.h"
|
||||
#include "webkit/glue/webdropdata.h"
|
||||
#include "webkit/glue/window_open_disposition.h"
|
||||
|
||||
using WebKit::WebDragOperation;
|
||||
using WebKit::WebDragOperationsMask;
|
||||
@ -257,7 +257,7 @@ void WebDragSource::OnDragDataGet(GtkWidget* sender,
|
||||
GURL file_url(std::string(reinterpret_cast<char*>(file_url_value),
|
||||
file_url_len));
|
||||
g_free(file_url_value);
|
||||
FilePath file_path;
|
||||
base::FilePath file_path;
|
||||
if (net::FileURLToFilePath(file_url, &file_path)) {
|
||||
// Open the file as a stream.
|
||||
scoped_ptr<net::FileStream> file_stream(
|
||||
@ -333,7 +333,7 @@ void WebDragSource::OnDragBegin(GtkWidget* sender,
|
||||
if (!download_url_.is_empty()) {
|
||||
// Generate the file name based on both mime type and proposed file name.
|
||||
std::string default_name = "download";
|
||||
FilePath generated_download_file_name =
|
||||
base::FilePath generated_download_file_name =
|
||||
net::GenerateFileName(download_url_,
|
||||
std::string(),
|
||||
std::string(),
|
||||
|
@ -91,7 +91,7 @@ class WebDragSource : public base::RefCounted<WebDragSource>,
|
||||
string16 wide_download_mime_type_;
|
||||
|
||||
// The file name to be saved to for a drag-out download.
|
||||
FilePath download_file_name_;
|
||||
base::FilePath download_file_name_;
|
||||
|
||||
// The URL to download from for a drag-out download.
|
||||
GURL download_url_;
|
||||
|
@ -41,7 +41,7 @@ struct WebDropData;
|
||||
NSDragOperation dragOperationMask_;
|
||||
|
||||
// The file name to be saved to for a drag-out download.
|
||||
FilePath downloadFileName_;
|
||||
base::FilePath downloadFileName_;
|
||||
|
||||
// The URL to download from for a drag-out download.
|
||||
GURL downloadURL_;
|
||||
|
@ -21,9 +21,9 @@
|
||||
#include "net/base/file_stream.h"
|
||||
#include "net/base/net_util.h"
|
||||
#import "third_party/mozilla/NSPasteboard+Utils.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebPoint.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPoint.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
|
||||
#include "ui/gfx/mac/nsimage_cache.h"
|
||||
#include "webkit/glue/webdropdata.h"
|
||||
@ -44,19 +44,20 @@ NSString* const kNSURLTitlePboardType = @"public.url-name";
|
||||
// Converts a string16 into a FilePath. Use this method instead of
|
||||
// -[NSString fileSystemRepresentation] to prevent exceptions from being thrown.
|
||||
// See http://crbug.com/78782 for more info.
|
||||
FilePath FilePathFromFilename(const string16& filename) {
|
||||
base::FilePath FilePathFromFilename(const string16& filename) {
|
||||
NSString* str = SysUTF16ToNSString(filename);
|
||||
char buf[MAXPATHLEN];
|
||||
if (![str getFileSystemRepresentation:buf maxLength:sizeof(buf)])
|
||||
return FilePath();
|
||||
return FilePath(buf);
|
||||
return base::FilePath();
|
||||
return base::FilePath(buf);
|
||||
}
|
||||
|
||||
// Returns a filename appropriate for the drop data
|
||||
// TODO(viettrungluu): Refactor to make it common across platforms,
|
||||
// and move it somewhere sensible.
|
||||
FilePath GetFileNameFromDragData(const WebDropData& drop_data) {
|
||||
FilePath file_name(FilePathFromFilename(drop_data.file_description_filename));
|
||||
base::FilePath GetFileNameFromDragData(const WebDropData& drop_data) {
|
||||
base::FilePath file_name(
|
||||
FilePathFromFilename(drop_data.file_description_filename));
|
||||
std::string extension = file_name.Extension();
|
||||
file_name = file_name.BaseName().RemoveExtension();
|
||||
|
||||
@ -109,7 +110,7 @@ void PromiseWriterHelper(const WebDropData& drop_data,
|
||||
|
||||
if (image == nil) {
|
||||
// No drag image was provided so create one.
|
||||
FilePath path = _Context->GetResourcesFilePath();
|
||||
base::FilePath path = _Context->GetResourcesFilePath();
|
||||
path = path.AppendASCII("urlIcon.png");
|
||||
image = [[NSImage alloc]
|
||||
initWithContentsOfFile:SysUTF8ToNSString(path.value())];
|
||||
@ -303,10 +304,10 @@ void PromiseWriterHelper(const WebDropData& drop_data,
|
||||
return nil;
|
||||
}
|
||||
|
||||
FilePath fileName = downloadFileName_.empty() ?
|
||||
base::FilePath fileName = downloadFileName_.empty() ?
|
||||
GetFileNameFromDragData(*dropData_) : downloadFileName_;
|
||||
FilePath filePath(SysNSStringToUTF8(path));
|
||||
filePath = filePath.Append(fileName);
|
||||
base::FilePath filePath(SysNSStringToUTF8(path));
|
||||
base::filePath = filePath.Append(fileName);
|
||||
|
||||
// CreateFileStreamForDrop() will call file_util::PathExists(),
|
||||
// which is blocking. Since this operation is already blocking the
|
||||
@ -377,7 +378,7 @@ void PromiseWriterHelper(const WebDropData& drop_data,
|
||||
fileExtension = GetFileNameFromDragData(*dropData_).Extension();
|
||||
} else {
|
||||
string16 mimeType;
|
||||
FilePath fileName;
|
||||
base::FilePath fileName;
|
||||
if (drag_download_util::ParseDownloadMetadata(
|
||||
dropData_->download_metadata,
|
||||
&mimeType,
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include "libcef/cef_thread.h"
|
||||
|
||||
#include "base/bind.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPoint.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebPoint.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
|
||||
|
||||
using WebKit::WebDragOperationNone;
|
||||
|
@ -66,7 +66,7 @@ GURL GetFileURLFromDropData(id<NSDraggingInfo> info) {
|
||||
}
|
||||
|
||||
static BOOL IsSupportedFileURL(const GURL& url) {
|
||||
FilePath full_path;
|
||||
base::FilePath full_path;
|
||||
net::FileURLToFilePath(url, &full_path);
|
||||
|
||||
std::string mime_type;
|
||||
|
@ -17,16 +17,16 @@
|
||||
#include "base/bind.h"
|
||||
#include "googleurl/src/gurl.h"
|
||||
#include "net/base/net_util.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebDragData.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPoint.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebDragData.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebPoint.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
|
||||
#include "ui/base/clipboard/custom_data_helper.h"
|
||||
#include "ui/base/dragdrop/os_exchange_data.h"
|
||||
#include "ui/base/dragdrop/os_exchange_data_provider_gtk.h"
|
||||
#include "ui/base/dragdrop/gtk_dnd_util.h"
|
||||
#include "ui/base/window_open_disposition.h"
|
||||
#include "ui/base/gtk/gtk_screen_util.h"
|
||||
#include "webkit/glue/webdropdata.h"
|
||||
#include "webkit/glue/window_open_disposition.h"
|
||||
|
||||
using WebKit::WebDragOperation;
|
||||
using WebKit::WebDragOperationNone;
|
||||
@ -193,7 +193,7 @@ void WebDropTarget::OnDragDataReceived(
|
||||
// file URLs are never set as the URL content for the drop.
|
||||
// TODO(estade): Can the filenames have a non-UTF8 encoding?
|
||||
GURL url(*uri_iter);
|
||||
FilePath file_path;
|
||||
base::FilePath file_path;
|
||||
if (url.SchemeIs("file") &&
|
||||
net::FileURLToFilePath(url, &file_path)) {
|
||||
drop_data_->filenames.push_back(
|
||||
|
@ -13,12 +13,12 @@
|
||||
#include "base/logging.h"
|
||||
#include "base/sys_string_conversions.h"
|
||||
#import "third_party/mozilla/NSPasteboard+Utils.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebDragData.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebDragData.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebPoint.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDragOperation.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPoint.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
|
||||
#include "ui/base/window_open_disposition.h"
|
||||
#include "webkit/glue/webdropdata.h"
|
||||
#include "webkit/glue/window_open_disposition.h"
|
||||
|
||||
using WebKit::WebDragOperation;
|
||||
using WebKit::WebDragOperationsMask;
|
||||
|
@ -15,14 +15,14 @@
|
||||
|
||||
#include "googleurl/src/gurl.h"
|
||||
#include "net/base/net_util.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebDragData.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPoint.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebDragData.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebPoint.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
|
||||
#include "ui/base/clipboard/clipboard_util_win.h"
|
||||
#include "ui/base/dragdrop/os_exchange_data.h"
|
||||
#include "ui/base/dragdrop/os_exchange_data_provider_win.h"
|
||||
#include "ui/base/window_open_disposition.h"
|
||||
#include "webkit/glue/webdropdata.h"
|
||||
#include "webkit/glue/window_open_disposition.h"
|
||||
|
||||
using WebKit::WebDragOperation;
|
||||
using WebKit::WebDragOperationNone;
|
||||
|
@ -12,10 +12,10 @@
|
||||
#include "base/logging.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "googleurl/src/gurl.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLError.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLLoaderClient.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLRequest.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLResponse.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebURLError.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebURLLoaderClient.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebURLRequest.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebURLResponse.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h"
|
||||
#include "webkit/glue/weburlloader_impl.h"
|
||||
|
||||
|
@ -10,9 +10,9 @@
|
||||
#include "libcef/cef_context.h"
|
||||
|
||||
#include "skia/ext/platform_canvas.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/mac/WebInputEventFactory.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
|
||||
#include "ui/gfx/rect.h"
|
||||
#include "ui/gfx/size.h"
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include "base/bind.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/message_loop.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebWidget.h"
|
||||
#include "webkit/glue/webkit_glue.h"
|
||||
|
||||
|
@ -18,8 +18,8 @@
|
||||
#include "base/time.h"
|
||||
#include "base/timer.h"
|
||||
#include "skia/ext/platform_canvas.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebRect.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebTextInputType.h"
|
||||
#include "third_party/skia/include/core/SkRegion.h"
|
||||
#include "ui/gfx/native_widget_types.h"
|
||||
|
@ -13,12 +13,12 @@
|
||||
#include "skia/ext/bitmap_platform_device.h"
|
||||
#include "skia/ext/platform_canvas.h"
|
||||
#include "skia/ext/platform_device.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/gtk/WebInputEventFactory.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/x11/WebScreenInfoFactory.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenu.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h"
|
||||
|
||||
using WebKit::WebInputEventFactory;
|
||||
using WebKit::WebKeyboardEvent;
|
||||
|
@ -17,12 +17,12 @@ MSVC_POP_WARNING();
|
||||
#include "base/bind.h"
|
||||
#import "base/logging.h"
|
||||
#import "skia/ext/platform_canvas.h"
|
||||
#import "third_party/WebKit/Source/Platform/chromium/public/WebSize.h"
|
||||
#import "third_party/WebKit/Source/WebKit/chromium/public/mac/WebInputEventFactory.h"
|
||||
#import "third_party/WebKit/Source/WebKit/chromium/public/mac/WebScreenInfoFactory.h"
|
||||
#import "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
|
||||
#import "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenu.h"
|
||||
#import "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h"
|
||||
#import "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h"
|
||||
#import "third_party/skia/include/core/SkRegion.h"
|
||||
#import "ui/gfx/rect.h"
|
||||
#import "ui/gfx/size.h"
|
||||
|
@ -12,14 +12,14 @@
|
||||
|
||||
#include "base/bind.h"
|
||||
#include "base/logging.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebRect.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h"
|
||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebVector.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderline.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenu.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/win/WebInputEventFactory.h"
|
||||
#include "third_party/WebKit/Source/WebKit/chromium/public/win/WebScreenInfoFactory.h"
|
||||
#include "third_party/skia/include/core/SkRegion.h"
|
||||
|
@ -21,6 +21,11 @@ patches = [
|
||||
'name': 'zlib',
|
||||
'path': '../third_party/zlib/',
|
||||
},
|
||||
{
|
||||
# http://code.google.com/p/gyp/issues/detail?id=443
|
||||
'name': 'message_loop_443',
|
||||
'path': '../base/',
|
||||
},
|
||||
{
|
||||
# http://code.google.com/p/chromiumembedded/issues/detail?id=364
|
||||
'name': 'spi_webcore_364',
|
||||
|
13
cef1/patch/patches/message_loop_443.patch
Normal file
13
cef1/patch/patches/message_loop_443.patch
Normal 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
|
Reference in New Issue
Block a user