Add support for WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
Upstream WebKit is migrating from WebFileSystem::Type to a new top-level WebFileSystemType (unconnected to the WebFileSystem class) in order to make other filesystem-related refactoring easier. This is behind an #ifdef so that we can make the necessary changes upstream and downstream all at once. Review URL: https://chromiumcodereview.appspot.com/12886018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@189038 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
chrome/renderer/extensions
file_browser_handler_custom_bindings.ccfile_browser_private_custom_bindings.ccfile_system_natives.ccmedia_galleries_custom_bindings.ccsync_file_system_custom_bindings.cc
content
renderer
worker
webkit
@@ -10,6 +10,7 @@
|
|||||||
#include "base/logging.h"
|
#include "base/logging.h"
|
||||||
#include "grit/renderer_resources.h"
|
#include "grit/renderer_resources.h"
|
||||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebFileSystem.h"
|
#include "third_party/WebKit/Source/Platform/chromium/public/WebFileSystem.h"
|
||||||
|
#include "third_party/WebKit/Source/Platform/chromium/public/WebFileSystemType.h"
|
||||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h"
|
#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h"
|
||||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
|
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
|
||||||
|
|
||||||
@@ -46,7 +47,11 @@ v8::Handle<v8::Value> FileBrowserHandlerCustomBindings::GetExternalFileEntry(
|
|||||||
WebKit::WebFrame* webframe =
|
WebKit::WebFrame* webframe =
|
||||||
WebKit::WebFrame::frameForContext(v8_context());
|
WebKit::WebFrame::frameForContext(v8_context());
|
||||||
return webframe->createFileEntry(
|
return webframe->createFileEntry(
|
||||||
|
#ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
|
||||||
|
WebKit::WebFileSystemTypeExternal,
|
||||||
|
#else
|
||||||
WebKit::WebFileSystem::TypeExternal,
|
WebKit::WebFileSystem::TypeExternal,
|
||||||
|
#endif
|
||||||
WebKit::WebString::fromUTF8(file_system_name.c_str()),
|
WebKit::WebString::fromUTF8(file_system_name.c_str()),
|
||||||
WebKit::WebString::fromUTF8(file_system_path.c_str()),
|
WebKit::WebString::fromUTF8(file_system_path.c_str()),
|
||||||
WebKit::WebString::fromUTF8(file_full_path.c_str()),
|
WebKit::WebString::fromUTF8(file_full_path.c_str()),
|
||||||
|
@@ -10,6 +10,7 @@
|
|||||||
#include "base/logging.h"
|
#include "base/logging.h"
|
||||||
#include "grit/renderer_resources.h"
|
#include "grit/renderer_resources.h"
|
||||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebFileSystem.h"
|
#include "third_party/WebKit/Source/Platform/chromium/public/WebFileSystem.h"
|
||||||
|
#include "third_party/WebKit/Source/Platform/chromium/public/WebFileSystemType.h"
|
||||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h"
|
#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h"
|
||||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
|
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
|
||||||
|
|
||||||
@@ -35,7 +36,11 @@ v8::Handle<v8::Value> FileBrowserPrivateCustomBindings::GetLocalFileSystem(
|
|||||||
WebKit::WebFrame* webframe = WebKit::WebFrame::frameForContext(v8_context());
|
WebKit::WebFrame* webframe = WebKit::WebFrame::frameForContext(v8_context());
|
||||||
DCHECK(webframe);
|
DCHECK(webframe);
|
||||||
return webframe->createFileSystem(
|
return webframe->createFileSystem(
|
||||||
|
#ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
|
||||||
|
WebKit::WebFileSystemTypeExternal,
|
||||||
|
#else
|
||||||
WebKit::WebFileSystem::TypeExternal,
|
WebKit::WebFileSystem::TypeExternal,
|
||||||
|
#endif
|
||||||
WebKit::WebString::fromUTF8(name.c_str()),
|
WebKit::WebString::fromUTF8(name.c_str()),
|
||||||
WebKit::WebString::fromUTF8(path.c_str()));
|
WebKit::WebString::fromUTF8(path.c_str()));
|
||||||
}
|
}
|
||||||
|
@@ -13,6 +13,7 @@
|
|||||||
#include "extensions/common/constants.h"
|
#include "extensions/common/constants.h"
|
||||||
#include "grit/renderer_resources.h"
|
#include "grit/renderer_resources.h"
|
||||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebFileSystem.h"
|
#include "third_party/WebKit/Source/Platform/chromium/public/WebFileSystem.h"
|
||||||
|
#include "third_party/WebKit/Source/Platform/chromium/public/WebFileSystemType.h"
|
||||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h"
|
#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h"
|
||||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
|
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
|
||||||
#include "webkit/fileapi/file_system_types.h"
|
#include "webkit/fileapi/file_system_types.h"
|
||||||
@@ -58,7 +59,11 @@ v8::Handle<v8::Value> FileSystemNatives::GetIsolatedFileSystem(
|
|||||||
optional_root_name));
|
optional_root_name));
|
||||||
|
|
||||||
return webframe->createFileSystem(
|
return webframe->createFileSystem(
|
||||||
|
#ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
|
||||||
|
WebKit::WebFileSystemTypeIsolated,
|
||||||
|
#else
|
||||||
WebKit::WebFileSystem::TypeIsolated,
|
WebKit::WebFileSystem::TypeIsolated,
|
||||||
|
#endif
|
||||||
WebKit::WebString::fromUTF8(name),
|
WebKit::WebString::fromUTF8(name),
|
||||||
WebKit::WebString::fromUTF8(root));
|
WebKit::WebString::fromUTF8(root));
|
||||||
}
|
}
|
||||||
@@ -68,7 +73,11 @@ v8::Handle<v8::Value> FileSystemNatives::GetFileEntry(
|
|||||||
DCHECK(args.Length() == 5);
|
DCHECK(args.Length() == 5);
|
||||||
DCHECK(args[0]->IsString());
|
DCHECK(args[0]->IsString());
|
||||||
std::string type_string = *v8::String::Utf8Value(args[0]->ToString());
|
std::string type_string = *v8::String::Utf8Value(args[0]->ToString());
|
||||||
|
#ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
|
||||||
|
WebKit::WebFileSystemType type;
|
||||||
|
#else
|
||||||
WebKit::WebFileSystem::Type type;
|
WebKit::WebFileSystem::Type type;
|
||||||
|
#endif
|
||||||
bool is_valid_type = fileapi::GetFileSystemPublicType(type_string, &type);
|
bool is_valid_type = fileapi::GetFileSystemPublicType(type_string, &type);
|
||||||
DCHECK(is_valid_type);
|
DCHECK(is_valid_type);
|
||||||
if (is_valid_type == false) {
|
if (is_valid_type == false) {
|
||||||
|
@@ -60,7 +60,12 @@ v8::Handle<v8::Value> MediaGalleriesCustomBindings::GetMediaFileSystemObject(
|
|||||||
const std::string root_url =
|
const std::string root_url =
|
||||||
fileapi::GetIsolatedFileSystemRootURIString(
|
fileapi::GetIsolatedFileSystemRootURIString(
|
||||||
origin, fsid, extension_misc::kMediaFileSystemPathPart);
|
origin, fsid, extension_misc::kMediaFileSystemPathPart);
|
||||||
return webframe->createFileSystem(WebKit::WebFileSystem::TypeIsolated,
|
return webframe->createFileSystem(
|
||||||
|
#ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
|
||||||
|
WebKit::WebFileSystemTypeIsolated,
|
||||||
|
#else
|
||||||
|
WebKit::WebFileSystem::TypeIsolated,
|
||||||
|
#endif
|
||||||
WebKit::WebString::fromUTF8(name),
|
WebKit::WebString::fromUTF8(name),
|
||||||
WebKit::WebString::fromUTF8(root_url));
|
WebKit::WebString::fromUTF8(root_url));
|
||||||
}
|
}
|
||||||
|
@@ -50,7 +50,12 @@ v8::Handle<v8::Value> SyncFileSystemCustomBindings::GetSyncFileSystemObject(
|
|||||||
|
|
||||||
WebKit::WebFrame* webframe =
|
WebKit::WebFrame* webframe =
|
||||||
WebKit::WebFrame::frameForContext(v8_context());
|
WebKit::WebFrame::frameForContext(v8_context());
|
||||||
return webframe->createFileSystem(WebKit::WebFileSystem::TypeExternal,
|
return webframe->createFileSystem(
|
||||||
|
#ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
|
||||||
|
WebKit::WebFileSystemTypeExternal,
|
||||||
|
#else
|
||||||
|
WebKit::WebFileSystem::TypeExternal,
|
||||||
|
#endif
|
||||||
WebKit::WebString::fromUTF8(name),
|
WebKit::WebString::fromUTF8(name),
|
||||||
WebKit::WebString::fromUTF8(root_url));
|
WebKit::WebString::fromUTF8(root_url));
|
||||||
}
|
}
|
||||||
|
@@ -125,6 +125,7 @@
|
|||||||
#include "third_party/skia/include/core/SkPicture.h"
|
#include "third_party/skia/include/core/SkPicture.h"
|
||||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebCString.h"
|
#include "third_party/WebKit/Source/Platform/chromium/public/WebCString.h"
|
||||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebDragData.h"
|
#include "third_party/WebKit/Source/Platform/chromium/public/WebDragData.h"
|
||||||
|
#include "third_party/WebKit/Source/Platform/chromium/public/WebFileSystemType.h"
|
||||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebHTTPBody.h"
|
#include "third_party/WebKit/Source/Platform/chromium/public/WebHTTPBody.h"
|
||||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebImage.h"
|
#include "third_party/WebKit/Source/Platform/chromium/public/WebImage.h"
|
||||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebMessagePortChannel.h"
|
#include "third_party/WebKit/Source/Platform/chromium/public/WebMessagePortChannel.h"
|
||||||
@@ -4200,7 +4201,11 @@ void RenderViewImpl::reportFindInPageSelection(int request_id,
|
|||||||
|
|
||||||
void RenderViewImpl::openFileSystem(
|
void RenderViewImpl::openFileSystem(
|
||||||
WebFrame* frame,
|
WebFrame* frame,
|
||||||
|
#ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
|
||||||
|
WebKit::WebFileSystemType type,
|
||||||
|
#else
|
||||||
WebFileSystem::Type type,
|
WebFileSystem::Type type,
|
||||||
|
#endif
|
||||||
long long size,
|
long long size,
|
||||||
bool create,
|
bool create,
|
||||||
WebFileSystemCallbacks* callbacks) {
|
WebFileSystemCallbacks* callbacks) {
|
||||||
@@ -4220,7 +4225,11 @@ void RenderViewImpl::openFileSystem(
|
|||||||
|
|
||||||
void RenderViewImpl::deleteFileSystem(
|
void RenderViewImpl::deleteFileSystem(
|
||||||
WebFrame* frame,
|
WebFrame* frame,
|
||||||
|
#ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
|
||||||
|
WebKit::WebFileSystemType type ,
|
||||||
|
#else
|
||||||
WebFileSystem::Type type ,
|
WebFileSystem::Type type ,
|
||||||
|
#endif
|
||||||
WebFileSystemCallbacks* callbacks) {
|
WebFileSystemCallbacks* callbacks) {
|
||||||
DCHECK(callbacks);
|
DCHECK(callbacks);
|
||||||
|
|
||||||
|
@@ -641,12 +641,20 @@ class CONTENT_EXPORT RenderViewImpl
|
|||||||
int active_match_ordinal,
|
int active_match_ordinal,
|
||||||
const WebKit::WebRect& sel);
|
const WebKit::WebRect& sel);
|
||||||
virtual void openFileSystem(WebKit::WebFrame* frame,
|
virtual void openFileSystem(WebKit::WebFrame* frame,
|
||||||
|
#ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
|
||||||
|
WebKit::WebFileSystemType type,
|
||||||
|
#else
|
||||||
WebKit::WebFileSystem::Type type,
|
WebKit::WebFileSystem::Type type,
|
||||||
|
#endif
|
||||||
long long size,
|
long long size,
|
||||||
bool create,
|
bool create,
|
||||||
WebKit::WebFileSystemCallbacks* callbacks);
|
WebKit::WebFileSystemCallbacks* callbacks);
|
||||||
virtual void deleteFileSystem(WebKit::WebFrame* frame,
|
virtual void deleteFileSystem(WebKit::WebFrame* frame,
|
||||||
|
#ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
|
||||||
|
WebKit::WebFileSystemType type,
|
||||||
|
#else
|
||||||
WebKit::WebFileSystem::Type type,
|
WebKit::WebFileSystem::Type type,
|
||||||
|
#endif
|
||||||
WebKit::WebFileSystemCallbacks* callbacks);
|
WebKit::WebFileSystemCallbacks* callbacks);
|
||||||
virtual void queryStorageUsageAndQuota(
|
virtual void queryStorageUsageAndQuota(
|
||||||
WebKit::WebFrame* frame,
|
WebKit::WebFrame* frame,
|
||||||
|
@@ -161,7 +161,11 @@ bool WebSharedWorkerClientProxy::allowFileSystem() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void WebSharedWorkerClientProxy::openFileSystem(
|
void WebSharedWorkerClientProxy::openFileSystem(
|
||||||
|
#ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
|
||||||
|
WebKit::WebFileSystemType type,
|
||||||
|
#else
|
||||||
WebKit::WebFileSystem::Type type,
|
WebKit::WebFileSystem::Type type,
|
||||||
|
#endif
|
||||||
long long size,
|
long long size,
|
||||||
bool create,
|
bool create,
|
||||||
WebKit::WebFileSystemCallbacks* callbacks) {
|
WebKit::WebFileSystemCallbacks* callbacks) {
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
#include "base/memory/weak_ptr.h"
|
#include "base/memory/weak_ptr.h"
|
||||||
#include "ipc/ipc_channel.h"
|
#include "ipc/ipc_channel.h"
|
||||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebFileSystem.h"
|
#include "third_party/WebKit/Source/Platform/chromium/public/WebFileSystem.h"
|
||||||
|
#include "third_party/WebKit/Source/Platform/chromium/public/WebFileSystemType.h"
|
||||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSharedWorkerClient.h"
|
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSharedWorkerClient.h"
|
||||||
|
|
||||||
namespace WebKit {
|
namespace WebKit {
|
||||||
@@ -74,7 +75,12 @@ class WebSharedWorkerClientProxy : public WebKit::WebSharedWorkerClient {
|
|||||||
const WebKit::WebString& display_name,
|
const WebKit::WebString& display_name,
|
||||||
unsigned long estimated_size);
|
unsigned long estimated_size);
|
||||||
virtual bool allowFileSystem();
|
virtual bool allowFileSystem();
|
||||||
virtual void openFileSystem(WebKit::WebFileSystem::Type type,
|
virtual void openFileSystem(
|
||||||
|
#ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
|
||||||
|
WebKit::WebFileSystemType type,
|
||||||
|
#else
|
||||||
|
WebKit::WebFileSystem::Type type,
|
||||||
|
#endif
|
||||||
long long size,
|
long long size,
|
||||||
bool create,
|
bool create,
|
||||||
WebKit::WebFileSystemCallbacks* callbacks);
|
WebKit::WebFileSystemCallbacks* callbacks);
|
||||||
|
@@ -6,6 +6,7 @@
|
|||||||
#define WEBKIT_FILEAPI_FILE_SYSTEM_TYPES_H_
|
#define WEBKIT_FILEAPI_FILE_SYSTEM_TYPES_H_
|
||||||
|
|
||||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebFileSystem.h"
|
#include "third_party/WebKit/Source/Platform/chromium/public/WebFileSystem.h"
|
||||||
|
#include "third_party/WebKit/Source/Platform/chromium/public/WebFileSystemType.h"
|
||||||
|
|
||||||
namespace fileapi {
|
namespace fileapi {
|
||||||
|
|
||||||
@@ -24,6 +25,18 @@ enum FileSystemType {
|
|||||||
// They are sandboxed filesystems; all the files in the filesystems are
|
// They are sandboxed filesystems; all the files in the filesystems are
|
||||||
// placed under the profile directory with path obfuscation and quota
|
// placed under the profile directory with path obfuscation and quota
|
||||||
// enforcement.
|
// enforcement.
|
||||||
|
#ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
|
||||||
|
kFileSystemTypeTemporary = WebKit::WebFileSystemTypeTemporary,
|
||||||
|
kFileSystemTypePersistent = WebKit::WebFileSystemTypePersistent,
|
||||||
|
|
||||||
|
// Indicates non-sandboxed isolated filesystem.
|
||||||
|
kFileSystemTypeIsolated = WebKit::WebFileSystemTypeIsolated,
|
||||||
|
|
||||||
|
// Indicates non-sandboxed filesystem where files are placed outside the
|
||||||
|
// profile directory (thus called 'external' filesystem).
|
||||||
|
// This filesystem is used only by Chrome OS as of writing.
|
||||||
|
kFileSystemTypeExternal = WebKit::WebFileSystemTypeExternal,
|
||||||
|
#else
|
||||||
kFileSystemTypeTemporary = WebKit::WebFileSystem::TypeTemporary,
|
kFileSystemTypeTemporary = WebKit::WebFileSystem::TypeTemporary,
|
||||||
kFileSystemTypePersistent = WebKit::WebFileSystem::TypePersistent,
|
kFileSystemTypePersistent = WebKit::WebFileSystem::TypePersistent,
|
||||||
|
|
||||||
@@ -34,6 +47,7 @@ enum FileSystemType {
|
|||||||
// profile directory (thus called 'external' filesystem).
|
// profile directory (thus called 'external' filesystem).
|
||||||
// This filesystem is used only by Chrome OS as of writing.
|
// This filesystem is used only by Chrome OS as of writing.
|
||||||
kFileSystemTypeExternal = WebKit::WebFileSystem::TypeExternal,
|
kFileSystemTypeExternal = WebKit::WebFileSystem::TypeExternal,
|
||||||
|
#endif
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
// Private FileSystem types, that should not appear in filesystem: URL as
|
// Private FileSystem types, that should not appear in filesystem: URL as
|
||||||
|
@@ -291,22 +291,43 @@ WebKit::WebFileError PlatformFileErrorToWebFileError(
|
|||||||
|
|
||||||
bool GetFileSystemPublicType(
|
bool GetFileSystemPublicType(
|
||||||
const std::string type_string,
|
const std::string type_string,
|
||||||
WebKit::WebFileSystem::Type* type) {
|
#ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
|
||||||
|
WebKit::WebFileSystemType* type
|
||||||
|
#else
|
||||||
|
WebKit::WebFileSystem::Type* type
|
||||||
|
#endif
|
||||||
|
) {
|
||||||
DCHECK(type);
|
DCHECK(type);
|
||||||
if (type_string == "Temporary") {
|
if (type_string == "Temporary") {
|
||||||
|
#ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
|
||||||
|
*type = WebKit::WebFileSystemTypeTemporary;
|
||||||
|
#else
|
||||||
*type = WebKit::WebFileSystem::TypeTemporary;
|
*type = WebKit::WebFileSystem::TypeTemporary;
|
||||||
|
#endif
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (type_string == "Persistent") {
|
if (type_string == "Persistent") {
|
||||||
|
#ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
|
||||||
|
*type = WebKit::WebFileSystemTypePersistent;
|
||||||
|
#else
|
||||||
*type = WebKit::WebFileSystem::TypePersistent;
|
*type = WebKit::WebFileSystem::TypePersistent;
|
||||||
|
#endif
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (type_string == "Isolated") {
|
if (type_string == "Isolated") {
|
||||||
|
#ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
|
||||||
|
*type = WebKit::WebFileSystemTypeIsolated;
|
||||||
|
#else
|
||||||
*type = WebKit::WebFileSystem::TypeIsolated;
|
*type = WebKit::WebFileSystem::TypeIsolated;
|
||||||
|
#endif
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (type_string == "External") {
|
if (type_string == "External") {
|
||||||
|
#ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
|
||||||
|
*type = WebKit::WebFileSystemTypeExternal;
|
||||||
|
#else
|
||||||
*type = WebKit::WebFileSystem::TypeExternal;
|
*type = WebKit::WebFileSystem::TypeExternal;
|
||||||
|
#endif
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
NOTREACHED();
|
NOTREACHED();
|
||||||
|
@@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
#include "base/files/file_path.h"
|
#include "base/files/file_path.h"
|
||||||
#include "base/platform_file.h"
|
#include "base/platform_file.h"
|
||||||
|
#include "third_party/WebKit/Source/Platform/chromium/public/WebFileSystemType.h"
|
||||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileError.h"
|
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileError.h"
|
||||||
#include "webkit/fileapi/file_system_types.h"
|
#include "webkit/fileapi/file_system_types.h"
|
||||||
#include "webkit/quota/quota_types.h"
|
#include "webkit/quota/quota_types.h"
|
||||||
@@ -114,7 +115,12 @@ WEBKIT_STORAGE_EXPORT std::string GetFileSystemTypeString(FileSystemType type);
|
|||||||
// Returns false if the |type_string| is invalid.
|
// Returns false if the |type_string| is invalid.
|
||||||
WEBKIT_STORAGE_EXPORT bool GetFileSystemPublicType(
|
WEBKIT_STORAGE_EXPORT bool GetFileSystemPublicType(
|
||||||
std::string type_string,
|
std::string type_string,
|
||||||
WebKit::WebFileSystem::Type* type);
|
#ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
|
||||||
|
WebKit::WebFileSystemType* type
|
||||||
|
#else
|
||||||
|
WebKit::WebFileSystem::Type* type
|
||||||
|
#endif
|
||||||
|
);
|
||||||
|
|
||||||
// Encodes |file_path| to a string.
|
// Encodes |file_path| to a string.
|
||||||
// Following conditions should be held:
|
// Following conditions should be held:
|
||||||
|
@@ -851,14 +851,24 @@ WebURL GetDevToolsPathAsURL() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FileSystem
|
// FileSystem
|
||||||
void OpenFileSystem(WebFrame* frame, WebFileSystem::Type type,
|
void OpenFileSystem(WebFrame* frame,
|
||||||
|
#ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
|
||||||
|
WebKit::WebFileSystemType type,
|
||||||
|
#else
|
||||||
|
WebFileSystem::Type type,
|
||||||
|
#endif
|
||||||
long long size, bool create, WebFileSystemCallbacks* callbacks) {
|
long long size, bool create, WebFileSystemCallbacks* callbacks) {
|
||||||
SimpleFileSystem* fileSystem = static_cast<SimpleFileSystem*>(
|
SimpleFileSystem* fileSystem = static_cast<SimpleFileSystem*>(
|
||||||
test_environment->webkit_platform_support()->fileSystem());
|
test_environment->webkit_platform_support()->fileSystem());
|
||||||
fileSystem->OpenFileSystem(frame, type, size, create, callbacks);
|
fileSystem->OpenFileSystem(frame, type, size, create, callbacks);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DeleteFileSystem(WebFrame* frame, WebFileSystem::Type type,
|
void DeleteFileSystem(WebFrame* frame,
|
||||||
|
#ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
|
||||||
|
WebKit::WebFileSystemType type,
|
||||||
|
#else
|
||||||
|
WebFileSystem::Type type,
|
||||||
|
#endif
|
||||||
WebFileSystemCallbacks* callbacks) {
|
WebFileSystemCallbacks* callbacks) {
|
||||||
SimpleFileSystem* fileSystem = static_cast<SimpleFileSystem*>(
|
SimpleFileSystem* fileSystem = static_cast<SimpleFileSystem*>(
|
||||||
test_environment->webkit_platform_support()->fileSystem());
|
test_environment->webkit_platform_support()->fileSystem());
|
||||||
|
@@ -10,6 +10,7 @@
|
|||||||
#include "base/basictypes.h"
|
#include "base/basictypes.h"
|
||||||
#include "third_party/WebKit/Source/Platform/chromium/public/Platform.h"
|
#include "third_party/WebKit/Source/Platform/chromium/public/Platform.h"
|
||||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebFileSystem.h"
|
#include "third_party/WebKit/Source/Platform/chromium/public/WebFileSystem.h"
|
||||||
|
#include "third_party/WebKit/Source/Platform/chromium/public/WebFileSystemType.h"
|
||||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3D.h"
|
#include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3D.h"
|
||||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebReferrerPolicy.h"
|
#include "third_party/WebKit/Source/Platform/chromium/public/WebReferrerPolicy.h"
|
||||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebURLRequest.h"
|
#include "third_party/WebKit/Source/Platform/chromium/public/WebURLRequest.h"
|
||||||
@@ -266,12 +267,20 @@ WebKit::WebURL GetDevToolsPathAsURL();
|
|||||||
|
|
||||||
// - FileSystem
|
// - FileSystem
|
||||||
void OpenFileSystem(WebKit::WebFrame* frame,
|
void OpenFileSystem(WebKit::WebFrame* frame,
|
||||||
|
#ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
|
||||||
|
WebKit::WebFileSystemType type,
|
||||||
|
#else
|
||||||
WebKit::WebFileSystem::Type type,
|
WebKit::WebFileSystem::Type type,
|
||||||
|
#endif
|
||||||
long long size,
|
long long size,
|
||||||
bool create,
|
bool create,
|
||||||
WebKit::WebFileSystemCallbacks* callbacks);
|
WebKit::WebFileSystemCallbacks* callbacks);
|
||||||
void DeleteFileSystem(WebKit::WebFrame* frame,
|
void DeleteFileSystem(WebKit::WebFrame* frame,
|
||||||
|
#ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
|
||||||
|
WebKit::WebFileSystemType type,
|
||||||
|
#else
|
||||||
WebKit::WebFileSystem::Type type,
|
WebKit::WebFileSystem::Type type,
|
||||||
|
#endif
|
||||||
WebKit::WebFileSystemCallbacks* callbacks);
|
WebKit::WebFileSystemCallbacks* callbacks);
|
||||||
|
|
||||||
// Returns a filesystem ID for the newly created isolated filesystem.
|
// Returns a filesystem ID for the newly created isolated filesystem.
|
||||||
|
@@ -95,7 +95,12 @@ SimpleFileSystem::~SimpleFileSystem() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SimpleFileSystem::OpenFileSystem(
|
void SimpleFileSystem::OpenFileSystem(
|
||||||
WebFrame* frame, WebFileSystem::Type type,
|
WebFrame* frame,
|
||||||
|
#ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
|
||||||
|
WebKit::WebFileSystemType type,
|
||||||
|
#else
|
||||||
|
WebFileSystem::Type type,
|
||||||
|
#endif
|
||||||
long long, bool create,
|
long long, bool create,
|
||||||
WebFileSystemCallbacks* callbacks) {
|
WebFileSystemCallbacks* callbacks) {
|
||||||
if (!frame || !file_system_context_.get()) {
|
if (!frame || !file_system_context_.get()) {
|
||||||
@@ -111,7 +116,12 @@ void SimpleFileSystem::OpenFileSystem(
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SimpleFileSystem::DeleteFileSystem(
|
void SimpleFileSystem::DeleteFileSystem(
|
||||||
WebFrame* frame, WebFileSystem::Type type,
|
WebFrame* frame,
|
||||||
|
#ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
|
||||||
|
WebKit::WebFileSystemType type,
|
||||||
|
#else
|
||||||
|
WebFileSystem::Type type,
|
||||||
|
#endif
|
||||||
WebFileSystemCallbacks* callbacks) {
|
WebFileSystemCallbacks* callbacks) {
|
||||||
if (!frame || !file_system_context_.get()) {
|
if (!frame || !file_system_context_.get()) {
|
||||||
callbacks->didFail(WebKit::WebFileErrorSecurity);
|
callbacks->didFail(WebKit::WebFileErrorSecurity);
|
||||||
|
@@ -11,6 +11,7 @@
|
|||||||
#include "base/id_map.h"
|
#include "base/id_map.h"
|
||||||
#include "base/memory/weak_ptr.h"
|
#include "base/memory/weak_ptr.h"
|
||||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebFileSystem.h"
|
#include "third_party/WebKit/Source/Platform/chromium/public/WebFileSystem.h"
|
||||||
|
#include "third_party/WebKit/Source/Platform/chromium/public/WebFileSystemType.h"
|
||||||
#include "webkit/fileapi/file_system_context.h"
|
#include "webkit/fileapi/file_system_context.h"
|
||||||
#include "webkit/fileapi/file_system_operation.h"
|
#include "webkit/fileapi/file_system_operation.h"
|
||||||
#include "webkit/fileapi/file_system_types.h"
|
#include "webkit/fileapi/file_system_types.h"
|
||||||
@@ -38,12 +39,20 @@ class SimpleFileSystem
|
|||||||
virtual ~SimpleFileSystem();
|
virtual ~SimpleFileSystem();
|
||||||
|
|
||||||
void OpenFileSystem(WebKit::WebFrame* frame,
|
void OpenFileSystem(WebKit::WebFrame* frame,
|
||||||
|
#ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
|
||||||
|
WebKit::WebFileSystemType type,
|
||||||
|
#else
|
||||||
WebKit::WebFileSystem::Type type,
|
WebKit::WebFileSystem::Type type,
|
||||||
|
#endif
|
||||||
long long size,
|
long long size,
|
||||||
bool create,
|
bool create,
|
||||||
WebKit::WebFileSystemCallbacks* callbacks);
|
WebKit::WebFileSystemCallbacks* callbacks);
|
||||||
void DeleteFileSystem(WebKit::WebFrame* frame,
|
void DeleteFileSystem(WebKit::WebFrame* frame,
|
||||||
|
#ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
|
||||||
|
WebKit::WebFileSystemType type,
|
||||||
|
#else
|
||||||
WebKit::WebFileSystem::Type type,
|
WebKit::WebFileSystem::Type type,
|
||||||
|
#endif
|
||||||
WebKit::WebFileSystemCallbacks* callbacks);
|
WebKit::WebFileSystemCallbacks* callbacks);
|
||||||
|
|
||||||
fileapi::FileSystemContext* file_system_context() {
|
fileapi::FileSystemContext* file_system_context() {
|
||||||
|
@@ -805,7 +805,13 @@ bool TestWebViewDelegate::allowScript(WebFrame* frame,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void TestWebViewDelegate::openFileSystem(
|
void TestWebViewDelegate::openFileSystem(
|
||||||
WebFrame* frame, WebFileSystem::Type type, long long size, bool create,
|
WebFrame* frame,
|
||||||
|
#ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
|
||||||
|
WebKit::WebFileSystemType type,
|
||||||
|
#else
|
||||||
|
WebFileSystem::Type type,
|
||||||
|
#endif
|
||||||
|
long long size, bool create,
|
||||||
WebFileSystemCallbacks* callbacks) {
|
WebFileSystemCallbacks* callbacks) {
|
||||||
SimpleFileSystem* fileSystem = static_cast<SimpleFileSystem*>(
|
SimpleFileSystem* fileSystem = static_cast<SimpleFileSystem*>(
|
||||||
WebKit::Platform::current()->fileSystem());
|
WebKit::Platform::current()->fileSystem());
|
||||||
|
@@ -20,6 +20,7 @@
|
|||||||
#include "base/string16.h"
|
#include "base/string16.h"
|
||||||
#include "build/build_config.h"
|
#include "build/build_config.h"
|
||||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebFileSystem.h"
|
#include "third_party/WebKit/Source/Platform/chromium/public/WebFileSystem.h"
|
||||||
|
#include "third_party/WebKit/Source/Platform/chromium/public/WebFileSystemType.h"
|
||||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3D.h"
|
#include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3D.h"
|
||||||
#include "third_party/WebKit/Source/Platform/chromium/public/WebRect.h"
|
#include "third_party/WebKit/Source/Platform/chromium/public/WebRect.h"
|
||||||
#include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h"
|
#include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h"
|
||||||
@@ -227,7 +228,11 @@ class TestWebViewDelegate : public WebKit::WebViewClient,
|
|||||||
virtual bool allowScript(WebKit::WebFrame* frame, bool enabled_per_settings);
|
virtual bool allowScript(WebKit::WebFrame* frame, bool enabled_per_settings);
|
||||||
virtual void openFileSystem(
|
virtual void openFileSystem(
|
||||||
WebKit::WebFrame* frame,
|
WebKit::WebFrame* frame,
|
||||||
|
#ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
|
||||||
|
WebKit::WebFileSystemType type,
|
||||||
|
#else
|
||||||
WebKit::WebFileSystem::Type type,
|
WebKit::WebFileSystem::Type type,
|
||||||
|
#endif
|
||||||
long long size,
|
long long size,
|
||||||
bool create,
|
bool create,
|
||||||
WebKit::WebFileSystemCallbacks* callbacks);
|
WebKit::WebFileSystemCallbacks* callbacks);
|
||||||
|
Reference in New Issue
Block a user