Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(159)

Side by Side Diff: Source/core/dom/Clipboard.h

Issue 26532002: Get rid of of custom code for Clipboard.setDragImage() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/bindings/v8/custom/V8ClipboardCustom.cpp ('k') | Source/core/dom/Clipboard.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2001 Peter Kelly (pmk@post.com) 2 * Copyright (C) 2001 Peter Kelly (pmk@post.com)
3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de) 3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de)
4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2008 Apple Inc. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 22 matching lines...) Expand all
33 #include "wtf/RefCounted.h" 33 #include "wtf/RefCounted.h"
34 #include "wtf/RefPtr.h" 34 #include "wtf/RefPtr.h"
35 #include "wtf/Vector.h" 35 #include "wtf/Vector.h"
36 36
37 namespace WebCore { 37 namespace WebCore {
38 38
39 class ChromiumDataObject; 39 class ChromiumDataObject;
40 class DataTransferItemList; 40 class DataTransferItemList;
41 class DragImage; 41 class DragImage;
42 class Element; 42 class Element;
43 class ExceptionState;
43 class FileList; 44 class FileList;
44 class Frame; 45 class Frame;
45 class ImageResource; 46 class ImageResource;
46 class Node; 47 class Node;
47 class Range; 48 class Range;
48 49
49 // State available during IE's events for drag and drop and copy/paste 50 // State available during IE's events for drag and drop and copy/paste
50 class Clipboard : public RefCounted<Clipboard>, public ScriptWrappable { 51 class Clipboard : public RefCounted<Clipboard>, public ScriptWrappable {
51 public: 52 public:
52 // Whether this clipboard is serving a drag-drop or copy-paste request. 53 // Whether this clipboard is serving a drag-drop or copy-paste request.
(...skipping 16 matching lines...) Expand all
69 70
70 void clearData(const String& type = String()); 71 void clearData(const String& type = String());
71 String getData(const String& type) const; 72 String getData(const String& type) const;
72 bool setData(const String& type, const String& data); 73 bool setData(const String& type, const String& data);
73 74
74 // extensions beyond IE's API 75 // extensions beyond IE's API
75 Vector<String> types() const; 76 Vector<String> types() const;
76 PassRefPtr<FileList> files() const; 77 PassRefPtr<FileList> files() const;
77 78
78 IntPoint dragLocation() const { return m_dragLoc; } 79 IntPoint dragLocation() const { return m_dragLoc; }
79 ImageResource* dragImage() const { return m_dragImage.get(); } 80 void setDragImage(Element*, int x, int y, ExceptionState&);
80 void setDragImage(ImageResource*, const IntPoint&); 81 ImageResource* dragImageResource() const { return m_dragImage.get(); }
82 void setDragImageResource(ImageResource*, const IntPoint&);
81 Node* dragImageElement() const { return m_dragImageElement.get(); } 83 Node* dragImageElement() const { return m_dragImageElement.get(); }
82 void setDragImageElement(Node*, const IntPoint&); 84 void setDragImageElement(Node*, const IntPoint&);
83 85
84 PassOwnPtr<DragImage> createDragImage(IntPoint& dragLocation, Frame*) const; 86 PassOwnPtr<DragImage> createDragImage(IntPoint& dragLocation, Frame*) const;
85 void declareAndWriteDragImage(Element*, const KURL&, const String& title); 87 void declareAndWriteDragImage(Element*, const KURL&, const String& title);
86 void writeURL(const KURL&, const String&); 88 void writeURL(const KURL&, const String&);
87 void writeRange(Range*, Frame*); 89 void writeRange(Range*, Frame*);
88 void writePlainText(const String&); 90 void writePlainText(const String&);
89 91
90 bool hasData(); 92 bool hasData();
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 ResourcePtr<ImageResource> m_dragImage; 131 ResourcePtr<ImageResource> m_dragImage;
130 RefPtr<Node> m_dragImageElement; 132 RefPtr<Node> m_dragImageElement;
131 }; 133 };
132 134
133 DragOperation convertDropZoneOperationToDragOperation(const String& dragOperatio n); 135 DragOperation convertDropZoneOperationToDragOperation(const String& dragOperatio n);
134 String convertDragOperationToDropZoneOperation(DragOperation); 136 String convertDragOperationToDropZoneOperation(DragOperation);
135 137
136 } // namespace WebCore 138 } // namespace WebCore
137 139
138 #endif // Clipboard_h 140 #endif // Clipboard_h
OLDNEW
« no previous file with comments | « Source/bindings/v8/custom/V8ClipboardCustom.cpp ('k') | Source/core/dom/Clipboard.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698