diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2008-12-17 18:05:15 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2008-12-17 18:05:15 -0800 |
commit | 1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353 (patch) | |
tree | 4457a7306ea5acb43fe05bfe0973b1f7faf97ba2 /WebCore/platform/qt/ClipboardQt.h | |
parent | 9364f22aed35e1a1e9d07c121510f80be3ab0502 (diff) | |
download | external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.zip external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.tar.gz external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.tar.bz2 |
Code drop from //branches/cupcake/...@124589
Diffstat (limited to 'WebCore/platform/qt/ClipboardQt.h')
-rw-r--r-- | WebCore/platform/qt/ClipboardQt.h | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/WebCore/platform/qt/ClipboardQt.h b/WebCore/platform/qt/ClipboardQt.h index 6e54bcd..caf040f 100644 --- a/WebCore/platform/qt/ClipboardQt.h +++ b/WebCore/platform/qt/ClipboardQt.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007 Apple Inc. All rights reserved. + * Copyright (C) 2007, 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 @@ -28,9 +28,10 @@ #include "Clipboard.h" #include "CachedResourceClient.h" -#include "ClipboardAccessPolicy.h" +QT_BEGIN_NAMESPACE class QMimeData; +QT_END_NAMESPACE namespace WebCore { @@ -39,11 +40,15 @@ namespace WebCore { // State available during IE's events for drag and drop and copy/paste class ClipboardQt : public Clipboard, public CachedResourceClient { public: - ClipboardQt(ClipboardAccessPolicy policy, const QMimeData* readableClipboard); - - // Clipboard is writable so it will create its own QMimeData object - ClipboardQt(ClipboardAccessPolicy policy, bool forDragging = false); - ~ClipboardQt(); + static PassRefPtr<ClipboardQt> create(ClipboardAccessPolicy policy, const QMimeData* readableClipboard) + { + return adoptRef(new ClipboardQt(policy, readableClipboard)); + } + static PassRefPtr<ClipboardQt> create(ClipboardAccessPolicy policy, bool forDragging = false) + { + return adoptRef(new ClipboardQt(policy, forDragging)); + } + virtual ~ClipboardQt(); void clearData(const String& type); void clearAllData(); @@ -67,7 +72,12 @@ namespace WebCore { void invalidateWritableData() { m_writableData = 0; } private: - void setDragImage(CachedImage* image, Node *node, const IntPoint &loc); + ClipboardQt(ClipboardAccessPolicy, const QMimeData* readableClipboard); + + // Clipboard is writable so it will create its own QMimeData object + ClipboardQt(ClipboardAccessPolicy, bool forDragging); + + void setDragImage(CachedImage*, Node*, const IntPoint& loc); const QMimeData* m_readableData; QMimeData* m_writableData; |