Refactor DragData class to use PlatformStrategies in the Mac implementation.
authorenrica@apple.com <enrica@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Feb 2012 19:54:20 +0000 (19:54 +0000)
committerenrica@apple.com <enrica@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Feb 2012 19:54:20 +0000 (19:54 +0000)
commit1a0e7a68196a8acb222c65ec12e43950fa40c108
treee0e5ce13d873c3cb64b13fcbae144a7d6f301b50
parent7cfa204e99f5ce44aaffab0a8879372408fce7e7
Refactor DragData class to use PlatformStrategies in the Mac implementation.
https://bugs.webkit.org/show_bug.cgi?id=78768

Reviewed by Darin Adler.

Source/WebCore:

No new tests. No behavior change.

* WebCore.exp.in: Added new exported method of the PlatformPasteboard class.
* platform/DragData.h:
(WebCore::DragData::pasteboardName): Added pasteboardName and removed pasteboard.
* platform/PasteboardStrategy.h: Added color() method.
* platform/PlatformPasteboard.h: Ditto.
* platform/mac/ClipboardMac.mm:
(WebCore::Clipboard::create): Changed to use pasteboardName() method.
* platform/mac/DragDataMac.mm: All the methods below have been changed to use pasteboardName
and the pasteboardStrategy() methods.
(WebCore::DragData::DragData):
(WebCore::DragData::canSmartReplace):
(WebCore::DragData::containsColor):
(WebCore::DragData::containsFiles):
(WebCore::DragData::numberOfFiles):
(WebCore::DragData::asFilenames):
(WebCore::DragData::containsPlainText):
(WebCore::DragData::asPlainText):
(WebCore::DragData::asColor):
(WebCore::DragData::containsCompatibleContent):
(WebCore::DragData::asURL):
(WebCore::DragData::asFragment):
* platform/mac/PlatformPasteboardMac.mm:
(WebCore::PlatformPasteboard::color): Added implementation of the color() method.

Source/WebKit/mac:

* WebCoreSupport/WebPlatformStrategies.h: Added color() method.
* WebCoreSupport/WebPlatformStrategies.mm:
(WebPlatformStrategies::color):

Source/WebKit2:

* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: Added color() method.
(WebKit::WebPlatformStrategies::color):
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108101 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/platform/DragData.h
Source/WebCore/platform/PasteboardStrategy.h
Source/WebCore/platform/PlatformPasteboard.h
Source/WebCore/platform/mac/ClipboardMac.mm
Source/WebCore/platform/mac/DragDataMac.mm
Source/WebCore/platform/mac/PlatformPasteboardMac.mm
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h
Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.h