summaryrefslogtreecommitdiffstats
path: root/webkit/support
diff options
context:
space:
mode:
authorkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-02 07:21:32 +0000
committerkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-02 07:21:32 +0000
commit97f0c438c5c07b22216ac610895e2fa205238b24 (patch)
tree2793b55d712d2d438d34823caa626261466472fd /webkit/support
parent82a3468d988052dc8f857d9dd3963e2f581875e3 (diff)
downloadchromium_src-97f0c438c5c07b22216ac610895e2fa205238b24.zip
chromium_src-97f0c438c5c07b22216ac610895e2fa205238b24.tar.gz
chromium_src-97f0c438c5c07b22216ac610895e2fa205238b24.tar.bz2
Relanding 9866038: Adding DRT support for drag-and-drop using IsolatedFileSystem
Reverted for suspicious WebKit flakiness, but looks like it was a false alarm. TBR=kinuko@chromium.org BUG=99823 TEST=Layout test is to be added Review URL: https://chromiumcodereview.appspot.com/9959058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130105 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/support')
-rw-r--r--webkit/support/webkit_support.cc12
-rw-r--r--webkit/support/webkit_support.h5
2 files changed, 17 insertions, 0 deletions
diff --git a/webkit/support/webkit_support.cc b/webkit/support/webkit_support.cc
index fd2a098..0f2ee69 100644
--- a/webkit/support/webkit_support.cc
+++ b/webkit/support/webkit_support.cc
@@ -49,6 +49,7 @@
#include "ui/gfx/gl/gl_implementation.h"
#include "ui/gfx/gl/gl_surface.h"
#include "webkit/appcache/web_application_cache_host_impl.h"
+#include "webkit/fileapi/isolated_context.h"
#include "webkit/glue/user_agent.h"
#include "webkit/glue/webkit_constants.h"
#include "webkit/glue/webkit_glue.h"
@@ -680,6 +681,17 @@ void OpenFileSystem(WebFrame* frame, WebFileSystem::Type type,
fileSystem->OpenFileSystem(frame, type, size, create, callbacks);
}
+WebKit::WebString RegisterIsolatedFileSystem(
+ const WebKit::WebVector<WebKit::WebString>& filenames) {
+ std::set<FilePath> files;
+ for (size_t i = 0; i < filenames.size(); ++i)
+ files.insert(webkit_glue::WebStringToFilePath(filenames[i]));
+ std::string filesystemId =
+ fileapi::IsolatedContext::GetInstance()->RegisterIsolatedFileSystem(
+ files);
+ return UTF8ToUTF16(filesystemId);
+}
+
// Keyboard code
#if defined(TOOLKIT_USES_GTK)
int NativeKeyCodeForWindowsKeyCode(int keycode, bool shift) {
diff --git a/webkit/support/webkit_support.h b/webkit/support/webkit_support.h
index 1144d31..feaf0e4 100644
--- a/webkit/support/webkit_support.h
+++ b/webkit/support/webkit_support.h
@@ -12,6 +12,7 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsAgentClient.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebFileSystem.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebGraphicsContext3D.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h"
#include "ui/base/keycodes/keyboard_codes.h"
namespace WebKit {
@@ -215,6 +216,10 @@ WebKit::WebURL GetDevToolsPathAsURL();
void OpenFileSystem(WebKit::WebFrame* frame, WebKit::WebFileSystem::Type type,
long long size, bool create, WebKit::WebFileSystemCallbacks* callbacks);
+// Returns a filesystem ID for the newly created isolated filesystem.
+WebKit::WebString RegisterIsolatedFileSystem(
+ const WebKit::WebVector<WebKit::WebString>& filenames);
+
// -------- Keyboard code
enum {
VKEY_LEFT = ui::VKEY_LEFT,