diff options
author | jianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-06 21:08:59 +0000 |
---|---|---|
committer | jianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-06 21:08:59 +0000 |
commit | 10b998f8a366c02a69b1e8688a1b5e0cb653a154 (patch) | |
tree | 4aa5d267e957f46ead7fd6742ade99679ff57a4c /webkit/tools | |
parent | 0568e6ca9cba8826a42eed080e569dba3fe6afec (diff) | |
download | chromium_src-10b998f8a366c02a69b1e8688a1b5e0cb653a154.zip chromium_src-10b998f8a366c02a69b1e8688a1b5e0cb653a154.tar.gz chromium_src-10b998f8a366c02a69b1e8688a1b5e0cb653a154.tar.bz2 |
Add Chromium side implementation for WebFileSystem interface in WebKit.
BUG=none
TEST=non
Review URL: http://codereview.chromium.org/1748015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46625 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools')
-rw-r--r-- | webkit/tools/test_shell/test_shell_webkit_init.h | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/webkit/tools/test_shell/test_shell_webkit_init.h b/webkit/tools/test_shell/test_shell_webkit_init.h index bf0a8ad..c4e79b4 100644 --- a/webkit/tools/test_shell/test_shell_webkit_init.h +++ b/webkit/tools/test_shell/test_shell_webkit_init.h @@ -7,10 +7,12 @@ #include "base/file_util.h" #include "base/path_service.h" +#include "base/platform_file.h" #include "base/scoped_temp_dir.h" #include "base/stats_counters.h" #include "base/string_util.h" #include "media/base/media.h" +#include "net/base/file_stream.h" #include "third_party/WebKit/WebKit/chromium/public/WebData.h" #include "third_party/WebKit/WebKit/chromium/public/WebDatabase.h" #include "third_party/WebKit/WebKit/chromium/public/WebGraphicsContext3D.h" @@ -28,6 +30,7 @@ #include "webkit/extensions/v8/gears_extension.h" #include "webkit/extensions/v8/interval_extension.h" #include "webkit/glue/webclipboard_impl.h" +#include "webkit/glue/webfilesystem_impl.h" #include "webkit/glue/webkit_glue.h" #include "webkit/glue/webkitclient_impl.h" #include "webkit/tools/test_shell/mock_webclipboard_impl.h" @@ -88,6 +91,8 @@ class TestShellWebKitInit : public webkit_glue::WebKitClientImpl { WebKit::WebDatabase::setObserver(&database_system_); + file_system_.set_sandbox_enabled(false); + #if defined(OS_WIN) // Ensure we pick up the default theme engine. SetThemeEngine(NULL); @@ -112,6 +117,10 @@ class TestShellWebKitInit : public webkit_glue::WebKitClientImpl { } } + virtual WebKit::WebFileSystem* fileSystem() { + return &file_system_; + } + virtual WebKit::WebSandboxSupport* sandboxSupport() { return NULL; } @@ -148,21 +157,6 @@ class TestShellWebKitInit : public webkit_glue::WebKitClientImpl { return SimpleDatabaseSystem::GetInstance()->GetFileSize(vfs_file_name); } - virtual bool getFileSize(const WebKit::WebString& path, long long& result) { - return file_util::GetFileSize( - webkit_glue::WebStringToFilePath(path), - reinterpret_cast<int64*>(&result)); - } - - virtual bool getFileModificationTime(const WebKit::WebString& path, - double& result) { - file_util::FileInfo info; - if (!file_util::GetFileInfo(webkit_glue::WebStringToFilePath(path), &info)) - return false; - result = info.last_modified.ToDoubleT(); - return true; - } - virtual unsigned long long visitedLinkHash(const char* canonicalURL, size_t length) { return 0; @@ -238,6 +232,7 @@ class TestShellWebKitInit : public webkit_glue::WebKitClientImpl { TestShellWebMimeRegistryImpl mime_registry_; MockWebClipboardImpl mock_clipboard_; webkit_glue::WebClipboardImpl real_clipboard_; + webkit_glue::WebFileSystemImpl file_system_; ScopedTempDir appcache_dir_; SimpleAppCacheSystem appcache_system_; SimpleDatabaseSystem database_system_; |