summaryrefslogtreecommitdiff
path: root/Source/WebKit/chromium/public/platform
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-05-11 09:43:24 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-05-11 09:43:24 +0200
commit1b914638db989aaa98631a1c1e02c7b2d44805d8 (patch)
tree87f4fd2c7b38db320079a5de8877890d2ca3c485 /Source/WebKit/chromium/public/platform
parent2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47 (diff)
downloadqtwebkit-1b914638db989aaa98631a1c1e02c7b2d44805d8.tar.gz
Imported WebKit commit 9a52e27980f47e8b0d8f8b7cc0fd7b5741bceb92 (http://svn.webkit.org/repository/webkit/trunk@116736)
New snapshot to include QDeclarative* -> QQml* build fixes
Diffstat (limited to 'Source/WebKit/chromium/public/platform')
-rw-r--r--Source/WebKit/chromium/public/platform/WebClipboard.h69
-rw-r--r--Source/WebKit/chromium/public/platform/WebDragData.h94
-rw-r--r--Source/WebKit/chromium/public/platform/WebFileSystem.h109
-rw-r--r--Source/WebKit/chromium/public/platform/WebImage.h97
-rw-r--r--Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h15
5 files changed, 4 insertions, 380 deletions
diff --git a/Source/WebKit/chromium/public/platform/WebClipboard.h b/Source/WebKit/chromium/public/platform/WebClipboard.h
index 503213952..5f8822336 100644
--- a/Source/WebKit/chromium/public/platform/WebClipboard.h
+++ b/Source/WebKit/chromium/public/platform/WebClipboard.h
@@ -28,71 +28,4 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebClipboard_h
-#define WebClipboard_h
-
-#include "WebCommon.h"
-#include "WebData.h"
-#include "WebString.h"
-#include "WebVector.h"
-
-namespace WebKit {
-
-class WebDragData;
-class WebImage;
-class WebURL;
-
-class WebClipboard {
-public:
- enum Format {
- FormatPlainText,
- FormatHTML,
- FormatBookmark,
- FormatSmartPaste
- };
-
- enum Buffer {
- BufferStandard,
- // Used on platforms like the X Window System that treat selection
- // as a type of clipboard.
- BufferSelection,
- };
-
- // Returns an identifier which can be used to determine whether the data
- // contained within the clipboard has changed.
- virtual uint64 sequenceNumber(Buffer) { return 0; }
-
- virtual bool isFormatAvailable(Format, Buffer) { return false; }
-
- virtual WebVector<WebString> readAvailableTypes(
- Buffer, bool* containsFilenames) { return WebVector<WebString>(); }
- virtual WebString readPlainText(Buffer) { return WebString(); }
- // fragmentStart and fragmentEnd are indexes into the returned markup that
- // indicate the start and end of the fragment if the returned markup
- // contains additional context. If there is no additional context,
- // fragmentStart will be zero and fragmentEnd will be the same as the length
- // of the returned markup.
- virtual WebString readHTML(
- Buffer buffer, WebURL* pageURL, unsigned* fragmentStart,
- unsigned* fragmentEnd) { return WebString(); }
- virtual WebData readImage(Buffer) { return WebData(); }
- virtual WebString readCustomData(
- Buffer, const WebString& type) { return WebString(); }
-
- virtual void writePlainText(const WebString&) { }
- virtual void writeHTML(
- const WebString& htmlText, const WebURL&,
- const WebString& plainText, bool writeSmartPaste) { }
- virtual void writeURL(
- const WebURL&, const WebString& title) { }
- virtual void writeImage(
- const WebImage&, const WebURL&, const WebString& title) { }
- virtual void writeDataObject(const WebDragData&) { }
-
-protected:
- ~WebClipboard() {}
-};
-
-} // namespace WebKit
-
-#endif
+#include "../../../../Platform/chromium/public/WebClipboard.h"
diff --git a/Source/WebKit/chromium/public/platform/WebDragData.h b/Source/WebKit/chromium/public/platform/WebDragData.h
index 9666fe4b1..80cada276 100644
--- a/Source/WebKit/chromium/public/platform/WebDragData.h
+++ b/Source/WebKit/chromium/public/platform/WebDragData.h
@@ -28,96 +28,4 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebDragData_h
-#define WebDragData_h
-
-#include "WebCommon.h"
-#include "WebData.h"
-#include "WebString.h"
-#include "WebURL.h"
-
-#if WEBKIT_IMPLEMENTATION
-namespace WebCore { class ChromiumDataObject; }
-namespace WTF { template <typename T> class PassRefPtr; }
-#endif
-
-namespace WebKit {
-
-class WebDragDataPrivate;
-template <typename T> class WebVector;
-
-// Holds data that may be exchanged through a drag-n-drop operation. It is
-// inexpensive to copy a WebDragData object.
-class WebDragData {
-public:
- struct Item {
- enum StorageType {
- // String data with an associated MIME type. Depending on the MIME type, there may be
- // optional metadata attributes as well.
- StorageTypeString,
- // Stores the name of one file being dragged into the renderer.
- StorageTypeFilename,
- // An image being dragged out of the renderer. Contains a buffer holding the image data
- // as well as the suggested name for saving the image to.
- StorageTypeBinaryData,
- };
-
- StorageType storageType;
-
- // Only valid when storageType == StorageTypeString.
- WebString stringType;
- WebString stringData;
-
- // Only valid when storageType == StorageTypeFilename.
- WebString filenameData;
- WebString displayNameData;
-
- // Only valid when storageType == StorageTypeBinaryData.
- WebData binaryData;
-
- // Title associated with a link when stringType == "text/uri-list".
- // Filename when storageType == StorageTypeBinaryData.
- WebString title;
-
- // Only valid when stringType == "text/html".
- WebURL baseURL;
- };
-
- ~WebDragData() { reset(); }
-
- WebDragData() : m_private(0) { }
- WebDragData(const WebDragData& d) : m_private(0) { assign(d); }
- WebDragData& operator=(const WebDragData& d)
- {
- assign(d);
- return *this;
- }
-
- WEBKIT_EXPORT void initialize();
- WEBKIT_EXPORT void reset();
- WEBKIT_EXPORT void assign(const WebDragData&);
-
- bool isNull() const { return !m_private; }
-
- WEBKIT_EXPORT WebVector<Item> items() const;
- WEBKIT_EXPORT void setItems(const WebVector<Item>&);
- WEBKIT_EXPORT void addItem(const Item&);
-
- WEBKIT_EXPORT WebString filesystemId() const;
- WEBKIT_EXPORT void setFilesystemId(const WebString&);
-
-#if WEBKIT_IMPLEMENTATION
- WebDragData(const WTF::PassRefPtr<WebCore::ChromiumDataObject>&);
- WebDragData& operator=(const WTF::PassRefPtr<WebCore::ChromiumDataObject>&);
- operator WTF::PassRefPtr<WebCore::ChromiumDataObject>() const;
-#endif
-
-private:
- void assign(WebDragDataPrivate*);
- void ensureMutable();
- WebDragDataPrivate* m_private;
-};
-
-} // namespace WebKit
-
-#endif
+#include "../../../../Platform/chromium/public/WebDragData.h"
diff --git a/Source/WebKit/chromium/public/platform/WebFileSystem.h b/Source/WebKit/chromium/public/platform/WebFileSystem.h
index 25afb49f0..ad651e77c 100644
--- a/Source/WebKit/chromium/public/platform/WebFileSystem.h
+++ b/Source/WebKit/chromium/public/platform/WebFileSystem.h
@@ -28,111 +28,4 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebFileSystem_h
-#define WebFileSystem_h
-
-#include "WebCommon.h"
-#include "WebURL.h"
-
-namespace WebKit {
-
-// FIXME: Move these classes into platform.
-class WebFileSystemCallbacks;
-class WebFileWriter;
-class WebFileWriterClient;
-
-class WebFileSystem {
-public:
- enum Type {
- TypeTemporary,
- TypePersistent,
-
- // Indicates an isolated filesystem which only exposes a set of files.
- TypeIsolated,
-
- // Indicates a non-sandboxed filesystem.
- TypeExternal,
- };
-
- // Moves a file or directory at |srcPath| to |destPath|.
- // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully.
- // WebFileSystemCallbacks::didFail() must be called otherwise.
- virtual void move(const WebURL& srcPath, const WebURL& destPath, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
-
- // Copies a file or directory at |srcPath| to |destPath|.
- // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully.
- // WebFileSystemCallbacks::didFail() must be called otherwise.
- virtual void copy(const WebURL& srcPath, const WebURL& destPath, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
-
- // Deletes a file or directory at a given |path|.
- // It is an error to try to remove a directory that is not empty.
- // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully.
- // WebFileSystemCallbacks::didFail() must be called otherwise.
- virtual void remove(const WebURL& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
-
- // Deletes a file or directory recursively at a given |path|.
- // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully.
- // WebFileSystemCallbacks::didFail() must be called otherwise.
- virtual void removeRecursively(const WebURL& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
-
- // Retrieves the metadata information of the file or directory at the given |path|.
- // This may not always return the local platform path in remote filesystem cases.
- // WebFileSystemCallbacks::didReadMetadata() must be called with a valid metadata when the retrieval is completed successfully.
- // WebFileSystemCallbacks::didFail() must be called otherwise.
- virtual void readMetadata(const WebURL& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
-
- // Creates a file at given |path|.
- // If the |path| doesn't exist, it creates a new file at |path|.
- // If |exclusive| is true, it fails if the |path| already exists.
- // If |exclusive| is false, it succeeds if the |path| already exists or
- // it has successfully created a new file at |path|.
- //
- // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully.
- // WebFileSystemCallbacks::didFail() must be called otherwise.
- virtual void createFile(const WebURL& path, bool exclusive, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
-
- // Creates a directory at a given |path|.
- // If the |path| doesn't exist, it creates a new directory at |path|.
- // If |exclusive| is true, it fails if the |path| already exists.
- // If |exclusive| is false, it succeeds if the |path| already exists or it has successfully created a new directory at |path|.
- //
- // WebFileSystemCallbacks::didSucceed() must be called when
- // the operation is completed successfully.
- // WebFileSystemCallbacks::didFail() must be called otherwise.
- virtual void createDirectory(const WebURL& path, bool exclusive, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
-
- // Checks if a file exists at a given |path|.
- // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully.
- // WebFileSystemCallbacks::didFail() must be called otherwise.
- virtual void fileExists(const WebURL& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
-
- // Checks if a directory exists at a given |path|.
- // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully.
- // WebFileSystemCallbacks::didFail() must be called otherwise.
- virtual void directoryExists(const WebURL& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
-
- // Reads directory entries of a given directory at |path|.
- // WebFileSystemCallbacks::didReadDirectory() must be called when the operation is completed successfully.
- // WebFileSystemCallbacks::didFail() must be called otherwise.
- virtual void readDirectory(const WebURL& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
-
- // Creates a WebFileWriter that can be used to write to the given file.
- // This is a fast, synchronous call, and should not stat the filesystem.
- virtual WebFileWriter* createFileWriter(const WebURL& path, WebFileWriterClient*) { WEBKIT_ASSERT_NOT_REACHED(); return 0; }
-
- // Creates a snapshot file for a given file specified by |path| and registers the file with the |blobURL|. It returns the metadata of the created snapshot file.
- // The returned metadata should include a local platform path to the snapshot image.
- // In local filesystem cases the backend may simply return the metadata of the file itself (as well as readMetadata does), while in remote filesystem case the backend may download the file into a temporary snapshot file and return the metadata of the temporary file.
- // The returned metadata is used to create a File object for the |path|.
- // The snapshot file is supposed to be deleted when the last reference to the |blobURL| is dropped.
- // WebFileSystemCallbacks::didReadMetadata() with the metadata of the snapshot file must be called when the operation is completed successfully.
- // WebFileSystemCallbacks::didFail() must be called otherwise.
- virtual void createSnapshotFileAndReadMetadata(const WebURL& blobURL, const WebURL& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
-
-protected:
- virtual ~WebFileSystem() { }
-};
-
-} // namespace WebKit
-
-#endif
+#include "../../../../Platform/chromium/public/WebFileSystem.h"
diff --git a/Source/WebKit/chromium/public/platform/WebImage.h b/Source/WebKit/chromium/public/platform/WebImage.h
index bf0e9722e..2593f6b3a 100644
--- a/Source/WebKit/chromium/public/platform/WebImage.h
+++ b/Source/WebKit/chromium/public/platform/WebImage.h
@@ -28,99 +28,4 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebImage_h
-#define WebImage_h
-
-#include "WebCommon.h"
-
-#if WEBKIT_USING_SKIA
-#include <SkBitmap.h>
-#elif WEBKIT_USING_CG
-typedef struct CGImage* CGImageRef;
-#endif
-
-#if WEBKIT_IMPLEMENTATION
-namespace WebCore { class Image; }
-namespace WTF { template <typename T> class PassRefPtr; }
-#endif
-
-namespace WebKit {
-
-class WebData;
-struct WebSize;
-
-// A container for an ARGB bitmap.
-class WebImage {
-public:
- ~WebImage() { reset(); }
-
- WebImage() { init(); }
- WebImage(const WebImage& image)
- {
- init();
- assign(image);
- }
-
- WebImage& operator=(const WebImage& image)
- {
- assign(image);
- return *this;
- }
-
- // Decodes the given image data. If the image has multiple frames,
- // then the frame whose size is desiredSize is returned. Otherwise,
- // the first frame is returned.
- WEBKIT_EXPORT static WebImage fromData(const WebData&, const WebSize& desiredSize);
-
- WEBKIT_EXPORT void reset();
- WEBKIT_EXPORT void assign(const WebImage&);
-
- WEBKIT_EXPORT bool isNull() const;
- WEBKIT_EXPORT WebSize size() const;
-
-#if WEBKIT_IMPLEMENTATION
- WebImage(const WTF::PassRefPtr<WebCore::Image>&);
- WebImage& operator=(const WTF::PassRefPtr<WebCore::Image>&);
-#endif
-
-#if WEBKIT_USING_SKIA
- WebImage(const SkBitmap& bitmap) : m_bitmap(bitmap) { }
-
- WebImage& operator=(const SkBitmap& bitmap)
- {
- m_bitmap = bitmap;
- return *this;
- }
-
- SkBitmap& getSkBitmap() { return m_bitmap; }
- const SkBitmap& getSkBitmap() const { return m_bitmap; }
-
-private:
- void init() { }
- SkBitmap m_bitmap;
-
-#elif WEBKIT_USING_CG
- WebImage(CGImageRef imageRef)
- {
- init();
- assign(imageRef);
- }
-
- WebImage& operator=(CGImageRef imageRef)
- {
- assign(imageRef);
- return *this;
- }
-
- CGImageRef getCGImageRef() const { return m_imageRef; }
-
-private:
- void init() { m_imageRef = 0; }
- WEBKIT_EXPORT void assign(CGImageRef);
- CGImageRef m_imageRef;
-#endif
-};
-
-} // namespace WebKit
-
-#endif
+#include "../../../../Platform/chromium/public/WebImage.h"
diff --git a/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h b/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h
index ca3762dcb..cc5571ea6 100644
--- a/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h
+++ b/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h
@@ -51,9 +51,7 @@ namespace WebKit {
class WebApplicationCacheHost; // FIXME: Does this belong in platform?
class WebApplicationCacheHostClient; // FIXME: Does this belong in platform?
class WebBlobRegistry;
-class WebClipboard;
class WebCookieJar;
-class WebFileSystem;
class WebFileUtilities;
class WebIDBFactory; // FIXME: Does this belong in platform?
class WebIDBKey; // FIXME: Does this belong in platform?
@@ -69,9 +67,6 @@ class WebWorkerRunLoop;
class WebKitPlatformSupport : public Platform {
public:
// Must return non-null.
- virtual WebClipboard* clipboard() { return 0; }
-
- // Must return non-null.
virtual WebFileUtilities* fileUtilities() { return 0; }
// May return null if sandbox support is not necessary
@@ -93,11 +88,6 @@ public:
// Return a LocalStorage namespace that corresponds to the following path.
virtual WebStorageNamespace* createLocalStorageNamespace(const WebString& path, unsigned quota) { return 0; }
- // DEPRECATED
- virtual void dispatchStorageEvent(const WebString& key, const WebString& oldValue,
- const WebString& newValue, const WebString& origin,
- const WebURL& url, bool isLocalStorage) { }
-
// HTML5 Database ------------------------------------------------------
@@ -177,11 +167,6 @@ public:
virtual bool canAccelerate2dCanvas() { return false; }
- // FileSystem ----------------------------------------------------------
-
- // Must return non-null.
- virtual WebFileSystem* fileSystem() { return 0; }
-
// WebWorker ----------------------------------------------------------
virtual void didStartWorkerRunLoop(const WebWorkerRunLoop&) { }