Diff
Modified: trunk/Source/Platform/ChangeLog (116565 => 116566)
--- trunk/Source/Platform/ChangeLog 2012-05-09 22:50:42 UTC (rev 116565)
+++ trunk/Source/Platform/ChangeLog 2012-05-09 22:50:48 UTC (rev 116566)
@@ -1,3 +1,50 @@
+2012-05-09 Mark Pilgrim <pilg...@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 <tom...@google.com>
MediaStream API: Adding the possibility of port specific information in MediaStreamDescriptor
Modified: trunk/Source/Platform/Platform.gypi (116565 => 116566)
--- trunk/Source/Platform/Platform.gypi 2012-05-09 22:50:42 UTC (rev 116565)
+++ trunk/Source/Platform/Platform.gypi 2012-05-09 22:50:48 UTC (rev 116566)
@@ -36,11 +36,13 @@
'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',
@@ -56,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',
Modified: trunk/Source/Platform/chromium/public/Platform.h (116565 => 116566)
--- trunk/Source/Platform/chromium/public/Platform.h 2012-05-09 22:50:42 UTC (rev 116565)
+++ trunk/Source/Platform/chromium/public/Platform.h 2012-05-09 22:50:48 UTC (rev 116566)
@@ -40,6 +40,7 @@
namespace WebKit {
class WebAudioBus;
+class WebClipboard;
class WebFileSystem;
class WebMediaStreamCenter;
class WebMediaStreamCenterClient;
@@ -60,6 +61,9 @@
WEBKIT_EXPORT static Platform* current();
// Must return non-null.
+ virtual WebClipboard* clipboard() { return 0; }
+
+ // Must return non-null.
virtual WebMimeRegistry* mimeRegistry() { return 0; }
Copied: trunk/Source/Platform/chromium/public/WebClipboard.h (from rev 116564, trunk/Source/WebKit/chromium/public/platform/WebClipboard.h) (0 => 116566)
--- trunk/Source/Platform/chromium/public/WebClipboard.h (rev 0)
+++ trunk/Source/Platform/chromium/public/WebClipboard.h 2012-05-09 22:50:48 UTC (rev 116566)
@@ -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
Copied: trunk/Source/Platform/chromium/public/WebDragData.h (from rev 116564, trunk/Source/WebKit/chromium/public/platform/WebDragData.h) (0 => 116566)
--- trunk/Source/Platform/chromium/public/WebDragData.h (rev 0)
+++ trunk/Source/Platform/chromium/public/WebDragData.h 2012-05-09 22:50:48 UTC (rev 116566)
@@ -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
Copied: trunk/Source/Platform/chromium/public/WebImage.h (from rev 116564, trunk/Source/WebKit/chromium/public/platform/WebImage.h) (0 => 116566)
--- trunk/Source/Platform/chromium/public/WebImage.h (rev 0)
+++ trunk/Source/Platform/chromium/public/WebImage.h 2012-05-09 22:50:48 UTC (rev 116566)
@@ -0,0 +1,126 @@
+/*
+ * 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"
+
+#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
Modified: trunk/Source/WebKit/chromium/ChangeLog (116565 => 116566)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-05-09 22:50:42 UTC (rev 116565)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-05-09 22:50:48 UTC (rev 116566)
@@ -1,5 +1,32 @@
2012-05-09 Mark Pilgrim <pilg...@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.
+
+ * WebKit.gyp:
+ * public/platform/WebClipboard.h:
+ * public/platform/WebDragData.h:
+ * public/platform/WebImage.h:
+ * public/platform/WebKitPlatformSupport.h:
+ (WebKit):
+ (WebKitPlatformSupport):
+ * src/AssertMatchingEnums.cpp:
+ * src/DragClientImpl.cpp:
+ * src/PlatformSupport.cpp:
+ * src/WebDragData.cpp:
+ * src/WebImageCG.cpp:
+ * src/WebImageDecoder.cpp:
+ * src/WebImageSkia.cpp:
+ * src/WebPluginContainerImpl.cpp:
+ (WebKit::WebPluginContainerImpl::copy):
+ * src/WebViewImpl.cpp:
+
+2012-05-09 Mark Pilgrim <pilg...@chromium.org>
+
[Chromium] Remove PlatformSupport::loadPlatformImageResource, call loadResource directly
https://bugs.webkit.org/show_bug.cgi?id=84417
Modified: trunk/Source/WebKit/chromium/WebKit.gyp (116565 => 116566)
--- trunk/Source/WebKit/chromium/WebKit.gyp 2012-05-09 22:50:42 UTC (rev 116565)
+++ trunk/Source/WebKit/chromium/WebKit.gyp 2012-05-09 22:50:48 UTC (rev 116566)
@@ -299,7 +299,6 @@
'public/platform/WebBlobData.h',
'public/platform/WebBlobRegistry.h',
'public/platform/WebCanvas.h',
- 'public/platform/WebClipboard.h',
'public/platform/WebColor.h',
'public/platform/WebCommon.h',
'public/platform/WebContentLayer.h',
@@ -307,7 +306,6 @@
'public/platform/WebCookie.h',
'public/platform/WebCookieJar.h',
'public/platform/WebData.h',
- 'public/platform/WebDragData.h',
'public/platform/WebExternalTextureLayer.h',
'public/platform/WebFloatPoint.h',
'public/platform/WebFloatQuad.h',
@@ -318,7 +316,6 @@
'public/platform/WebHTTPBody.h',
'public/platform/WebHTTPHeaderVisitor.h',
'public/platform/WebHTTPLoadInfo.h',
- 'public/platform/WebImage.h',
'public/platform/WebKitPlatformSupport.h',
'public/platform/WebLayer.h',
'public/platform/WebLayerTreeView.h',
Modified: trunk/Source/WebKit/chromium/public/platform/WebClipboard.h (116565 => 116566)
--- trunk/Source/WebKit/chromium/public/platform/WebClipboard.h 2012-05-09 22:50:42 UTC (rev 116565)
+++ trunk/Source/WebKit/chromium/public/platform/WebClipboard.h 2012-05-09 22:50:48 UTC (rev 116566)
@@ -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"
Modified: trunk/Source/WebKit/chromium/public/platform/WebDragData.h (116565 => 116566)
--- trunk/Source/WebKit/chromium/public/platform/WebDragData.h 2012-05-09 22:50:42 UTC (rev 116565)
+++ trunk/Source/WebKit/chromium/public/platform/WebDragData.h 2012-05-09 22:50:48 UTC (rev 116566)
@@ -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"
Modified: trunk/Source/WebKit/chromium/public/platform/WebImage.h (116565 => 116566)
--- trunk/Source/WebKit/chromium/public/platform/WebImage.h 2012-05-09 22:50:42 UTC (rev 116565)
+++ trunk/Source/WebKit/chromium/public/platform/WebImage.h 2012-05-09 22:50:48 UTC (rev 116566)
@@ -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"
Modified: trunk/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h (116565 => 116566)
--- trunk/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h 2012-05-09 22:50:42 UTC (rev 116565)
+++ trunk/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h 2012-05-09 22:50:48 UTC (rev 116566)
@@ -51,7 +51,6 @@
class WebApplicationCacheHost; // FIXME: Does this belong in platform?
class WebApplicationCacheHostClient; // FIXME: Does this belong in platform?
class WebBlobRegistry;
-class WebClipboard;
class WebCookieJar;
class WebFileUtilities;
class WebIDBFactory; // FIXME: Does this belong in platform?
@@ -68,9 +67,6 @@
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
Modified: trunk/Source/WebKit/chromium/src/AssertMatchingEnums.cpp (116565 => 116566)
--- trunk/Source/WebKit/chromium/src/AssertMatchingEnums.cpp 2012-05-09 22:50:42 UTC (rev 116565)
+++ trunk/Source/WebKit/chromium/src/AssertMatchingEnums.cpp 2012-05-09 22:50:48 UTC (rev 116566)
@@ -99,11 +99,11 @@
#include "WebTextCheckingResult.h"
#include "WebTextCheckingType.h"
#include "WebView.h"
-#include "platform/WebClipboard.h"
#include "platform/WebICEOptions.h"
#include "platform/WebMediaStreamSource.h"
#include "platform/WebPeerConnection00Handler.h"
#include "platform/WebPeerConnection00HandlerClient.h"
+#include <public/WebClipboard.h>
#include <public/WebFileSystem.h>
#include <public/WebFilterOperation.h>
#include <public/WebReferrerPolicy.h>
Modified: trunk/Source/WebKit/chromium/src/DragClientImpl.cpp (116565 => 116566)
--- trunk/Source/WebKit/chromium/src/DragClientImpl.cpp 2012-05-09 22:50:42 UTC (rev 116565)
+++ trunk/Source/WebKit/chromium/src/DragClientImpl.cpp 2012-05-09 22:50:48 UTC (rev 116566)
@@ -36,11 +36,12 @@
#include "Frame.h"
#include "NativeImageSkia.h"
#include "platform/WebCommon.h"
-#include "platform/WebDragData.h"
#include "platform/WebImage.h"
#include "WebViewClient.h"
#include "WebViewImpl.h"
+#include <public/WebDragData.h>
+
using namespace WebCore;
namespace WebKit {
Modified: trunk/Source/WebKit/chromium/src/PlatformSupport.cpp (116565 => 116566)
--- trunk/Source/WebKit/chromium/src/PlatformSupport.cpp 2012-05-09 22:50:42 UTC (rev 116565)
+++ trunk/Source/WebKit/chromium/src/PlatformSupport.cpp 2012-05-09 22:50:48 UTC (rev 116566)
@@ -50,7 +50,6 @@
#include "WebWorkerClientImpl.h"
#include "WebWorkerRunLoop.h"
#include "platform/WebAudioBus.h"
-#include "platform/WebClipboard.h"
#include "platform/WebCookie.h"
#include "platform/WebCookieJar.h"
#include "platform/WebData.h"
@@ -101,6 +100,7 @@
#include "Worker.h"
#include "WorkerContextProxy.h"
+#include <public/WebClipboard.h>
#include <public/WebMimeRegistry.h>
#include <wtf/Assertions.h>
Modified: trunk/Source/WebKit/chromium/src/WebDragData.cpp (116565 => 116566)
--- trunk/Source/WebKit/chromium/src/WebDragData.cpp 2012-05-09 22:50:42 UTC (rev 116565)
+++ trunk/Source/WebKit/chromium/src/WebDragData.cpp 2012-05-09 22:50:48 UTC (rev 116566)
@@ -29,7 +29,6 @@
*/
#include "config.h"
-#include "platform/WebDragData.h"
#include "ChromiumDataObject.h"
#include "ClipboardMimeTypes.h"
@@ -40,6 +39,7 @@
#include "platform/WebURL.h"
#include "platform/WebVector.h"
+#include <public/WebDragData.h>
#include <wtf/HashMap.h>
#include <wtf/PassRefPtr.h>
Modified: trunk/Source/WebKit/chromium/src/WebImageCG.cpp (116565 => 116566)
--- trunk/Source/WebKit/chromium/src/WebImageCG.cpp 2012-05-09 22:50:42 UTC (rev 116565)
+++ trunk/Source/WebKit/chromium/src/WebImageCG.cpp 2012-05-09 22:50:48 UTC (rev 116566)
@@ -29,7 +29,6 @@
*/
#include "config.h"
-#include "platform/WebImage.h"
#include "Image.h"
#include "ImageSource.h"
@@ -40,6 +39,7 @@
#include <CoreGraphics/CGImage.h>
+#include <public/WebImage.h>
#include <wtf/PassRefPtr.h>
#include <wtf/RetainPtr.h>
Modified: trunk/Source/WebKit/chromium/src/WebImageDecoder.cpp (116565 => 116566)
--- trunk/Source/WebKit/chromium/src/WebImageDecoder.cpp 2012-05-09 22:50:42 UTC (rev 116565)
+++ trunk/Source/WebKit/chromium/src/WebImageDecoder.cpp 2012-05-09 22:50:48 UTC (rev 116566)
@@ -35,9 +35,10 @@
#include "ICOImageDecoder.h"
#include "SharedBuffer.h"
#include "platform/WebData.h"
-#include "platform/WebImage.h"
#include "platform/WebSize.h"
+#include <public/WebImage.h>
+
#if WEBKIT_USING_SKIA
#include <wtf/OwnPtr.h>
#include <wtf/PassOwnPtr.h>
Modified: trunk/Source/WebKit/chromium/src/WebImageSkia.cpp (116565 => 116566)
--- trunk/Source/WebKit/chromium/src/WebImageSkia.cpp 2012-05-09 22:50:42 UTC (rev 116565)
+++ trunk/Source/WebKit/chromium/src/WebImageSkia.cpp 2012-05-09 22:50:48 UTC (rev 116566)
@@ -29,7 +29,6 @@
*/
#include "config.h"
-#include "platform/WebImage.h"
#include "Image.h"
#include "ImageSource.h"
@@ -39,6 +38,7 @@
#include "platform/WebData.h"
#include "platform/WebSize.h"
+#include <public/WebImage.h>
#include <wtf/OwnPtr.h>
#include <wtf/PassOwnPtr.h>
#include <wtf/PassRefPtr.h>
Modified: trunk/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp (116565 => 116566)
--- trunk/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp 2012-05-09 22:50:42 UTC (rev 116565)
+++ trunk/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp 2012-05-09 22:50:48 UTC (rev 116566)
@@ -34,14 +34,12 @@
#include "Chrome.h"
#include "ChromeClientImpl.h"
#include "ScrollbarGroup.h"
-#include "platform/WebClipboard.h"
#include "WebCursorInfo.h"
#include "WebDataSourceImpl.h"
#include "WebElement.h"
#include "WebInputEvent.h"
#include "WebInputEventConversion.h"
#include "WebKit.h"
-#include "platform/WebKitPlatformSupport.h"
#include "WebPlugin.h"
#include "platform/WebRect.h"
#include "platform/WebString.h"
@@ -75,6 +73,8 @@
#include "ScrollbarTheme.h"
#include "UserGestureIndicator.h"
#include "WheelEvent.h"
+#include <public/Platform.h>
+#include <public/WebClipboard.h>
#if ENABLE(GESTURE_EVENTS)
#include "PlatformGestureEvent.h"
@@ -279,7 +279,7 @@
if (!m_webPlugin->hasSelection())
return;
- webKitPlatformSupport()->clipboard()->writeHTML(m_webPlugin->selectionAsMarkup(), WebURL(), m_webPlugin->selectionAsText(), false);
+ WebKit::Platform::current()->clipboard()->writeHTML(m_webPlugin->selectionAsMarkup(), WebURL(), m_webPlugin->selectionAsText(), false);
}
WebElement WebPluginContainerImpl::element()
Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.cpp (116565 => 116566)
--- trunk/Source/WebKit/chromium/src/WebViewImpl.cpp 2012-05-09 22:50:42 UTC (rev 116565)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.cpp 2012-05-09 22:50:48 UTC (rev 116566)
@@ -143,14 +143,14 @@
#include "WheelEvent.h"
#include "cc/CCProxy.h"
#include "painting/GraphicsContextBuilder.h"
-#include "platform/WebDragData.h"
-#include "platform/WebImage.h"
#include "platform/WebKitPlatformSupport.h"
#include "platform/WebString.h"
#include "platform/WebVector.h"
#include <public/Platform.h>
+#include <public/WebDragData.h>
#include <public/WebFloatPoint.h>
#include <public/WebGraphicsContext3D.h>
+#include <public/WebImage.h>
#include <public/WebLayer.h>
#include <public/WebLayerTreeView.h>
#include <public/WebPoint.h>