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

Side by Side Diff: public/platform/WebDragData.h

Issue 169323002: Oilpan: Move core/clipboard/ to oilpan's heap (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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
« Source/core/events/Event.h ('K') | « Source/web/WebViewImpl.cpp ('k') | no next file » | 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 20 matching lines...) Expand all
31 #ifndef WebDragData_h 31 #ifndef WebDragData_h
32 #define WebDragData_h 32 #define WebDragData_h
33 33
34 #include "WebCommon.h" 34 #include "WebCommon.h"
35 #include "WebData.h" 35 #include "WebData.h"
36 #include "WebString.h" 36 #include "WebString.h"
37 #include "WebURL.h" 37 #include "WebURL.h"
38 38
39 #if BLINK_IMPLEMENTATION 39 #if BLINK_IMPLEMENTATION
40 namespace WebCore { class DataObject; } 40 namespace WebCore { class DataObject; }
41 namespace WTF { template <typename T> class PassRefPtr; } 41 namespace WTF {
42 template <typename T> class PassRefPtr;
43 template <typename T> class RawPtr;
44 }
42 #endif 45 #endif
43 46
44 namespace blink { 47 namespace blink {
45 48
46 class WebDragDataPrivate; 49 class WebDragDataPrivate;
47 template <typename T> class WebVector; 50 template <typename T> class WebVector;
48 51
49 // Holds data that may be exchanged through a drag-n-drop operation. It is 52 // Holds data that may be exchanged through a drag-n-drop operation. It is
50 // inexpensive to copy a WebDragData object. 53 // inexpensive to copy a WebDragData object.
51 class WebDragData { 54 class WebDragData {
(...skipping 24 matching lines...) Expand all
76 WebData binaryData; 79 WebData binaryData;
77 80
78 // Title associated with a link when stringType == "text/uri-list". 81 // Title associated with a link when stringType == "text/uri-list".
79 // Filename when storageType == StorageTypeBinaryData. 82 // Filename when storageType == StorageTypeBinaryData.
80 WebString title; 83 WebString title;
81 84
82 // Only valid when stringType == "text/html". 85 // Only valid when stringType == "text/html".
83 WebURL baseURL; 86 WebURL baseURL;
84 }; 87 };
85 88
86 ~WebDragData() { reset(); } 89 ~WebDragData();
87 90
88 WebDragData() : m_private(0) { } 91 WebDragData();
89 WebDragData(const WebDragData& d) : m_private(0) { assign(d); } 92 WebDragData(const WebDragData&);
90 WebDragData& operator=(const WebDragData& d) 93 WebDragData& operator=(const WebDragData&);
91 {
92 assign(d);
93 return *this;
94 }
95 94
96 BLINK_EXPORT void initialize(); 95 BLINK_EXPORT void initialize();
97 BLINK_EXPORT void reset(); 96 BLINK_EXPORT void reset();
98 BLINK_EXPORT void assign(const WebDragData&); 97 BLINK_EXPORT void assign(const WebDragData&);
99 98
100 bool isNull() const { return !m_private; } 99 bool isNull() const { return !m_private; }
101 100
102 BLINK_EXPORT WebVector<Item> items() const; 101 BLINK_EXPORT WebVector<Item> items() const;
103 BLINK_EXPORT void setItems(const WebVector<Item>&); 102 BLINK_EXPORT void setItems(const WebVector<Item>&);
104 BLINK_EXPORT void addItem(const Item&); 103 BLINK_EXPORT void addItem(const Item&);
105 104
106 BLINK_EXPORT WebString filesystemId() const; 105 BLINK_EXPORT WebString filesystemId() const;
107 BLINK_EXPORT void setFilesystemId(const WebString&); 106 BLINK_EXPORT void setFilesystemId(const WebString&);
108 107
109 #if BLINK_IMPLEMENTATION 108 #if BLINK_IMPLEMENTATION
110 WebDragData(const WTF::PassRefPtr<WebCore::DataObject>&); 109 WebDragData(const WebCore::PassRefPtrWillBeRawPtr<WebCore::DataObject>&);
111 WebDragData& operator=(const WTF::PassRefPtr<WebCore::DataObject>&); 110 WebDragData& operator=(const WebCore::PassRefPtrWillBeRawPtr<WebCore::DataOb ject>&);
112 operator WTF::PassRefPtr<WebCore::DataObject>() const; 111 WebCore::DataObject* getValue() const;
113 #endif 112 #endif
114 113
115 private: 114 private:
116 void assign(WebDragDataPrivate*); 115 void assign(WebDragDataPrivate*);
117 void ensureMutable(); 116 void ensureMutable();
118 WebDragDataPrivate* m_private; 117 WebDragDataPrivate* m_private;
119 }; 118 };
120 119
121 } // namespace blink 120 } // namespace blink
122 121
123 #endif 122 #endif
OLDNEW
« Source/core/events/Event.h ('K') | « Source/web/WebViewImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698