summaryrefslogtreecommitdiff
path: root/Source/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/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/Platform')
-rw-r--r--Source/Platform/ChangeLog155
-rw-r--r--Source/Platform/Platform.gypi4
-rw-r--r--Source/Platform/chromium/public/Platform.h10
-rw-r--r--Source/Platform/chromium/public/WebCanvas.h10
-rw-r--r--Source/Platform/chromium/public/WebClipboard.h98
-rw-r--r--Source/Platform/chromium/public/WebDragData.h123
-rw-r--r--Source/Platform/chromium/public/WebFileSystem.h138
-rw-r--r--Source/Platform/chromium/public/WebGraphicsContext3D.h6
-rw-r--r--Source/Platform/chromium/public/WebImage.h101
-rw-r--r--Source/Platform/chromium/public/WebMediaStreamCenter.h10
-rw-r--r--Source/Platform/chromium/public/WebMediaStreamDescriptor.h12
11 files changed, 647 insertions, 20 deletions
diff --git a/Source/Platform/ChangeLog b/Source/Platform/ChangeLog
index bb21c9c86..627c7e0ff 100644
--- a/Source/Platform/ChangeLog
+++ b/Source/Platform/ChangeLog
@@ -1,3 +1,158 @@
+2012-05-10 Mark Pilgrim <pilgrim@chromium.org>
+
+ [Chromium] Remove WEBKIT_USING_SKIA ifdefs that are always true
+ https://bugs.webkit.org/show_bug.cgi?id=86121
+
+ Reviewed by Adam Barth.
+
+ Chromium always uses Skia now, so this just removes the barriers
+ around code that was previously #if'd.
+
+ * chromium/public/WebCanvas.h:
+ (WebKit):
+ * chromium/public/WebGraphicsContext3D.h:
+ (WebGraphicsContext3D):
+ (WebKit::WebGraphicsContext3D::onCreateGrGLInterface):
+ * chromium/public/WebImage.h:
+ (WebImage):
+
+2012-05-10 Mark Pilgrim <pilgrim@chromium.org>
+
+ [Chromium] Remove dead code behind unused WEBKIT_USING_CG
+ https://bugs.webkit.org/show_bug.cgi?id=86018
+
+ Reviewed by Adam Barth.
+
+ We never use CoreGraphics as the backend for GraphicsContext in
+ Chromium, so this is all dead code.
+
+ * chromium/public/WebCanvas.h:
+ (WebKit):
+ * chromium/public/WebImage.h:
+ (WebImage):
+
+2012-05-09 Mark Pilgrim <pilgrim@chromium.org>
+
+ [Chromium] Move clipboard to Platform.h
+ https://bugs.webkit.org/show_bug.cgi?id=85758
+
+ Reviewed by Adam Barth.
+
+ Part of a refactoring series. See tracking bug 82948.
+
+ * Platform.gypi:
+ * chromium/public/Platform.h:
+ (WebKit):
+ (Platform):
+ (WebKit::Platform::clipboard):
+ * chromium/public/WebClipboard.h: Added.
+ (WebKit):
+ (WebClipboard):
+ (WebKit::WebClipboard::sequenceNumber):
+ (WebKit::WebClipboard::isFormatAvailable):
+ (WebKit::WebClipboard::readAvailableTypes):
+ (WebKit::WebClipboard::readPlainText):
+ (WebKit::WebClipboard::readHTML):
+ (WebKit::WebClipboard::readImage):
+ (WebKit::WebClipboard::readCustomData):
+ (WebKit::WebClipboard::writePlainText):
+ (WebKit::WebClipboard::writeHTML):
+ (WebKit::WebClipboard::writeURL):
+ (WebKit::WebClipboard::writeImage):
+ (WebKit::WebClipboard::writeDataObject):
+ (WebKit::WebClipboard::~WebClipboard):
+ * chromium/public/WebDragData.h: Added.
+ (WebKit):
+ (WebDragData):
+ (WebKit::WebDragData::~WebDragData):
+ (WebKit::WebDragData::WebDragData):
+ (WebKit::WebDragData::operator=):
+ (WebKit::WebDragData::isNull):
+ * chromium/public/WebImage.h: Added.
+ (WebKit):
+ (WebImage):
+ (WebKit::WebImage::~WebImage):
+ (WebKit::WebImage::WebImage):
+ (WebKit::WebImage::operator=):
+ (WebKit::WebImage::getSkBitmap):
+ (WebKit::WebImage::init):
+ (WebKit::WebImage::getCGImageRef):
+
+2012-05-09 Tommy Widenflycht <tommyw@google.com>
+
+ MediaStream API: Adding the possibility of port specific information in MediaStreamDescriptor
+ https://bugs.webkit.org/show_bug.cgi?id=85794
+
+ Reviewed by Adam Barth.
+
+ To facilitate for ports I have added an ExtraData field that can be used for whatever purpose is needed.
+
+ * chromium/public/WebMediaStreamDescriptor.h:
+ (ExtraData):
+ (WebKit::WebMediaStreamDescriptor::ExtraData::~ExtraData):
+ (WebMediaStreamDescriptor):
+
+2012-05-07 Mark Pilgrim <pilgrim@chromium.org>
+
+ [Chromium] Move fileSystem to Platform.h
+ https://bugs.webkit.org/show_bug.cgi?id=85760
+
+ Reviewed by Adam Barth.
+
+ Part of a refactoring series. See tracking bug 82948.
+
+ * Platform.gypi:
+ * chromium/public/Platform.h:
+ (WebKit):
+ (Platform):
+ (WebKit::Platform::fileSystem):
+ * chromium/public/WebFileSystem.h: Added.
+ (WebKit):
+ (WebFileSystem):
+ (WebKit::WebFileSystem::move):
+ (WebKit::WebFileSystem::copy):
+ (WebKit::WebFileSystem::remove):
+ (WebKit::WebFileSystem::removeRecursively):
+ (WebKit::WebFileSystem::readMetadata):
+ (WebKit::WebFileSystem::createFile):
+ (WebKit::WebFileSystem::createDirectory):
+ (WebKit::WebFileSystem::fileExists):
+ (WebKit::WebFileSystem::directoryExists):
+ (WebKit::WebFileSystem::readDirectory):
+ (WebKit::WebFileSystem::createFileWriter):
+ (WebKit::WebFileSystem::createSnapshotFileAndReadMetadata):
+ (WebKit::WebFileSystem::~WebFileSystem):
+
+2012-05-07 Tommy Widenflycht <tommyw@google.com>
+
+ MediaStream API: Rename MediaStreamCenter::didConstructMediaStream
+ https://bugs.webkit.org/show_bug.cgi?id=85796
+
+ Reviewed by Adam Barth.
+
+ Renamed WebMediaStreamCenter::didConstructMediaStream to didCreateMediaStream,
+ and change so that it is only called for MediaStreams created from JS.
+ Also send out the WebMediaStreamDescriptor non-const instead.
+
+ * chromium/public/WebMediaStreamCenter.h:
+ (WebKit::WebMediaStreamCenter::didCreateMediaStream):
+ (WebMediaStreamCenter):
+ (WebKit::WebMediaStreamCenter::didConstructMediaStream):
+
+2012-05-07 Tommy Widenflycht <tommyw@google.com>
+
+ MediaStream API: Allow UserMediaRequest::succeed to take an MediaStreamDescriptor
+ https://bugs.webkit.org/show_bug.cgi?id=85798
+
+ Reviewed by Adam Barth.
+
+ Adding another UserMediaRequest::succeed function that takes an MediaStreamDescriptor
+ instead of the two MediaStreamSource arrays.
+
+ * chromium/public/WebMediaStreamCenter.h:
+ (WebMediaStreamCenter):
+ (WebKit::WebMediaStreamCenter::constructSDP):
+
2012-05-04 Tommy Widenflycht <tommyw@google.com>
MediaStream API: Make PeerConnection00's API fully compliant with the draft
diff --git a/Source/Platform/Platform.gypi b/Source/Platform/Platform.gypi
index be897c216..9a8278acb 100644
--- a/Source/Platform/Platform.gypi
+++ b/Source/Platform/Platform.gypi
@@ -36,12 +36,15 @@
'chromium/public/WebAudioDevice.h',
'chromium/public/WebCString.h',
'chromium/public/WebCanvas.h',
+ 'chromium/public/WebClipboard.h',
'chromium/public/WebColor.h',
'chromium/public/WebCommon.h',
'chromium/public/WebContentLayer.h',
'chromium/public/WebContentLayerClient.h',
'chromium/public/WebData.h',
+ 'chromium/public/WebDragData.h',
'chromium/public/WebExternalTextureLayer.h',
+ 'chromium/public/WebFileSystem.h',
'chromium/public/WebFilterOperation.h',
'chromium/public/WebFilterOperations.h',
'chromium/public/WebFloatPoint.h',
@@ -55,6 +58,7 @@
'chromium/public/WebHTTPLoadInfo.h',
'chromium/public/WebICECandidateDescriptor.h',
'chromium/public/WebICEOptions.h',
+ 'chromium/public/WebImage.h',
'chromium/public/WebIOSurfaceLayer.h',
'chromium/public/WebLayer.h',
'chromium/public/WebLayerTreeView.h',
diff --git a/Source/Platform/chromium/public/Platform.h b/Source/Platform/chromium/public/Platform.h
index abf3d0901..6e5861b20 100644
--- a/Source/Platform/chromium/public/Platform.h
+++ b/Source/Platform/chromium/public/Platform.h
@@ -40,6 +40,8 @@
namespace WebKit {
class WebAudioBus;
+class WebClipboard;
+class WebFileSystem;
class WebMediaStreamCenter;
class WebMediaStreamCenterClient;
class WebMimeRegistry;
@@ -59,6 +61,9 @@ public:
WEBKIT_EXPORT static Platform* current();
// Must return non-null.
+ virtual WebClipboard* clipboard() { return 0; }
+
+ // Must return non-null.
virtual WebMimeRegistry* mimeRegistry() { return 0; }
@@ -69,6 +74,11 @@ public:
virtual WebAudioDevice* createAudioDevice(size_t bufferSize, unsigned numberOfChannels, double sampleRate, WebAudioDevice::RenderCallback*) { return 0; }
+ // FileSystem ----------------------------------------------------------
+
+ // Must return non-null.
+ virtual WebFileSystem* fileSystem() { return 0; }
+
// Gamepad -------------------------------------------------------------
virtual void sampleGamepads(WebGamepads& into) { into.length = 0; }
diff --git a/Source/Platform/chromium/public/WebCanvas.h b/Source/Platform/chromium/public/WebCanvas.h
index 4cf729ee1..aca38e0c4 100644
--- a/Source/Platform/chromium/public/WebCanvas.h
+++ b/Source/Platform/chromium/public/WebCanvas.h
@@ -33,21 +33,11 @@
#include "WebCommon.h"
-#if WEBKIT_USING_SKIA
class SkCanvas;
-#elif WEBKIT_USING_CG
-struct CGContext;
-#endif
namespace WebKit {
-#if WEBKIT_USING_SKIA
typedef SkCanvas WebCanvas;
-#elif WEBKIT_USING_CG
-typedef struct CGContext WebCanvas;
-#else
-#error "Need to define WebCanvas"
-#endif
} // namespace WebKit
diff --git a/Source/Platform/chromium/public/WebClipboard.h b/Source/Platform/chromium/public/WebClipboard.h
new file mode 100644
index 000000000..eb208237e
--- /dev/null
+++ b/Source/Platform/chromium/public/WebClipboard.h
@@ -0,0 +1,98 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * 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.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "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 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
diff --git a/Source/Platform/chromium/public/WebDragData.h b/Source/Platform/chromium/public/WebDragData.h
new file mode 100644
index 000000000..edd3df831
--- /dev/null
+++ b/Source/Platform/chromium/public/WebDragData.h
@@ -0,0 +1,123 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * 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.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "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 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
diff --git a/Source/Platform/chromium/public/WebFileSystem.h b/Source/Platform/chromium/public/WebFileSystem.h
new file mode 100644
index 000000000..25afb49f0
--- /dev/null
+++ b/Source/Platform/chromium/public/WebFileSystem.h
@@ -0,0 +1,138 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * 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.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "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 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
diff --git a/Source/Platform/chromium/public/WebGraphicsContext3D.h b/Source/Platform/chromium/public/WebGraphicsContext3D.h
index 371e8f44b..0e40f5faa 100644
--- a/Source/Platform/chromium/public/WebGraphicsContext3D.h
+++ b/Source/Platform/chromium/public/WebGraphicsContext3D.h
@@ -38,9 +38,7 @@
#define USE_WGC3D_TYPES
-#if WEBKIT_USING_SKIA
struct GrGLInterface;
-#endif
namespace WebKit {
@@ -413,14 +411,10 @@ public:
virtual void getQueryivEXT(WGC3Denum target, WGC3Denum pname, WGC3Dint* params) { }
virtual void getQueryObjectuivEXT(WebGLId query, WGC3Denum pname, WGC3Duint* params) { }
-#if WEBKIT_USING_SKIA
GrGLInterface* createGrGLInterface();
-#endif
protected:
-#if WEBKIT_USING_SKIA
virtual GrGLInterface* onCreateGrGLInterface() { return 0; }
-#endif
};
diff --git a/Source/Platform/chromium/public/WebImage.h b/Source/Platform/chromium/public/WebImage.h
new file mode 100644
index 000000000..29bef1c34
--- /dev/null
+++ b/Source/Platform/chromium/public/WebImage.h
@@ -0,0 +1,101 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * 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.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "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 WebImage_h
+#define WebImage_h
+
+#include "WebCommon.h"
+
+#include <SkBitmap.h>
+
+#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
+
+ 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;
+
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/Source/Platform/chromium/public/WebMediaStreamCenter.h b/Source/Platform/chromium/public/WebMediaStreamCenter.h
index 38827c833..fdef7b894 100644
--- a/Source/Platform/chromium/public/WebMediaStreamCenter.h
+++ b/Source/Platform/chromium/public/WebMediaStreamCenter.h
@@ -48,11 +48,13 @@ public:
virtual void didEnableMediaStreamTrack(const WebMediaStreamDescriptor&, const WebMediaStreamComponent&) = 0;
virtual void didDisableMediaStreamTrack(const WebMediaStreamDescriptor&, const WebMediaStreamComponent&) = 0;
virtual void didStopLocalMediaStream(const WebMediaStreamDescriptor&) = 0;
- virtual void didConstructMediaStream(const WebMediaStreamDescriptor&) = 0;
+ virtual void didCreateMediaStream(WebMediaStreamDescriptor&) { }
- // FIXME: Make pure virtual after implementation.
- virtual WebString constructSDP(const WebICECandidateDescriptor&) { return WebString(); }
- virtual WebString constructSDP(const WebSessionDescriptionDescriptor&) { return WebString(); }
+ // DEPRECATED
+ virtual void didConstructMediaStream(const WebMediaStreamDescriptor&) { }
+
+ virtual WebString constructSDP(const WebICECandidateDescriptor&) = 0;
+ virtual WebString constructSDP(const WebSessionDescriptionDescriptor&) = 0;
};
} // namespace WebKit
diff --git a/Source/Platform/chromium/public/WebMediaStreamDescriptor.h b/Source/Platform/chromium/public/WebMediaStreamDescriptor.h
index 4923c97b5..c25f42e1b 100644
--- a/Source/Platform/chromium/public/WebMediaStreamDescriptor.h
+++ b/Source/Platform/chromium/public/WebMediaStreamDescriptor.h
@@ -42,6 +42,11 @@ class WebString;
class WebMediaStreamDescriptor {
public:
+ class ExtraData {
+ public:
+ virtual ~ExtraData() { }
+ };
+
WebMediaStreamDescriptor() { }
WebMediaStreamDescriptor(const WebMediaStreamDescriptor& other) { assign(other); }
~WebMediaStreamDescriptor() { reset(); }
@@ -69,6 +74,13 @@ public:
WEBKIT_EXPORT void audioSources(WebVector<WebMediaStreamComponent>&) const;
WEBKIT_EXPORT void videoSources(WebVector<WebMediaStreamComponent>&) const;
+ // Extra data associated with this WebMediaStreamDescriptor.
+ // If non-null, the extra data pointer will be deleted when the object is destroyed.
+ // Setting the extra data pointer will cause any existing non-null
+ // extra data pointer to be deleted.
+ WEBKIT_EXPORT ExtraData* extraData() const;
+ WEBKIT_EXPORT void setExtraData(ExtraData*);
+
#if WEBKIT_IMPLEMENTATION
WebMediaStreamDescriptor(WebCore::MediaStreamDescriptor*);
WebMediaStreamDescriptor(const WTF::PassRefPtr<WebCore::MediaStreamDescriptor>&);