diff options
| author | Ben Murdoch <benm@google.com> | 2010-05-18 12:40:50 +0100 |
|---|---|---|
| committer | Ben Murdoch <benm@google.com> | 2010-05-21 10:18:18 +0100 |
| commit | 7b52283c1a7f90ff5441d7bc30677c91af016b22 (patch) | |
| tree | d7f831bcec87066d040c8d876bada22365719ada /WebKit/android/WebCoreSupport | |
| parent | 92bec5fddeb29963e6b950dc26452b6976ff42e0 (diff) | |
| download | external_webkit-7b52283c1a7f90ff5441d7bc30677c91af016b22.zip external_webkit-7b52283c1a7f90ff5441d7bc30677c91af016b22.tar.gz external_webkit-7b52283c1a7f90ff5441d7bc30677c91af016b22.tar.bz2 | |
Add a method to the PlatformBridge to resolve the filename of a file
given its representation as a content:// URI, and the associated
JNI plumbing.
Requires a frameworks/base change.
Change-Id: I9b8b8bb3fbfa31c86f4212f91c140fe62c6c6682
Diffstat (limited to 'WebKit/android/WebCoreSupport')
| -rw-r--r-- | WebKit/android/WebCoreSupport/FileSystemClient.h | 41 | ||||
| -rw-r--r-- | WebKit/android/WebCoreSupport/PlatformBridge.cpp | 7 |
2 files changed, 48 insertions, 0 deletions
diff --git a/WebKit/android/WebCoreSupport/FileSystemClient.h b/WebKit/android/WebCoreSupport/FileSystemClient.h new file mode 100644 index 0000000..8847bda --- /dev/null +++ b/WebKit/android/WebCoreSupport/FileSystemClient.h @@ -0,0 +1,41 @@ +/* + * Copyright 2010, The Android Open Source Project + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef FILESYSTEM_CLIENT_H +#define FILESYSTEM_CLIENT_H + +#include "PlatformString.h" + +using namespace WebCore; + +namespace android { + +class FileSystemClient { +public: + virtual ~FileSystemClient() { } + virtual String resolveFileNameForContentUri(const String&) = 0; +}; +} +#endif diff --git a/WebKit/android/WebCoreSupport/PlatformBridge.cpp b/WebKit/android/WebCoreSupport/PlatformBridge.cpp index 13bbf38..c64bb9d 100644 --- a/WebKit/android/WebCoreSupport/PlatformBridge.cpp +++ b/WebKit/android/WebCoreSupport/PlatformBridge.cpp @@ -27,6 +27,7 @@ #include <PlatformBridge.h> #include "CookieClient.h" +#include "FileSystemClient.h" #include "FrameView.h" #include "JavaSharedClient.h" #include "KeyGeneratorClient.h" @@ -153,6 +154,12 @@ bool PlatformBridge::popupsAllowed(NPP) return false; } +String PlatformBridge::resolveFileNameForContentUri(const String& contentUri) +{ + FileSystemClient* client = JavaSharedClient::GetFileSystemClient(); + return client->resolveFileNameForContentUri(contentUri); +} + } // namespace WebCore |
