summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/mac/ClipboardMac.h
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2008-12-17 18:05:15 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2008-12-17 18:05:15 -0800
commit1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353 (patch)
tree4457a7306ea5acb43fe05bfe0973b1f7faf97ba2 /WebCore/platform/mac/ClipboardMac.h
parent9364f22aed35e1a1e9d07c121510f80be3ab0502 (diff)
downloadexternal_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.zip
external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.tar.gz
external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.tar.bz2
Code drop from //branches/cupcake/...@124589
Diffstat (limited to 'WebCore/platform/mac/ClipboardMac.h')
-rw-r--r--WebCore/platform/mac/ClipboardMac.h18
1 files changed, 10 insertions, 8 deletions
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 <wtf/RetainPtr.h>
#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<ClipboardMac> 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<NSPasteboard> m_pasteboard;