diff options
author | kinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-20 01:28:10 +0000 |
---|---|---|
committer | kinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-20 01:28:10 +0000 |
commit | 5eb4be2a0f9036b9b300f3f1d1764b506c9abefa (patch) | |
tree | 2219d3112077a4d6129f6bc4045d1b0ace04ade4 /webkit/support/webkit_support.cc | |
parent | 240fbc1de4f075ff33081ada91e830791e0e225c (diff) | |
download | chromium_src-5eb4be2a0f9036b9b300f3f1d1764b506c9abefa.zip chromium_src-5eb4be2a0f9036b9b300f3f1d1764b506c9abefa.tar.gz chromium_src-5eb4be2a0f9036b9b300f3f1d1764b506c9abefa.tar.bz2 |
Add DRT support code for FileSystem
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/3779005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63164 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/support/webkit_support.cc')
-rw-r--r-- | webkit/support/webkit_support.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/webkit/support/webkit_support.cc b/webkit/support/webkit_support.cc index f0e3f85..7844d98c7 100644 --- a/webkit/support/webkit_support.cc +++ b/webkit/support/webkit_support.cc @@ -28,6 +28,7 @@ #include "net/base/net_errors.h" #include "net/base/net_util.h" #include "testing/gtest/include/gtest/gtest.h" +#include "third_party/WebKit/WebKit/chromium/public/WebFileSystemCallbacks.h" #include "third_party/WebKit/WebKit/chromium/public/WebKit.h" #include "third_party/WebKit/WebKit/chromium/public/WebPluginParams.h" #include "third_party/WebKit/WebKit/chromium/public/WebURLError.h" @@ -51,6 +52,8 @@ using WebKit::WebCString; using WebKit::WebDevToolsAgentClient; +using WebKit::WebFileSystem; +using WebKit::WebFileSystemCallbacks; using WebKit::WebFrame; using WebKit::WebMediaPlayerClient; using WebKit::WebPlugin; @@ -535,4 +538,19 @@ WebURL GetDevToolsPathAsURL() { return net::FilePathToFileURL(devToolsPath); } +// FileSystem +void OpenFileSystem(WebFrame*, WebFileSystem::Type, + WebFileSystemCallbacks* callbacks) { + // TODO(kinuko): hook up FileSystemPathManager in a way that the code could + // be shared with test_shell. + if (test_environment->webkit_client()->file_system_root().empty()) { + callbacks->didFail(WebKit::WebFileErrorSecurity); + } else { + callbacks->didOpenFileSystem( + "TestShellFileSystem", + webkit_glue::FilePathToWebString( + test_environment->webkit_client()->file_system_root())); + } +} + } // namespace webkit_support |