From 1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353 Mon Sep 17 00:00:00 2001 From: The Android Open Source Project Date: Wed, 17 Dec 2008 18:05:15 -0800 Subject: Code drop from //branches/cupcake/...@124589 --- WebCore/platform/mac/ClipboardMac.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'WebCore/platform/mac/ClipboardMac.h') diff --git a/WebCore/platform/mac/ClipboardMac.h b/WebCore/platform/mac/ClipboardMac.h index 480d828..db6ecb6 100644 --- a/WebCore/platform/mac/ClipboardMac.h +++ b/WebCore/platform/mac/ClipboardMac.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004, 2006 Apple Computer, Inc. All rights reserved. + * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,15 +23,11 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -// An implementation of the clipboard class from IE that talks to the Cocoa Pasteboard - #ifndef ClipboardMac_h #define ClipboardMac_h -#include "IntPoint.h" -#include "Clipboard.h" -#include "ClipboardAccessPolicy.h" #include "CachedResourceClient.h" +#include "Clipboard.h" #include #ifdef __OBJC__ @@ -40,7 +36,6 @@ #else class NSImage; class NSPasteboard; -typedef unsigned NSDragOperation; #endif namespace WebCore { @@ -49,7 +44,11 @@ class Frame; class ClipboardMac : public Clipboard, public CachedResourceClient { public: - ClipboardMac(bool forDragging, NSPasteboard *, ClipboardAccessPolicy, Frame* = 0); + static PassRefPtr create(bool forDragging, NSPasteboard *pasteboard, ClipboardAccessPolicy policy, Frame* frame) + { + return adoptRef(new ClipboardMac(forDragging, pasteboard, policy, frame)); + } + virtual ~ClipboardMac(); void clearData(const String& type); @@ -73,7 +72,10 @@ public: // Methods for getting info in Cocoa's type system NSImage *dragNSImage(NSPoint&) const; // loc converted from dragLoc, based on whole image size NSPasteboard *pasteboard() { return m_pasteboard.get(); } + private: + ClipboardMac(bool forDragging, NSPasteboard *, ClipboardAccessPolicy, Frame*); + void setDragImage(CachedImage*, Node*, const IntPoint&); RetainPtr m_pasteboard; -- cgit v1.1